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

121 lines
2.8 KiB
JSON
Raw Normal View History

{
"name": "Ticket",
2019-03-27 07:56:25 +00:00
"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"
},
"created": {
"type": "Date"
},
"isDeleted": {
"type": "boolean"
2019-03-22 11:34:42 +00:00
},
"priority": {
"type": "Number"
}
},
"relations": {
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "clientFk"
},
"ship": {
2019-12-17 07:38:36 +00:00
"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",
2019-03-28 10:55:23 +00:00
"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",
"required": true
},
"packages": {
"type": "hasMany",
"model": "TicketPackaging",
"foreignKey": "ticketFk"
},
"tracking": {
"type": "hasMany",
"model": "TicketTracking",
"foreignKey": "ticketFk"
},
"notes": {
"type": "hasMany",
"model": "TicketObservation",
"foreignKey": "ticketFk"
},
"state": {
"type": "hasOne",
"model": "TicketState",
"foreignKey": "ticketFk"
2019-05-09 09:25:46 +00:00
},
"zone": {
"type": "belongsTo",
2019-05-09 09:25:46 +00:00
"model": "Zone",
"foreignKey": "zoneFk"
}
}
}