2017-10-13 14:22:45 +00:00
|
|
|
{
|
2018-01-29 11:37:54 +00:00
|
|
|
"name": "Worker",
|
2018-01-29 18:57:00 +00:00
|
|
|
"description": "Company employees",
|
2017-10-13 14:22:45 +00:00
|
|
|
"base": "VnModel",
|
2018-01-29 11:37:54 +00:00
|
|
|
"options": {
|
|
|
|
"mysql": {
|
|
|
|
"table": "worker"
|
|
|
|
}
|
|
|
|
},
|
2017-10-13 14:22:45 +00:00
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "Number",
|
|
|
|
"id": true,
|
|
|
|
"description": "Identifier"
|
|
|
|
},
|
2018-01-29 11:37:54 +00:00
|
|
|
"firstName": {
|
2017-10-13 14:22:45 +00:00
|
|
|
"type": "string",
|
|
|
|
"required": true
|
|
|
|
},
|
2018-01-29 11:37:54 +00:00
|
|
|
"name": {
|
2017-10-13 14:22:45 +00:00
|
|
|
"type": "string",
|
|
|
|
"required": true
|
2018-04-20 13:16:03 +00:00
|
|
|
},
|
|
|
|
"userFk": {
|
|
|
|
"type" : "Number",
|
|
|
|
"required": true
|
2017-10-13 14:22:45 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"relations": {
|
|
|
|
"user": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Account",
|
|
|
|
"foreignKey": "userFk"
|
2018-12-12 13:30:48 +00:00
|
|
|
},
|
|
|
|
"collegues": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "WorkerTeamCollegues",
|
|
|
|
"foreignKey": "workerFk"
|
2017-10-13 14:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|