<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class GradeSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        DB::table('grades')->truncate();
        DB::table('grades')->insert([
            [
                'name' => 'A+',
                'mark_from' => 80,
                'mark_to' => 100,
                'gpa' => '5.00',
                'remark' => 'Outstanding',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'A',
                'mark_from' => 70,
                'mark_to' => 79,
                'remark' => 'Excellent',
                'gpa' => '3.50',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'A-',
                'mark_from' => 60,
                'mark_to' => 69,
                'remark' => 'Very Good',
                'gpa' => '3.50',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'B',
                'mark_from' => 50,
                'mark_to' => 59,
                'remark' => 'Good',
                'gpa' => '3.00',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'C',
                'mark_from' => 40,
                'mark_to' => 49,
                'remark' => 'Fair',
                'gpa' => '2.00',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'D',
                'mark_from' => 33,
                'mark_to' => 39,
                'remark' => 'Pass',
                'gpa' => '1.00',
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'F',
                'mark_from' => 0,
                'mark_to' => 32,
                'remark' => 'Fail',
                'gpa' => '0.00',
                'created_at' => now(),
                'updated_at' => now(),
            ],
        ]);
    }
}
