28 lines
506 B
PHP
28 lines
506 B
PHP
<?php
|
|
|
|
namespace Modules\HRM\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Department extends Model
|
|
{
|
|
protected $fillable = [
|
|
'restaurant_id',
|
|
'parent_id',
|
|
'name',
|
|
'description',
|
|
'status',
|
|
'meta',
|
|
];
|
|
|
|
public const TABLE_NAME = 'departments';
|
|
|
|
protected $table = self::TABLE_NAME;
|
|
|
|
public function users(): HasMany
|
|
{
|
|
return $this->hasMany(Employee::class);
|
|
}
|
|
}
|