2017-10-13 14:22:45 +00:00
|
|
|
{
|
2019-02-01 08:31:01 +00:00
|
|
|
"name": "Worker",
|
|
|
|
"description": "Company employees",
|
2020-03-24 11:20:53 +00:00
|
|
|
"base": "Loggable",
|
|
|
|
"log": {
|
|
|
|
"model":"WorkerLog",
|
|
|
|
"showField": "firstName"
|
|
|
|
},
|
2019-02-01 08:31:01 +00:00
|
|
|
"options": {
|
|
|
|
"mysql": {
|
|
|
|
"table": "worker"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "Number",
|
|
|
|
"id": true,
|
|
|
|
"description": "Identifier"
|
|
|
|
},
|
|
|
|
"firstName": {
|
|
|
|
"type": "string",
|
|
|
|
"required": true
|
|
|
|
},
|
2019-02-27 12:10:26 +00:00
|
|
|
"lastName": {
|
2019-02-01 08:31:01 +00:00
|
|
|
"type": "string",
|
2019-08-27 09:12:17 +00:00
|
|
|
"required": true
|
2019-02-01 08:31:01 +00:00
|
|
|
},
|
|
|
|
"phone": {
|
|
|
|
"type" : "String"
|
|
|
|
},
|
|
|
|
"userFk": {
|
|
|
|
"type" : "Number",
|
|
|
|
"required": true
|
2020-09-22 11:59:00 +00:00
|
|
|
},
|
|
|
|
"bossFk": {
|
|
|
|
"type" : "Number"
|
2019-02-01 08:31:01 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"relations": {
|
|
|
|
"user": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Account",
|
|
|
|
"foreignKey": "userFk"
|
|
|
|
},
|
|
|
|
"client": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Client",
|
|
|
|
"foreignKey": "userFk"
|
|
|
|
},
|
|
|
|
"sip": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Sip",
|
|
|
|
"foreignKey": "userFk"
|
|
|
|
},
|
|
|
|
"department": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "WorkerDepartment",
|
|
|
|
"foreignKey": "id"
|
|
|
|
},
|
|
|
|
"collegues": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "WorkerTeamCollegues",
|
|
|
|
"foreignKey": "workerFk"
|
2021-02-19 16:45:45 +00:00
|
|
|
},
|
|
|
|
"boss": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Worker",
|
|
|
|
"foreignKey": "bossFk"
|
2019-02-01 08:31:01 +00:00
|
|
|
}
|
2018-01-29 11:37:54 +00:00
|
|
|
}
|
2017-10-13 14:22:45 +00:00
|
|
|
}
|