<?php

namespace App\Models;

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

class Room extends Model
{
    use HasFactory;

    protected $fillable = [
        'name',
        'slug',
        'description',
        'short_description',
        'image',
        'images',
        'price_per_night',
        'max_adults',
        'max_children',
        'bed_type',
        'room_size',
        'amenities',
        'is_featured',
        'is_available',
    ];

    protected $casts = [
        'images' => 'array',
        'amenities' => 'array',
        'is_featured' => 'boolean',
        'is_available' => 'boolean',
        'price_per_night' => 'decimal:2',
    ];

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

