<?php

namespace Database\Seeders;

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

use App\Models\User;
use App\Models\Role;
use App\Models\Schedule;
use App\Models\Teacher;
use App\Models\Student;

class PresentScheduleRelSeeder extends Seeder
{
  public function run(): void
  {
    $student_1 = Student::find(1);
    $student_2 = Student::find(2);
    $student_3 = Student::find(3);

    $schedule_1 = Schedule::find(1);
    $schedule_2 = Schedule::find(2);
    $schedule_3 = Schedule::find(3);

    // NOTE: studnet 1 present in schedule 1 class
    $student_1->presentSchedule()->attach($schedule_1);

    // NOTE: studnet 1 present in schedule 2 class
    $student_1->presentSchedule()->attach($schedule_2);

    // NOTE: student 1 present in schedule 3 class
    $schedule_3->presentStudent()->attach($student_1);
  }
}
