55 lines
849 B
JSON
55 lines
849 B
JSON
{
|
|
"name": "ClientObservation",
|
|
"description": "Client notes",
|
|
"base": "Loggable",
|
|
"options": {
|
|
"mysql": {
|
|
"table": "clientObservation"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"id": true,
|
|
"description": "Identifier"
|
|
},
|
|
"clientFk": {
|
|
"type": "number"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "Text"
|
|
},
|
|
"created": {
|
|
"type": "date",
|
|
"description": "Creation date and time"
|
|
}
|
|
},
|
|
"relations": {
|
|
"worker": {
|
|
"type": "belongsTo",
|
|
"model": "Worker",
|
|
"foreignKey": "workerFk"
|
|
},
|
|
"client": {
|
|
"type": "belongsTo",
|
|
"model": "Client",
|
|
"foreignKey": "clientFk"
|
|
}
|
|
},
|
|
"scope": {
|
|
"include": {
|
|
"relation": "worker",
|
|
"scope": {
|
|
"fields": ["id"],
|
|
"include": {
|
|
"relation": "user",
|
|
"scope": {
|
|
"fields": ["nickname"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|