73 lines
1.6 KiB
JSON
73 lines
1.6 KiB
JSON
{
|
|
"name": "Receipt",
|
|
"base": "VnModel",
|
|
"options": {
|
|
"mysql": {
|
|
"table": "receipt"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"id": true,
|
|
"type": "number",
|
|
"description": "Identifier"
|
|
},
|
|
"amountPaid": {
|
|
"type": "number",
|
|
"required": true
|
|
},
|
|
"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"
|
|
},
|
|
"supplier": {
|
|
"type": "belongsTo",
|
|
"model": "Supplier",
|
|
"foreignKey": "companyFk"
|
|
}
|
|
}
|
|
}
|