<?php

namespace App\Models;

use App\Models\Concerns\HasUuid;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Seat extends Model
{
    /** @use HasFactory<\Database\Factories\SeatFactory> */
    use HasFactory, HasUuid;

    public const ROLES = ['owner', 'admin', 'member', 'readonly'];

    protected $fillable = ['customer_id', 'email', 'name', 'role', 'status', 'invited_at'];

    protected function casts(): array
    {
        return ['invited_at' => 'datetime'];
    }

    public function customer(): BelongsTo
    {
        return $this->belongsTo(Customer::class);
    }
}
