<?php

declare(strict_types=1);

namespace Database\Factories;

use App\Models\Tenant;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

/**
 * @extends Factory<Tenant>
 */
class TenantFactory extends Factory
{
    /**
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'subdomain' => 'tenant-'.Str::lower(Str::random(8)),
            'organization_name' => fake()->company(),
            'contact_email' => fake()->unique()->safeEmail(),
            'webhook_token' => Str::random(64),
            'timezone' => 'Europe/Moscow',
            'locale' => 'ru',
            'is_trial' => true,
            'api_key_limit' => 5,
        ];
    }
}
