<?php

namespace App\Models;

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

class StaffDepartment extends Model
{
    use HasFactory, \App\Traits\HotelScopeTrait;

    protected $table = 'staff_departments';

    protected $fillable = [
        'hotel_id',
        'name',
        'description',
        'manager_id'
    ];

    public function staff()
    {
        return $this->hasMany(Staff::class);
    }

    public function manager()
    {
        return $this->belongsTo(Staff::class, 'manager_id');
    }
}