<?php

namespace App;

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

class Designations extends Model
{
    
    protected $fillable = [
        'title',
        'department_id',
        'created_by',
        'status',
    ];

    public function department()
    {
        return $this->belongsTo(Departments::class);
    }

    public function creator()
    {
        return $this->belongsTo(User::class, 'created_by');
    }
}