<?php

declare(strict_types=1);

namespace Database\Factories;

use App\Domain\Account\Models\Account;
use App\Domain\Email\Models\EmailForwarder;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends Factory<EmailForwarder>
 */
class EmailForwarderFactory extends Factory
{
    protected $model = EmailForwarder::class;

    public function definition(): array
    {
        $domain = $this->faker->domainName();

        return [
            'account_id' => Account::factory()->active(),
            'source' => $this->faker->userName().'@'.$domain,
            'destinations' => [$this->faker->safeEmail()],
            'keep_local_copy' => false,
            'is_active' => true,
        ];
    }
}
