42 lines
859 B
PHP
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');
|
|
}
|
|
|
|
} |