#954 ticket.descriptor añadir link a polizon

This commit is contained in:
Gerard 2019-01-18 13:34:50 +01:00
parent fc7b4e4eda
commit e9bc3f00a1
3 changed files with 48 additions and 0 deletions

View File

@ -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"
}
}
}

View File

@ -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",

View File

@ -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: {