55 lines
1.2 KiB
JSON
55 lines
1.2 KiB
JSON
{
|
|
"name": "WorkerLabour",
|
|
"base": "VnModel",
|
|
"options": {
|
|
"mysql": {
|
|
"table": "workerLabour"
|
|
}
|
|
},
|
|
"properties": {
|
|
"businessFk": {
|
|
"id": true,
|
|
"type": "Number"
|
|
},
|
|
"workerFk": {
|
|
"type": "Number"
|
|
},
|
|
"started": {
|
|
"type": "date"
|
|
},
|
|
"ended": {
|
|
"type": "date"
|
|
},
|
|
"payedHolidays": {
|
|
"type": "Number"
|
|
}
|
|
},
|
|
"relations": {
|
|
"worker": {
|
|
"type": "belongsTo",
|
|
"model": "Worker",
|
|
"foreignKey": "workerFk"
|
|
},
|
|
"department": {
|
|
"type": "belongsTo",
|
|
"model": "Department",
|
|
"foreignKey": "departmentFk"
|
|
},
|
|
"workCenter": {
|
|
"type": "belongsTo",
|
|
"model": "WorkCenter",
|
|
"foreignKey": "workCenterFk"
|
|
},
|
|
"holidays": {
|
|
"type": "belongsTo",
|
|
"model": "WorkCenterHoliday",
|
|
"foreignKey": "workCenterFk"
|
|
},
|
|
"absences": {
|
|
"type": "hasMany",
|
|
"model": "Calendar",
|
|
"foreignKey": "businessFk"
|
|
}
|
|
}
|
|
}
|