#954 ticket.descriptor añadir link a polizon
This commit is contained in:
parent
fc7b4e4eda
commit
e9bc3f00a1
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "Stowaway",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "stowaway"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"id": true,
|
||||
"type": "Number",
|
||||
"forceId": false
|
||||
},
|
||||
"shipFk": {
|
||||
"type": "Number",
|
||||
"required": false
|
||||
},
|
||||
"created":{
|
||||
"type": "Date",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"ship": {
|
||||
"type": "belongsTo",
|
||||
"model": "Ticket",
|
||||
"foreignKey": "shipFk"
|
||||
},
|
||||
"ticket": {
|
||||
"type": "belongsTo",
|
||||
"model": "Ticket",
|
||||
"foreignKey": "id"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -44,6 +44,16 @@
|
|||
"model": "Client",
|
||||
"foreignKey": "clientFk"
|
||||
},
|
||||
"ship": {
|
||||
"type": "hasMany",
|
||||
"model": "Stowaway",
|
||||
"foreignKey": "shipFk"
|
||||
},
|
||||
"stowaway": {
|
||||
"type": "hasOne",
|
||||
"model": "Stowaway",
|
||||
"foreignKey": "id"
|
||||
},
|
||||
"warehouse": {
|
||||
"type": "belongsTo",
|
||||
"model": "Warehouse",
|
||||
|
|
|
@ -7,7 +7,9 @@ class Controller {
|
|||
this.filter = {
|
||||
include: [
|
||||
{relation: 'warehouse', scope: {fields: ['name']}},
|
||||
{relation: 'ship'},
|
||||
{relation: 'agencyMode', scope: {fields: ['name']}},
|
||||
{relation: 'stowaway'},
|
||||
{
|
||||
relation: 'client',
|
||||
scope: {
|
||||
|
|
Loading…
Reference in New Issue