2019-03-28 10:55:23 +00:00
|
|
|
{
|
|
|
|
"name": "InvoiceOut",
|
|
|
|
"base": "VnModel",
|
|
|
|
"options": {
|
|
|
|
"mysql": {
|
|
|
|
"table": "invoiceOut"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"id": true,
|
|
|
|
"type": "Number",
|
|
|
|
"description": "Identifier"
|
|
|
|
},
|
|
|
|
"ref": {
|
|
|
|
"type": "String",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
"serial": {
|
|
|
|
"type": "String"
|
|
|
|
},
|
|
|
|
"issued": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"amount": {
|
|
|
|
"type": "Number"
|
|
|
|
},
|
|
|
|
"created": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"dued": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"booked": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"hasPdf": {
|
2019-04-26 06:52:43 +00:00
|
|
|
"type": "Boolean",
|
2019-03-28 10:55:23 +00:00
|
|
|
"mysql": {
|
|
|
|
"columnName": "pdf"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"relations": {
|
|
|
|
"client": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Client",
|
|
|
|
"foreignKey": "clientFk"
|
|
|
|
},
|
|
|
|
"company": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Company",
|
|
|
|
"foreignKey": "companyFk",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
"supplier": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Supplier",
|
|
|
|
"foreignKey": "companyFk",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
"tickets": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "Ticket",
|
|
|
|
"foreignKey": "refFk",
|
|
|
|
"primaryKey": "ref"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|