StocksNew/Modules/Payroll/app/Models/Payment.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

42 lines
859 B
PHP

<?php
namespace Modules\Payroll\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Employee\Models\Employee;
use Modules\Payroll\Database\factories\PaymentFactory;
class Payment extends Model
{
use HasFactory;
protected $table = "tbl_payments";
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'employee_id',
'account_no',
'paid_date',
'paid_amount',
'payment_mode',
'status',
'description',
'remarks',
'createdBy',
'updatedBy',
];
const PAYMENT_MODE = [
'check' => 'Check',
'online' => 'Online',
'cash' => 'Cash'
];
public function employee(){
return $this->belongsTo(Employee::class,'employee_id');
}
}