<?php

use Illuminate\Database\Seeder;

class EnseignantTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {

        DB::statement('SET FOREIGN_KEY_CHECKS=0;');

        DB::table('Enseignant')->truncate();

        DB::table('Enseignant')->insert([
            'CIN' => 1,
            'nom' => 'admin',
            'prenom' => 'admin',
            'id_Privilege' => 1,
            'login' => 'admin',
            'id_Specialite' => 1,
            'id_Grade' => 1,
            'password' => bcrypt('admin')
        ]);

        DB::table('Enseignant')->insert([
            'CIN' => 1,
            'nom' => 'jury',
            'prenom' => 'jury',
            'id_Privilege' => 2,
            'id_Specialite' => 1,
            'id_Grade' => 1,
            'login' => 'jury',
            'password' => bcrypt('jury')
        ]);

        DB::table('Enseignant')->insert([
            'CIN' => 1,
            'nom' => 'encadrant',
            'prenom' => 'encadrant',
            'id_Privilege' => 3,
            'id_Specialite' => 1,
            'id_Grade' => 1,
            'login' => 'encadrant',
            'password' => bcrypt('encadrant')
        ]);
        DB::table('Enseignant')->insert([
            'CIN' => 1,
            'nom' => 'encadrant1',
            'prenom' => 'encadrant1',
            'id_Privilege' => 3,
            'id_Specialite' => 1,
            'id_Grade' => 1,
            'login' => 'encadrant1',
            'password' => bcrypt('encadrant1')
        ]);

        DB::table('Enseignant')->insert([
            'CIN' => 1,
            'nom' => 'ecos',
            'prenom' => 'ecos',
            'id_Privilege' => 4,
            'id_Specialite' => 1,
            'id_Grade' => 1,
            'login' => 'ecos',
            'password' => bcrypt('ecos')
        ]);

        DB::table('Enseignant')->insert([
            'CIN' => 1,
            'nom' => 'observateur',
            'prenom' => 'observateur',
            'id_Privilege' => 5,
            'id_Specialite' => 1,
            'id_Grade' => 1,
            'login' => 'medecin',
            'password' => bcrypt('medecin')
        ]);


        DB::statement('SET FOREIGN_KEY_CHECKS=1;');

    }
}
