<?php

use App\Models\Course;
use App\Models\Module;
use App\Models\Subject;
use App\Models\Unit;
use Illuminate\Database\Seeder;

class SubjectSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // 化学
        Subject::firstOrCreate([
            'name' => 'Chemistry',
            'id' => 1
        ],[

        ]);

        Module::firstOrCreate([
            'subject_id' => 1,
            'name' => "Module 1",
            "id" => 1
        ],[
            'order' => 2,
        ]);

        Module::firstOrCreate([
            'subject_id' => 1,
            'name' => "Module 2",
            "id" => 2
        ],[
            'order' => 1,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 1,
            'module_id' => 1,
            "name" => "Unit 1",
            "title" => "Matter, Elements, Atoms and Subatomic Particles"
        ],[
            'order' => 100,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 1,
            'module_id' => 1,
            "name" => "Unit 2",
            "title" => " Periodic Table"
        ],[
            'order' => 99,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 1,
            'module_id' => 1,
            "name" => "Unit 3",
            "title" => "Physical and Chemical Properties"
        ],[
            'order' => 98,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 1,
            'module_id' => 2,
            "name" => "Unit 4",
            "title" => "Ionic, Covalent and Metallic Bonds"
        ],[
            'order' => 97,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 1,
            'module_id' => 2,
            "name" => "Unit 5",
            "title" => "Redox Reactions"
        ],[
            'order' => 96,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 1,
            'module_id' => 2,
            "name" => "Unit 6",
            "title" => "Factors Affecting Chemical Reactions"
        ],[
            'order' => 95,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 1,
            'module_id' => 2,
            "name" => "Unit 7",
            "title" => "Factors Affecting Chemical Reactions"
        ],[
            'order' => 94,
        ]);


        // 生物
        Subject::firstOrCreate([
            'name' => 'Biology',
            'id' => 2
        ],[

        ]);

        Module::firstOrCreate([
            'subject_id' => 2,
            'name' => "Module 1",
            "id" => 3
        ],[
            'order' => 2,
        ]);

        Module::firstOrCreate([
            'subject_id' => 2,
            'name' => "Module 2",
            "id" => 4
        ],[
            'order' => 1,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 2,
            'module_id' => 3,
            "name" => "Unit 1",
            "title" => "Respiratory System"
        ],[
            'order' => 100,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 2,
            'module_id' => 3,
            "name" => "Unit 2",
            "title" => "Circulatory System"
        ],[
            'order' => 99,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 2,
            'module_id' => 3,
            "name" => "Unit 3",
            "title" => "Digestive System"
        ],[
            'order' => 98,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 2,
            'module_id' => 3,
            "name" => "Unit 4",
            "title" => "Cell Structure"
        ],[
            'order' => 97,
        ]);

        Unit::firstOrCreate([
            'subject_id' =>2,
            'module_id' => 4,
            "name" => "Unit 5",
            "title" => "DNA Replication in Cell Division"
        ],[
            'order' => 96,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 2,
            'module_id' => 4,
            "name" => "Unit 6",
            "title" => "Protein Synthesis"
        ],[
            'order' => 95,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 2,
            'module_id' => 4,
            "name" => "Unit 7",
            "title" => "Gene Mutation & Genetic Technologies"
        ],[
            'order' => 94,
        ]);


        // 实验室安全
        Subject::firstOrCreate([
            'name' => 'Lab Safety',
            'id' => 3
        ],[

        ]);

        Module::firstOrCreate([
            'subject_id' => 3,
            'name' => "Module 1",
            "id" => 5
        ],[
            'order' => 2,
        ]);

        Module::firstOrCreate([
            'subject_id' => 3,
            'name' => "Module 2",
            "id" => 6
        ],[
            'order' => 1,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 3,
            'module_id' => 5,
            "name" => "Unit 1",
            "title" => "Dress Code and General Rules in Lab"
        ],[
            'order' => 100,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 3,
            'module_id' => 5,
            "name" => "Unit 2",
            "title" => "Chemical Hazard Symbols and Chemical Storage"
        ],[
            'order' => 99,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 3,
            'module_id' => 5,
            "name" => "Unit 3",
            "title" => "Handling Broken Glass and Waste Disposal Procedures Unit 4 Cell Structure"
        ],[
            'order' => 98,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 3,
            'module_id' => 6,
            "name" => "Unit 4",
            "title" => "Basic Equipment, Glassware and Facilities in Lab"
        ],[
            'order' => 97,
        ]);

        Unit::firstOrCreate([
            'subject_id' => 3,
            'module_id' => 6,
            "name" => "Unit 5",
            "title" => "Proper Procedure for Experiments"
        ],[
            'order' => 96,
        ]);

    }
}
