<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class BookingRoomDay extends Model
{
    use HasFactory;

    protected $fillable = [
        'room_id',
        'booking_id',
        'booking_block_id',
        'date',
        'source',
    ];

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

    public function room()
    {
        return $this->belongsTo(Room::class);
    }

    public function booking()
    {
        return $this->belongsTo(Booking::class);
    }

    public function bookingBlock()
    {
        return $this->belongsTo(BookingBlock::class);
    }
}
