# Dummy Data Summary

## Overview
Successfully created 200+ dummy records across all database tables for testing purposes.

## Data Created

### Users & Profiles
- **1 Admin User**
  - Email: `admin@cura.test`
  - Password: `password`
  - Role: admin

- **50 Nurse Users with Complete Profiles**
  - Emails: `nurse1@example.com` through `nurse50@example.com`
  - Password: `password` (all)
  - Diverse specialties: ICU, Emergency, Pediatrics, Oncology, Surgery, etc.
  - Varied experience levels (1-15 years)
  - Different NCLEX statuses (Passed, Failed, Scheduled, Not Taken)
  - Various countries and cities
  - Realistic profile data including bio, certifications, skills

- **20 Employer Users with Companies**
  - Emails: `employer1@example.com` through `employer20@example.com`
  - Password: `password` (all)
  - **15 Verified Employers** (ready to post jobs)
  - **5 Pending Employers** (awaiting admin approval)
  - Different industries: Home Healthcare, Hospital, Clinic, Long-term Care, Staffing Agency
  - Various countries and cities worldwide

### Job Market Data
- **59 Job Postings**
  - Only from verified employers
  - Various statuses: 60% open, 25% closed, 15% paused
  - Employment types: Full-time, Part-time, Contract, Travel
  - Work modes: Onsite, Remote, Hybrid
  - Salary ranges: $50k-$120k (varied)
  - Different specialties required
  - Contract lengths: 12-24 months

- **100 Job Applications**
  - Various statuses: Pending, Reviewing, Interviewing, Offered, Accepted, Rejected, Withdrawn
  - Realistic distribution (mostly pending and reviewing)
  - Applied dates within last 30 days
  - Cover letters and CV paths included

### Networking & Messaging
- **50 Nurse Connections**
  - Bidirectional validation (no duplicates)
  - Various statuses:
    - 60% Accepted (can message)
    - 25% Pending
    - 15% Rejected
  - Connection dates within last 60 days

- **30 Conversations**
  - Only between accepted connections
  - Real-time timestamps

- **66 Messages**
  - 2-3 messages per conversation average
  - Chronologically ordered
  - Varied content simulating real conversations

### Professional Documents
- **75 Nurse Documents**
  - Types: CV, License, Certificate, Transcript
  - 1-3 documents per nurse
  - File paths in storage structure
  - Organized by nurse ID

## Total Records: 421

## Database Structure Verified
All migrations have been run successfully:
- ✅ Users table with role and activation
- ✅ Nurse profiles with complete Phase I schema
- ✅ Nurse documents with file paths
- ✅ Employers table with approval fields
- ✅ Job postings with all Phase I requirements
- ✅ Job applications with status tracking
- ✅ Nurse connections with bidirectional validation
- ✅ Conversations with participants
- ✅ Messages table
- ✅ All foreign key constraints properly set

## Testing the Employer Approval System

### Test Scenarios

1. **Login as Pending Employer**
   - Email: `employer16@example.com` through `employer20@example.com`
   - Password: `password`
   - Expected: Amber banner showing "Pending Admin Approval"
   - Cannot access job posting creation

2. **Login as Verified Employer**
   - Email: `employer1@example.com` through `employer15@example.com`
   - Password: `password`
   - Expected: Normal dashboard with full access
   - Can create job postings

3. **Login as Admin**
   - Email: `admin@cura.test`
   - Password: `password`
   - Expected: Dashboard shows "5 Pending Approvals"
   - Pending approval alert banner visible
   - Can approve/revoke employers in management page

4. **Approve Employer Flow**
   - Login as admin
   - Go to Employer Management
   - Click "Approve" on pending employer
   - Logout and login as that employer
   - Verify: Can now create job postings

## Seeder Usage

### Run the Seeder
```bash
php artisan db:seed --class=DummyDataSeeder
```

### Fresh Database with Dummy Data
```bash
php artisan migrate:fresh --seed
```

### Manual Seeding After Migration
```bash
php artisan migrate
php artisan db:seed --class=DummyDataSeeder
```

## Important Notes

1. **Data Clearing**: The seeder automatically clears existing data before creating new records to ensure clean state.

2. **Foreign Key Constraints**: All relationships are properly maintained.

3. **Realistic Data**: 
   - Names, locations, specialties use realistic arrays
   - Dates are relative to current date
   - Status distributions mirror real-world scenarios

4. **Password**: All users have password `password` for easy testing.

5. **Email Pattern**:
   - Admin: `admin@cura.test`
   - Nurses: `nurse{1-50}@example.com`
   - Employers: `employer{1-20}@example.com`

## Verification Queries

Check data counts:
```bash
php artisan tinker --execute="echo 'Nurses: ' . \App\Models\NurseProfile::count();"
php artisan tinker --execute="echo 'Employers: ' . \App\Models\Employer::count();"
php artisan tinker --execute="echo 'Jobs: ' . \App\Models\JobPosting::count();"
php artisan tinker --execute="echo 'Applications: ' . \App\Models\JobApplication::count();"
```

Check employer approval status:
```bash
php artisan tinker --execute="echo \App\Models\Employer::where('verified', false)->count();"
php artisan tinker --execute="echo \App\Models\Employer::where('verified', true)->count();"
```
