<?php

namespace Modules\Employee\Models;

use Illuminate\Database\Eloquent\Model;
use Modules\Core\Traits\HasStatus;
use Modules\Employee\Models\Traits\HasDesignations;

class StaffType extends Model
{
    use HasStatus,
        HasDesignations;

    /**
     * The attributes that are mass assignable.
     */
    protected $fillable = [
        'name',
        'status'
    ];

    public $timestamps = false;

    public function employees()
    {
        return $this->hasManyThrough(
            Employee::class,
            Designation::class
        );
    }
}
