migrate to gtea from bistbucket
This commit is contained in:
33
public/restaurant/Modules/HRM/app/Models/Designation.php
Normal file
33
public/restaurant/Modules/HRM/app/Models/Designation.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HRM\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Designation extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'restaurant_id',
|
||||
'department_id',
|
||||
'title',
|
||||
'description',
|
||||
'status',
|
||||
'meta',
|
||||
];
|
||||
|
||||
public const TABLE_NAME = 'designations';
|
||||
|
||||
protected $table = self::TABLE_NAME;
|
||||
|
||||
public function department(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Department::class)->select('id', 'parent_id', 'name');
|
||||
}
|
||||
|
||||
public function users(): HasMany
|
||||
{
|
||||
return $this->hasMany(Employee::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user