2018-03-12 12:55:18 +00:00
|
|
|
{
|
|
|
|
"name": "Ticket",
|
|
|
|
"base": "VnModel",
|
|
|
|
"options": {
|
2018-11-14 13:33:25 +00:00
|
|
|
"mysql": {
|
2018-03-12 12:55:18 +00:00
|
|
|
"table": "ticket"
|
2018-11-14 13:33:25 +00:00
|
|
|
}
|
2018-03-12 12:55:18 +00:00
|
|
|
},
|
|
|
|
"properties": {
|
2018-11-14 13:33:25 +00:00
|
|
|
"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"
|
|
|
|
},
|
|
|
|
"created": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"isDeleted": {
|
|
|
|
"type": "boolean"
|
|
|
|
}
|
2018-03-12 12:55:18 +00:00
|
|
|
},
|
|
|
|
"relations": {
|
2018-11-14 13:33:25 +00:00
|
|
|
"client": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Client",
|
|
|
|
"foreignKey": "clientFk"
|
|
|
|
},
|
|
|
|
"warehouse": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Warehouse",
|
|
|
|
"foreignKey": "warehouseFk"
|
|
|
|
},
|
|
|
|
"invoiceOut": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "InvoiceOut",
|
|
|
|
"foreignKey": "refFk"
|
|
|
|
},
|
|
|
|
"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",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
"packages": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "TicketPackaging",
|
|
|
|
"foreignKey": "ticketFk"
|
|
|
|
},
|
|
|
|
"tracking": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "TicketTracking",
|
|
|
|
"foreignKey": "ticketFk"
|
|
|
|
},
|
|
|
|
"notes": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "TicketObservation",
|
|
|
|
"foreignKey": "ticketFk"
|
|
|
|
},
|
|
|
|
"alertLevel": {
|
|
|
|
"type": "hasOne",
|
|
|
|
"model": "TicketState",
|
|
|
|
"foreignKey": "ticketFk"
|
|
|
|
},
|
|
|
|
"state": {
|
|
|
|
"type": "hasOne",
|
|
|
|
"model": "TicketState",
|
|
|
|
"foreignKey": "ticketFk"
|
|
|
|
}
|
2018-03-12 12:55:18 +00:00
|
|
|
}
|
2018-11-14 13:33:25 +00:00
|
|
|
}
|