<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use ImovelZapAi\Organizations\Domain\Enums\SubscriptionStatus;
use ImovelZapAi\Organizations\Infrastructure\Persistence\Eloquent\OrganizationSubscriptionModel;
use ImovelZapAi\Organizations\Infrastructure\Persistence\Eloquent\SubscriptionPlanModel;
use ImovelZapAi\Tenancy\Infrastructure\Persistence\Eloquent\TenantModel;

/**
 * @extends Factory<OrganizationSubscriptionModel>
 */
class OrganizationSubscriptionFactory extends Factory
{
    protected $model = OrganizationSubscriptionModel::class;

    /**
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'tenant_id' => TenantModel::factory(),
            'subscription_plan_id' => SubscriptionPlanModel::factory(),
            'status' => SubscriptionStatus::Trialing,
            'trial_ends_at' => now()->addDays(14),
            'current_period_ends_at' => now()->addDays(14),
        ];
    }
}
