<?php

namespace App\Models;

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

class RoomStatusLog extends Model
{
    use HasFactory;

    public $timestamps = true;

    protected $fillable = 
    [
        'room_id', 
        'user_id', 
        'status', 
        'message', 
    ];

    protected $casts = [
        'status' => \App\Enums\RoomStatus::class,
    ];
    public function user(){
        return $this->belongsTo(User::class);
    }
    public function room() {
        return $this->belongsTo(Room::class);
    }
    
}
