hedera-front/back/common/models/ticket.json

66 lines
1.0 KiB
JSON

{
"name": "Ticket",
"base": "PersistedModel",
"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"
},
"priority": {
"type": "Number"
}
},
"relations": {
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "clientFk"
},
"warehouse": {
"type": "belongsTo",
"model": "Warehouse",
"foreignKey": "warehouseFk"
},
"address": {
"type": "belongsTo",
"model": "Address",
"foreignKey": "addressFk"
},
"state": {
"type": "hasOne",
"model": "TicketState",
"foreignKey": "ticketFk"
}
}
}