salix/back/models/worker.json

41 lines
719 B
JSON
Raw Normal View History

2017-10-13 14:22:45 +00:00
{
"name": "Worker",
"description": "Company employees",
2017-10-13 14:22:45 +00:00
"base": "VnModel",
"options": {
"mysql": {
"table": "worker"
}
},
2017-10-13 14:22:45 +00:00
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"firstName": {
2017-10-13 14:22:45 +00:00
"type": "string",
"required": true
},
"name": {
2017-10-13 14:22:45 +00:00
"type": "string",
"required": true
},
"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
}
}
}