IMMREX7
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Traits;
class SalaryStructure extends Model {
use Traits\AutoUpdateUserColumns;
protected $primaryKey = 'idSalaryStr';
protected $table = 'salary_structure';
protected $fillable = ['idSchool', 'idDepartment', 'idDesignation', 'idFinancialYear', 'idEmployee'];
public function department() {
return $this->belongsTo(Department::class, 'idDepartment', 'idDepartment');
}
public function designation() {
return $this->belongsTo(Designation::class, 'idDesignation', 'idDesignation');
}
public function employee() {
return $this->belongsTo(Employee::class, 'idEmployee', 'idEmployee');
}
public function allowances() {
return $this->hasMany(SalaryStrAllowances::class, 'idSalaryStr', 'idSalaryStr');
}
public function deductions() {
return $this->hasMany(SalaryStrDeduction::class, 'idSalaryStr', 'idSalaryStr');
}
}
Copyright © 2021 -