salix/modules/ticket/back/models/ticket.json

145 lines
3.3 KiB
JSON

{
"name": "Ticket",
"base": "VnModel",
"mixins": {
"Loggable": true
},
"options": {
"mysql": {
"table": "ticket"
}
},
"properties": {
"id": {
"id": true,
"type": "number",
"description": "Identifier"
},
"shipped": {
"type": "date",
"required": true
},
"landed": {
"type": "date"
},
"nickname": {
"type": "string"
},
"location": {
"type": "string"
},
"solution": {
"type": "string"
},
"packages": {
"type": "number"
},
"updated": {
"type": "date",
"mysql": {
"columnName": "created"
}
},
"isDeleted": {
"type": "boolean"
},
"isSigned": {
"type": "boolean"
},
"priority": {
"type": "number"
},
"zoneFk": {
"type": "number"
},
"zonePrice": {
"type": "number"
},
"zoneBonus": {
"type": "number"
},
"totalWithVat": {
"type": "number"
},
"totalWithoutVat": {
"type": "number"
},
"weight": {
"type": "number"
}
},
"relations": {
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "clientFk"
},
"warehouse": {
"type": "belongsTo",
"model": "Warehouse",
"foreignKey": "warehouseFk"
},
"invoiceOut": {
"type": "belongsTo",
"model": "InvoiceOut",
"foreignKey": "refFk",
"primaryKey": "ref"
},
"address": {
"type": "belongsTo",
"model": "Address",
"foreignKey": "addressFk"
},
"route": {
"type": "belongsTo",
"model": "Route",
"foreignKey": "routeFk"
},
"company": {
"type": "belongsTo",
"model": "Company",
"foreignKey": "companyFk"
},
"agencyMode": {
"type": "belongsTo",
"model": "AgencyMode",
"foreignKey": "agencyModeFk"
},
"packages": {
"type": "hasMany",
"model": "TicketPackaging",
"foreignKey": "ticketFk"
},
"ticketSales": {
"type": "hasMany",
"model": "Sale",
"foreignKey": "ticketFk"
},
"ticketServices": {
"type": "hasMany",
"model": "TicketService",
"foreignKey": "ticketFk"
},
"tracking": {
"type": "hasMany",
"model": "TicketTracking",
"foreignKey": "ticketFk"
},
"notes": {
"type": "hasMany",
"model": "TicketObservation",
"foreignKey": "ticketFk"
},
"ticketState": {
"type": "hasOne",
"model": "TicketState",
"foreignKey": "ticketFk"
},
"zone": {
"type": "belongsTo",
"model": "Zone",
"foreignKey": "zoneFk"
}
}
}