<?php

use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\BusinessType;
use App\Classes\ValueObjects\Constants\CompanyType;
use App\Models\Company;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class CompaniesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $company = new Company();
        $company->name = 'CIEF SDN BHD';
        $company->reference = 'CIEF';
        $company->type = CompanyType::COMPANY_BUSINESS;
        $company->business_type = BusinessType::FREIGHT_FORWARDER;
        $company->status = ApprovalStatus::APPROVED;

        $company->save();

        $bank = new \App\Models\Bank();
        $bank->company_id = $company->id;
        $bank->bank_name = 'Maybank';
        $bank->holder_name = 'CIEF Worldwide Snd Bhd';
        $bank->account_no = '63465345345';
        $bank->country_id = 1;
        $bank->status = ApprovalStatus::APPROVED;
        $bank->type = \App\Classes\ValueObjects\Constants\BankAccountType::PERSONAL;
        $bank->save();

    }
}
