<?php

namespace Database\Seeders;

use App\Models\LicenseType;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class LicenseTypeTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        /**
         * Reset the countries table
         */
        // if (\App::environment('local')) {
        //     LicenseType::truncate();
        // }

    	$country = [
	        [
				'name'       => 'TRADE LICENSE NUMBER',
				'code'       => 'TRADELICENSE ',
				'priority'   => 1,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'CIN NUMBER',
				'code'       => 'CIN',
				'priority'   => 2,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'GST NUMBER',
				'code'       => 'GST',
				'priority'   => 3,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'VAT NO',
				'code'       => 'VAT',
				'priority'   => 4,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'PAN NO',
				'code'       => 'PAN',
				'priority'   => 5,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'TAN NO',
				'code'       => 'TAN',
				'priority'   => 6,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'TIN NO',
				'code'       => 'TIN',
				'priority'   => 7,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'DL NUMBER1',
				'code'       => 'DL1',
				'priority'   => 8,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'DL NUMBER2',
				'code'       => 'DL2',
				'priority'   => 9,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'AADHAAR NUMBER',
				'code'       => 'AADHAAR',
				'priority'   => 10,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'TRANSPORTER ID',
				'code'       => 'TRANSPORTERID',
				'priority'   => 11,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'RCMC REG. NO',
				'code'       => 'RCMCNO',
				'priority'   => 12,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'IE CODE',
				'code'       => 'IECODE',
				'priority'   => 13,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'LUT NUMBER',
				'code'       => 'LUT',
				'priority'   => 14,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],
	        [
				'name'       => 'FSSAI NO',
				'code'       => 'FSSAI',
				'priority'   => 15,
				'status'     => 0,
				'country_id' => 101,
				'created_at' => date('Y-m-d H:i:s'),
				'updated_at' => date('Y-m-d H:i:s')
	        ],

	    ];
        // LicenseType::insert($country);
        foreach ($country as $data) {
            LicenseType::firstOrCreate(
                ['code' => $data['code']],
                $data
            );
        }
    }
}
