salix/modules/client/back/models/receipt.json

70 lines
1.5 KiB
JSON

{
"name": "Receipt",
"base": "VnModel",
"options": {
"mysql": {
"table": "receipt"
}
},
"properties": {
"id": {
"id": true,
"type": "number",
"description": "Identifier"
},
"amountPaid": {
"type": "number",
"required": true
},
"amountUnpaid": {
"type": "number"
},
"payed": {
"type": "date",
"required": true
},
"created": {
"type": "date"
},
"isConciliate": {
"type": "date"
},
"description": {
"type": "string",
"mysql": {
"columnName": "invoiceFk"
},
"required": true
},
"bankFk": {
"type": "number",
"required": true
},
"companyFk": {
"type": "number",
"required": true
}
},
"relations": {
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "clientFk"
},
"company": {
"type": "belongsTo",
"model": "Company",
"foreignKey": "companyFk"
},
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
},
"bank": {
"type": "belongsTo",
"model": "Bank",
"foreignKey": "bankFk"
}
}
}