# ๐ฑ Seeder Guide - Test Data for Services & Providers
## ๐ What Was Created
### **3 New Seeders:**
1. **VenueServiceSeeder.php** - Creates 20 realistic services
2. **VenueServiceProviderSeeder.php** - Creates 15 test providers
3. **VenueServiceProviderServiceSeeder.php** - Links providers to their services
---
## ๐ Quick Start
### **Step 1: Run Migrations (if not done yet)**
```bash
php artisan migrate
```
### **Step 2: Run All Seeders**
```bash
php artisan db:seed
```
**OR run specific seeders only:**
```bash
php artisan db:seed --class=VenueServiceSeeder
php artisan db:seed --class=VenueServiceProviderSeeder
php artisan db:seed --class=VenueServiceProviderServiceSeeder
```
---
## ๐ Test Data Overview
### **20 Services Created:**
**Medical (4 services):**
- General Consultation - โฌ80 (30 min)
- Dental Checkup - โฌ120 (45 min)
- Physical Therapy Session - โฌ90 (60 min)
- Blood Test - โฌ50 (15 min)
**Beauty & Wellness (4 services):**
- Haircut & Styling - โฌ45 (60 min)
- Massage Therapy - โฌ100 (90 min)
- Manicure & Pedicure - โฌ60 (75 min)
- Facial Treatment - โฌ85 (60 min)
**Legal (3 services):**
- Legal Consultation - โฌ150 (60 min)
- Contract Review - โฌ200 (90 min)
- Notary Services - โฌ40 (20 min)
**Business (3 services):**
- Business Consulting - โฌ180 (90 min)
- Tax Preparation - โฌ120 (60 min)
- Accounting Services - โฌ100 (60 min)
**Fitness (3 services):**
- Personal Training Session - โฌ70 (60 min)
- Yoga Class - โฌ35 (60 min)
- Nutrition Consultation - โฌ90 (45 min)
**Education (3 services):**
- Language Tutoring - โฌ50 (60 min)
- Music Lessons - โฌ60 (60 min)
- Academic Tutoring - โฌ55 (60 min)
---
### **15 Service Providers Created:**
**Medical Providers:**
1. **Dr. Sarah Johnson** - General Physician (โฌ80/hr, 4.9โ
, 15 years)
- Services: General Consultation, Blood Test, Physical Therapy
2. **Dr. Michael Chen** - Dentist (โฌ120/hr, 4.8โ
, 12 years)
- Services: Dental Checkup, General Consultation
3. **Emma Rodriguez** - Physical Therapist (โฌ90/hr, 4.9โ
, 10 years)
- Services: Physical Therapy, Massage Therapy, Personal Training
**Beauty & Wellness:**
4. **Maria Garcia** - Hair Stylist (โฌ45/hr, 4.7โ
, 8 years)
- Services: Haircut & Styling
5. **Sofia Petrova** - Massage Therapist (โฌ100/hr, 5.0โ
, 14 years)
- Services: Massage Therapy, Facial Treatment
6. **Anna Dimitrova** - Beauty Specialist (โฌ70/hr, 4.8โ
, 9 years)
- Services: Manicure & Pedicure, Facial Treatment, Haircut & Styling
**Legal:**
7. **John Smith** - Legal Consultant (โฌ150/hr, 4.9โ
, 18 years)
- Services: Legal Consultation, Contract Review, Business Consulting
8. **Elena Ivanova** - Notary Public (โฌ40/hr, 4.6โ
, 7 years)
- Services: Notary Services, Legal Consultation
**Business:**
9. **David Thompson** - Business Consultant (โฌ180/hr, 4.9โ
, 20 years)
- Services: Business Consulting, Tax Preparation, Accounting
10. **Robert Wilson** - Accountant (โฌ110/hr, 4.7โ
, 13 years)
- Services: Tax Preparation, Accounting, Business Consulting
**Fitness:**
11. **Alex Martinez** - Personal Trainer (โฌ70/hr, 4.8โ
, 8 years)
- Services: Personal Training, Nutrition Consultation
12. **Lisa Anderson** - Yoga Instructor (โฌ35/hr, 4.9โ
, 11 years)
- Services: Yoga Class, Personal Training, Massage Therapy
13. **Dr. Jennifer Lee** - Nutritionist (โฌ90/hr, 4.8โ
, 9 years)
- Services: Nutrition Consultation, General Consultation
**Education:**
14. **Thomas Brown** - Language Tutor (โฌ50/hr, 4.7โ
, 12 years)
- Services: Language Tutoring, Academic Tutoring
15. **Catherine Miller** - Music Teacher (โฌ60/hr, 4.9โ
, 15 years)
- Services: Music Lessons, Academic Tutoring
---
## โ
Verification
### **Check Services:**
```sql
SELECT * FROM venue_services;
```
**Expected:** 20 services
### **Check Providers:**
```sql
SELECT * FROM venue_service_providers;
```
**Expected:** 15 providers
### **Check Provider-Service Relationships:**
```sql
SELECT
vsp.name as provider_name,
vs.name as service_name,
vs.price
FROM venue_service_provider_service vsps
JOIN venue_service_providers vsp ON vsps.venue_service_provider_id = vsp.id
JOIN venue_services vs ON vsps.venue_service_id = vs.id
ORDER BY vsp.name, vs.name;
```
**Expected:** ~40 relationships
---
## ๐งช Testing the Dual Booking Flow
### **Test Service-First Flow:**
1. Visit: `/web/venue/{venue_id}?type=services`
2. Click "Choose Service First" tab
3. Select "Massage Therapy" service
4. Should see: Sofia Petrova, Lisa Anderson, Emma Rodriguez
5. Select a provider โ Pick time โ Book!
### **Test Provider-First Flow:**
1. Visit: `/web/venue/{venue_id}?type=services`
2. Click "Choose Provider First" tab
3. Select "Dr. Sarah Johnson"
4. Should see: General Consultation, Blood Test, Physical Therapy
5. Select a service โ Pick time โ Book!
---
## ๐ Re-seeding
### **To clear and re-seed:**
```bash
php artisan migrate:fresh --seed
```
โ ๏ธ **WARNING:** This will delete ALL data!
### **To add more data without clearing:**
Just run the seeders again:
```bash
php artisan db:seed
```
---
## ๐ Customization
### **To modify test data:**
**Edit services:** `database/seeders/VenueServiceSeeder.php`
**Edit providers:** `database/seeders/VenueServiceProviderSeeder.php`
**Edit relationships:** `database/seeders/VenueServiceProviderServiceSeeder.php`
Then re-run:
```bash
php artisan db:seed --class=VenueServiceSeeder
```
---
## ๐ฏ What's Next
After seeding:
1. โ
Verify data in database
2. โ
Test Service-first booking flow
3. โ
Test Provider-first booking flow
4. โ
Verify bookings are created correctly
5. โ
Check `booking_appointments` table has correct data
**Follow the TESTING_GUIDE.md for complete testing procedures!**
---
## ๐ Success!
You now have:
- โ
20 realistic services across 6 categories
- โ
15 professional service providers with photos
- โ
~40 provider-service relationships
- โ
Complete test data for dual booking flow
- โ
Ready to test immediately!
**Happy Testing!** ๐