#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",
|
"model": "Client",
|
||||||
"foreignKey": "clientFk"
|
"foreignKey": "clientFk"
|
||||||
},
|
},
|
||||||
|
"ship": {
|
||||||
|
"type": "hasMany",
|
||||||
|
"model": "Stowaway",
|
||||||
|
"foreignKey": "shipFk"
|
||||||
|
},
|
||||||
|
"stowaway": {
|
||||||
|
"type": "hasOne",
|
||||||
|
"model": "Stowaway",
|
||||||
|
"foreignKey": "id"
|
||||||
|
},
|
||||||
"warehouse": {
|
"warehouse": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Warehouse",
|
"model": "Warehouse",
|
||||||
|
|
|
@ -7,7 +7,9 @@ class Controller {
|
||||||
this.filter = {
|
this.filter = {
|
||||||
include: [
|
include: [
|
||||||
{relation: 'warehouse', scope: {fields: ['name']}},
|
{relation: 'warehouse', scope: {fields: ['name']}},
|
||||||
|
{relation: 'ship'},
|
||||||
{relation: 'agencyMode', scope: {fields: ['name']}},
|
{relation: 'agencyMode', scope: {fields: ['name']}},
|
||||||
|
{relation: 'stowaway'},
|
||||||
{
|
{
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
scope: {
|
scope: {
|
||||||
|
|
Loading…
Reference in New Issue