<?php

namespace Database\Seeders;

use Faker\Factory as Faker;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

use App\Models\ExamResult;
use App\Models\Exam;
use App\Models\Student;
use App\Models\Teacher;

class ExamResultSeeder extends Seeder
{
  /**
   * Run the database seeds.
   */
  public function run(): void
  {
    $student_1 = Student::find(1);
    $student_2 = Student::find(2);
    $student_3 = Student::find(3);

    $teacher_1 = Teacher::find(1);
    $teacher_2 = Teacher::find(2);
    $teacher_3 = Teacher::find(3);

    $exam_1 = Exam::find(1);
    $exam_2 = Exam::find(2);

    // $exam_result_1 = ExamResult::factory()->create([
    //     'result' => 70,
    //     'remarks'=>"",
    //     'exam_id'=>$exam_2->id,
    //     'student_id'=>$student_1->id,
    //     'teacher_id'=>$teacher_2->id,
    // ]);

    // $exam_result_2 = ExamResult::factory()->create([
    //     'result' => 55,
    //     'remarks'=>"",
    //     'exam_id'=>$exam_2->id,
    //     'student_id'=>$student_2->id,
    //     'teacher_id'=>$teacher_3->id,
    // ]);

    // $exam_result_3 = ExamResult::factory()->create([
    //     'result' => 58,
    //     'remarks'=>"",
    //     'exam_id'=>$exam_2->id,
    //     'student_id'=>$student_3->id,
    //     'teacher_id'=>$teacher_1->id,
    // ]);

    // NOTE: test seeding exam result done in 'ExamResultTeacherRelSeeder.php'
  }
}
