# Phase 11: Data Seeder — DONE

## Date: 2026-03-16

## Summary
Created a comprehensive HotelSeeder that populates the database with realistic sandbox data for testing all Hotel Manager (PMS) functionality.

## Files Created

| File | Purpose |
|------|---------|
| `database/seeders/HotelSeeder.php` | Full hotel sandbox dataset |

## Files Modified

| File | Change |
|------|--------|
| `database/seeders/DatabaseSeeder.php` | Added `HotelSeeder::class` to seeder list |

## Seeded Data Summary

### Hotels (2)
| Hotel | Stars | Place | Rooms | Room Types | Check-in/out |
|-------|-------|-------|-------|------------|-------------|
| Champion Resort & Spa | 5★ | Paris | 54 | 6 | 15:00 / 11:00 |
| Champion City Hotel | 3★ | Strasbourg | 36 | 4 | 14:00 / 12:00 |

### Room Types (10)
- **Resort (6):** Standard, Superior, Deluxe, Junior Suite, Executive Suite, Presidential Suite
- **City (4):** Single, Double, Twin, Family

### Rooms (90)
- Distributed across floors with realistic numbering (floor × 100 + seq)
- Status breakdown: ~82% Available, ~14% Occupied, ~3% Maintenance
- Housekeeping: ~80% Clean, ~10% Dirty, ~5% In-Progress, ~5% Inspected

### Seasonal Rates (50)
- 5 seasons per room type across both hotels
- LOW (Jan–Mar, 0.8×), MID (Spring/Autumn, 1.0×), HIGH (Summer, 1.3×), SPECIAL (Holidays, 1.5×)

### Extras (12)
- 6 per hotel: Breakfast, Minibar, Spa, Laundry, Airport Transfer, Parking
- Member pricing at 85% of base price

### Reservations (80)
- 40 per hotel covering all statuses:
  - 10 upcoming (5 CONFIRMED + 5 PENDING)
  - 5 currently CHECKED_IN (with room assignments)
  - 20 past CHECKED_OUT
  - 3 CANCELLED (with reasons)
  - 2 NO_SHOW
- Various sources (DIRECT_APP, BOOKING_COM, AIRBNB, etc.)
- Some with extras charged during stay

### Channel Mappings (16)
- Resort: Booking.com + Airbnb (12 mappings for 6 room types)
- City: Booking.com only (4 mappings for 4 room types)

### Housekeeping Logs (61)
- 1–3 logs per room for the last 7 days

### Hotel Manager Employees (2)
- Marc Dupont (Paris) — marc.dupont@championspirit.com
- Sophie Weber (Strasbourg) — sophie.weber@championspirit.com

## Key Design Decisions
- **Idempotent**: Seeder checks `Hotel::exists()` and skips if data present
- **Employee creation**: Uses `firstOrCreate` to avoid duplicate email errors
- **Observer-safe**: Observer fires during seeding (notifications faked by DatabaseSeeder)
- **Realistic data**: Prices in EUR cents (brick/money pattern), proper date ranges, varied statuses

## Quality Checks
- Pint: 2 files pass (0 style issues)
- PHPStan level 7: 0 errors
- Seeder runs without errors
- Idempotency verified (re-running doesn't create duplicates)
