<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\Teacher;
use App\Models\User;
use Faker\Factory as Faker;

class TeacherSeeder extends Seeder
{
  /**
   * Run the database seeds.
   */
  public function run(): void
  {
    // 11 start

    $user = User::factory()->create([
      'name' => 'Amy',
      'email' => 'amy_tsui@school.com',
      'password' => 'amy_tsui',
      'role' => 'teacher',
      'role_id' => '',
    ]);

    Teacher::factory()->create([
      'name' => 'Amy',
      'firstName' => 'Amy',
      'lastName' => 'Tsui',
      'dateOfBirth' => '1980-12-31',
      'gender' => 'female',
      'email' => 'amy_tsui@school.com',
      'contact' =>
        'Flat A, 16/F, King Cheung House, Cheung Wah Estate, Fanling',
      'skills' =>
        'Chinese calligraphy, Wonton noodle soup preparation, Kung Fu training, Feng Shui consulting, Kung Fu training',
      'user_id' => $user->id,
      'avatar' => 'amy_tsui_school_com.jpg',
    ]);

    // 12 start

    $user = User::factory()->create([
      'name' => 'James',
      'email' => 'james_poon@school.com',
      'password' => 'james_poon',
      'role' => 'teacher',
      'role_id' => '',
    ]);

    Teacher::factory()->create([
      'name' => 'James',
      'firstName' => 'James',
      'lastName' => 'Poon',
      'dateOfBirth' => '1980-12-31',
      'gender' => 'male',
      'email' => 'james_poon@school.com',
      'contact' => 'Shop 102, 1/F, Fortune Metropolis, Hung Hom',
      'skills' =>
        'Hong Kong-style milk tea brewing, Chinese tea ceremony, Dragon boat racing, Mahjong strategy',
      'user_id' => $user->id,
      'avatar' => 'james_poon_school_com.jpg',
    ]);

    // 13 start

    $user = User::factory()->create([
      'name' => 'Jennifer',
      'email' => 'jennifer_lai@school.com',
      'password' => 'jennifer_lai',
      'role' => 'teacher',
      'role_id' => '',
    ]);

    Teacher::factory()->create([
      'name' => 'Jennifer',
      'firstName' => 'Jennifer',
      'lastName' => 'Lai',
      'dateOfBirth' => '1980-12-31',
      'gender' => 'female',
      'email' => 'jennifer_lai@school.com',
      'contact' => 'Flat F, 31/F, Tower 3, Mont Vert, Tseung Kwan O',
      'skills' =>
        'Tai Chi practice, Hong Kong-style milk tea brewing, Dumpling making, Kung Fu training, Mahjong strategy',
      'user_id' => $user->id,
      'avatar' => 'jennifer_lai_school_com.jpg',
    ]);

    // 14 start

    $user = User::factory()->create([
      'name' => 'Simon',
      'email' => 'simon_yeung@school.com',
      'password' => 'simon_yeung',
      'role' => 'teacher',
      'role_id' => '',
    ]);

    Teacher::factory()->create([
      'name' => 'Simon',
      'firstName' => 'Simon',
      'lastName' => 'Yeung',
      'dateOfBirth' => '1980-12-31',
      'gender' => 'male',
      'email' => 'simon_yeung@school.com',
      'contact' => '55-59 Queen\'s Road East, Wan Chai',
      'skills' =>
        'Traditional Chinese medicine diagnosis, Traditional Chinese medicine diagnosis, Chinese tea ceremony, Street photography, Lion dance performance',
      'user_id' => $user->id,
      'avatar' => 'simon_yeung_school_com.jpg',
    ]);

    // 15 start

    $user = User::factory()->create([
      'name' => 'Samantha',
      'email' => 'samantha_chee@school.com',
      'password' => 'samantha_chee',
      'role' => 'teacher',
      'role_id' => '',
    ]);

    Teacher::factory()->create([
      'name' => 'Samantha',
      'firstName' => 'Samantha',
      'lastName' => 'Chee',
      'dateOfBirth' => '1980-12-31',
      'gender' => 'female',
      'email' => 'samantha_chee@school.com',
      'contact' =>
        'Room 301, 3/F, Wah Shing Centre, 5 Fung Yip Street, Chai Wan',
      'skills' =>
        'Dumpling making, Wonton noodle soup preparation, Street photography, Tai Chi practice, Singing in a karaoke bar',
      'user_id' => $user->id,
      'avatar' => 'samantha_chee_school_com.jpg',
    ]);

    $user = User::factory()->create([
      'name' => 'teacher_1',
      'email' => 'teacher1@school.com',
      'password' => 'teacher1',
      'role' => 'teacher',
      'role_id' => '',
    ]);

    Teacher::factory()->create([
      'name' => 'Teacher 1',
      'firstName' => 'firstNameT',
      'lastName' => 'lastNameT',
      'dateOfBirth' => '1980-12-31',
      'gender' => 'male',
      'email' => 'teacher1@school.com',
      'contact' => 'contact address teacher 1',
      'skills' => 'skills',
      'user_id' => $user->id,
      'avatar' => 'teacher1_school_com.jpg',
    ]);

    // $faker = Faker::create();
    // foreach (range(2, 5) as $index) {
    //     $user = User::factory()->create([
    //         'name' => 'teacher_'.$index,
    //         'email' => 'teacher'.$index.'@school.com',
    //         'password' => 'teacher'.$index,
    //         'role' => 'teacher',
    //         'role_id' => ''
    //     ]);

    //     Teacher::factory()->create([
    //         'name' => 'Teacher '.$index,
    //         'firstName' => 'firstNameT',
    //         'lastName' => 'lastNameT',
    //         'dateOfBirth' => '1980-12-31',
    //         'gender' => 'male',
    //         'email' => 'teacher'.$index.'@school.com',
    //         'contact' => 'contact address teacher '.$index,
    //         'skills' => 'skills',
    //         'user_id'=> $user->id,
    //         'avatar'=>'teacher'.$index.'_school_com.jpg'
    //     ]);
    // }
  }
}
