38 lines
795 B
PHP
38 lines
795 B
PHP
<?php
|
|
|
|
namespace Modules\Employee\Models;
|
|
|
|
use App\Models\User;
|
|
use App\Traits\CreatedUpdatedBy;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Modules\Employee\Database\Factories\DesignationFactory;
|
|
|
|
class Designation extends Model
|
|
{
|
|
use HasFactory, CreatedUpdatedBy;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'title',
|
|
'slug',
|
|
'status',
|
|
'order',
|
|
'department_id',
|
|
'createdby',
|
|
'updatedby',
|
|
];
|
|
|
|
public function department()
|
|
{
|
|
return $this->belongsTo(Department::class, 'department_id');
|
|
}
|
|
|
|
protected static function newFactory(): DesignationFactory
|
|
{
|
|
return DesignationFactory::new();
|
|
}
|
|
}
|