芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/erp.digitalhubbd.com/app/Models/Employee.php
'integer', 'company_id' => 'integer', 'department_id' => 'integer', 'designation_id' => 'integer', 'office_shift_id' => 'integer', 'hourly_rate' => 'double', 'basic_salary' => 'integer', 'remaining_leave' => 'integer', 'total_leave' => 'integer', ]; public function company() { return $this->hasOne('App\Models\Company', 'id', 'company_id'); } public function department() { return $this->hasOne('App\Models\Department', 'id', 'department_id'); } public function designation() { return $this->hasOne('App\Models\Designation', 'id', 'designation_id'); } public function office_shift() { return $this->hasOne('App\Models\OfficeShift', 'id', 'office_shift_id'); } public function attendance() { return $this->hasMany(Attendance::class); } public function leave() { return $this->hasMany(Leave::class) ->select('id','employee_id','start_date','end_date','status') ->where('status' , 'approved'); } }