Files
kulakpos_web/public/restaurant/Modules/HRM/app/Models/SalaryGenerate.php

39 lines
802 B
PHP
Raw Normal View History

2026-03-15 17:08:23 +07:00
<?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');
}
}