<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class Guest extends Authenticatable
{
    use HasFactory;
    use Notifiable;

    protected $fillable = [
        'full_name',
        'phone',
        'email',
        'language',
        'password',
        'discount_percent',
        'discount_code',
        'status',
        'notes',
        'admin_rating',
        'documents_folder',
        'privacy_consent',
    ];

    protected $hidden = [
        'password',
        'remember_token',
    ];

    protected function casts(): array
    {
        return [
            'discount_percent' => 'integer',
            'admin_rating' => 'integer',
            'privacy_consent' => 'boolean',
            'password' => 'hashed',
        ];
    }

    public function bookings()
    {
        return $this->hasMany(Booking::class);
    }
}
