<?php

namespace App\Modules\HR\Shifts\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class ShiftRotationDay extends Model
{
    public $timestamps = false;

    protected $table = 'hr_shift_rotation_days';

    protected $fillable = ['rotation_id', 'day_number', 'shift_id', 'is_day_off'];

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

    public function shift(): BelongsTo
    {
        return $this->belongsTo(Shift::class);
    }
}
