salix/modules/invoiceOut/back/models/invoice-out.json

69 lines
1.4 KiB
JSON

{
"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": {
"type": "boolean"
}
},
"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"
}
}
}