salix/services/loopback/common/models/worker.json

32 lines
528 B
JSON

{
"name": "Worker",
"description": "Company employees",
"base": "VnModel",
"options": {
"mysql": {
"table": "worker"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"firstName": {
"type": "string",
"required": true
},
"name": {
"type": "string",
"required": true
}
},
"relations": {
"user": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "userFk"
}
}
}