<?php

namespace Database\Factories;

use App\Models\Customer;
use App\Models\Seat;
use Illuminate\Database\Eloquent\Factories\Factory;

/** @extends Factory<Seat> */
class SeatFactory extends Factory
{
    protected $model = Seat::class;

    public function definition(): array
    {
        return [
            'customer_id' => Customer::factory(),
            'email' => 'seat-'.$this->faker->unique()->numerify('########').'@example.test',
            'name' => $this->faker->name(),
            'role' => 'member',
            'status' => 'active',
            'invited_at' => now(),
        ];
    }

    public function owner(): static
    {
        return $this->state(['role' => 'owner', 'status' => 'active']);
    }
}
