<?php

namespace App\Models\Machine;

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

class TimerStatus extends Model
{
    use HasFactory;

    protected $fillable = [
        'machine_id',
        'slot_no',
        'status',
        'remaining_seconds',
        'end_at',
    ];

    protected $casts = [
        'end_at' => 'datetime',
    ];

    public function machine()
    {
        return $this->belongsTo(Machine::class);
    }
}
