<?php

namespace Database\Factories;

use App\Models\MainAccount;
use Illuminate\Database\Eloquent\Factories\Factory;

class MainAccountFactory extends Factory
{
    protected $model = MainAccount::class;

    public function definition(): array
    {
        return [
            'code' => $this->faker->unique()->regexify('[A-Z]{2}[0-9]{4}'),
            'account_name' => $this->faker->company() . ' Account',
            'financial_category' => $this->faker->randomElement(['IS', 'BS']),
            'account_type' => $this->faker->randomElement(['asset', 'liability', 'equity', 'income', 'expense']),
            'account_type_name' => $this->faker->randomElement(['Current Assets', 'Fixed Assets', 'Current Liabilities', 'Long-term Liabilities', 'Equity', 'Revenue', 'Cost of Goods Sold']),
        ];
    }
}
