<?php

namespace App\Models;

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

class Shift extends Model
{
    use HasFactory;

    public $timestamps = false;

    protected $primaryKey = 'shift_id';

    protected $fillable = [
        'shift_name',
    ];

    /**
     * Get the staff for this shift.
     */
    public function staff()
    {
        return $this->hasMany(Staff::class, 'shift_id');
    }

    /**
     * Get the employee histories for this shift.
     */
    public function empHistories()
    {
        return $this->hasMany(EmpHistory::class, 'shift_id');
    }
}
