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

138 lines
3.2 KiB
JSON

{
"name": "Ticket",
"base": "Loggable",
"log": {
"model":"TicketLog"
},
"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"
},
"priority": {
"type": "number"
},
"zoneFk": {
"type": "number"
},
"zonePrice": {
"type": "number"
},
"zoneBonus": {
"type": "number"
},
"totalWithVat": {
"type": "number"
},
"totalWithoutVat": {
"type": "number"
}
},
"relations": {
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "clientFk"
},
"ship": {
"type": "hasOne",
"model": "Stowaway",
"foreignKey": "shipFk"
},
"stowaway": {
"type": "hasOne",
"model": "Stowaway",
"foreignKey": "id"
},
"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"
},
"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"
}
}
}