39 lines
802 B
PHP
39 lines
802 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Modules\HRM\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class SalaryGenerate extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [
|
||
|
|
'restaurant_id',
|
||
|
|
'employee_id',
|
||
|
|
'month',
|
||
|
|
'basic_salary',
|
||
|
|
'total_earnings',
|
||
|
|
'total_deductions',
|
||
|
|
'overtime_hours',
|
||
|
|
'overtime_amount',
|
||
|
|
'net_salary',
|
||
|
|
'generated_date',
|
||
|
|
'generated_by',
|
||
|
|
'status',
|
||
|
|
'salary_breakdown',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'salary_breakdown' => 'array',
|
||
|
|
];
|
||
|
|
|
||
|
|
public const TABLE_NAME = 'salary_generates';
|
||
|
|
|
||
|
|
protected $table = self::TABLE_NAME;
|
||
|
|
|
||
|
|
public function employee(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Employee::class, 'user_id');
|
||
|
|
}
|
||
|
|
}
|