<?php

namespace Database\Factories;

use App\Domain\Documents\Models\DocumentType;
use App\Domain\Organization\Models\Company;
use Illuminate\Database\Eloquent\Factories\Factory;

class DocumentRequirementFactory extends Factory
{
    public function definition(): array
    {
        return [
            'company_id' => Company::factory(),
            'document_type_id' => DocumentType::factory(),
            'is_mandatory' => true,
            'is_active' => true,
        ];
    }

    public function optional(): static
    {
        return $this->state(fn () => ['is_mandatory' => false]);
    }
}
