<?php

declare(strict_types=1);

namespace Database\Factories;

use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use ImovelZapAi\Owners\Domain\Enums\ListingAgreementStatus;
use ImovelZapAi\Owners\Domain\Enums\ListingAgreementType;
use ImovelZapAi\Owners\Infrastructure\Persistence\Eloquent\ListingAgreementModel;
use ImovelZapAi\Owners\Infrastructure\Persistence\Eloquent\OwnerModel;
use ImovelZapAi\Tenancy\Infrastructure\Persistence\Eloquent\TenantModel;

/** @extends Factory<ListingAgreementModel> */
class ListingAgreementFactory extends Factory
{
    protected $model = ListingAgreementModel::class;

    public function definition(): array
    {
        return [
            'tenant_id' => TenantModel::factory(),
            'owner_id' => OwnerModel::factory(),
            'responsible_user_id' => User::factory(),
            'created_by' => User::factory(),
            'type' => ListingAgreementType::Exclusive,
            'status' => ListingAgreementStatus::Active,
            'starts_on' => now()->toDateString(),
            'ends_on' => now()->addMonths(6)->toDateString(),
            'commission_percent' => 5.0,
            'signed_at' => now(),
        ];
    }
}
