<?php

namespace Database\Seeders;

use App\Models\TrialCompanyProfile;
use App\Models\TrialEzyPOS;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class EzyPOSSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        TrialCompanyProfile::create([
            'company_id' => 'Trial-000001',
            'company_name' => 'Trial 1',
            'contact_name' => 'Daniel',
            'contact_number' => '0123456789',
            'roc' => '123456789',
            'address1' => 'Add1',
            'address2' => 'Add2',
            'address3' => 'Add3',
            'address4' => 'Add4',
            'state' => 'Johor',
            'postcode' => '81100',
            'email' => 'trial1@gmail.com',
            'raw_password' => 'password',
            'password' => Hash::make('password'),
        ]);

        TrialEzyPOS::create([
            'company_id' => 'Trial-000001',
            'app_id' => 'EzyPOS-000001',
            'pin' => '123456',
            'last_login' => null,
            'last_modified' => null,
            'registered_date' => now(),
            'expiry_date' => now()->addDays(7),
        ]);
    }
}
