<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\TaxSettingMain;

class TaxSettingMainSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        TaxSettingMain::firstOrCreate(
            ['name' => 'tax_status'],
            [
                'tax_status' => false,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => null,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'country'],
            [
                'tax_status' => null,
                'tax_country' => 'ID',
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => null,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'province'],
            [
                'tax_status' => null,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => null,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'city'],
            [
                'tax_status' => null,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => null,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'vat_registered'],
            [
                'tax_status' => null,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => false,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => null,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'tax_scheme'],
            [
                'tax_status' => null,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => 'final_soho',
                'construction_certificate' => null,
                'has_npwp' => null,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'tax_scheme'],
            [
                'tax_status' => null,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => null,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'has_npwp'],
            [
                'tax_status' => null,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => false,
                'import_foreign_product' => null,
            ]
        );

        TaxSettingMain::firstOrCreate(
            ['name' => 'import_foreign_product'],
            [
                'tax_status' => null,
                'tax_country' => null,
                'tax_province' => null,
                'tax_city' => null,
                'vat_registered' => null,
                'tax_scheme' => null,
                'construction_certificate' => null,
                'has_npwp' => false,
                'import_foreign_product' => 1,
            ]
        );
    }
}
