salix/modules/entry/back/models/entry.json

115 lines
2.5 KiB
JSON

{
"name": "Entry",
"base": "VnModel",
"mixins": {
"Loggable": true
},
"options": {
"mysql": {
"table": "entry"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"dated": {
"type": "date"
},
"reference": {
"type": "string"
},
"invoiceNumber": {
"type": "string"
},
"isBooked": {
"type": "boolean"
},
"isExcludedFromAvailable": {
"type": "boolean"
},
"isConfirmed": {
"type": "boolean"
},
"isVirtual": {
"type": "boolean",
"mysql": {
"columnName": "isRaid"
}
},
"isRaid": {
"type": "boolean"
},
"commission": {
"type": "number"
},
"isOrdered": {
"type": "boolean"
},
"created": {
"type": "date"
},
"observation": {
"type": "string",
"mysql": {
"columnName": "evaNotes"
}
},
"loadPriority": {
"type": "number"
},
"supplierFk": {
"type": "number",
"required": true
},
"travelFk": {
"type": "number",
"required": true
},
"companyFk": {
"type": "number",
"required": true
},
"observationEditorFk": {
"type": "number"
},
"invoiceAmount": {
"type": "number"
}
},
"relations": {
"supplier": {
"type": "belongsTo",
"model": "Supplier",
"foreignKey": "supplierFk"
},
"travel": {
"type": "belongsTo",
"model": "Travel",
"foreignKey": "travelFk"
},
"company": {
"type": "belongsTo",
"model": "Company",
"foreignKey": "companyFk"
},
"currency": {
"type": "belongsTo",
"model": "Currency",
"foreignKey": "currencyFk"
},
"observationEditor": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "observationEditorFk"
},
"entryType": {
"type": "belongsTo",
"model": "EntryType",
"foreignKey": "typeFk"
}
}
}