Relaciones arregladas
This commit is contained in:
parent
8ce3325f06
commit
b7fb0bca98
|
@ -8,9 +8,6 @@
|
|||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"clientFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"consignee": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
|
@ -26,9 +23,6 @@
|
|||
"postcode": {
|
||||
"type": "string"
|
||||
},
|
||||
"provinceFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -41,9 +35,6 @@
|
|||
"default": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"defaultAgencyFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"longitude": {
|
||||
"type": "Number"
|
||||
},
|
||||
|
@ -53,20 +44,20 @@
|
|||
},
|
||||
"validations": [],
|
||||
"relations": {
|
||||
"countryFk": {
|
||||
"type": "hasOne",
|
||||
"model": "Country",
|
||||
"foreignKey": "id"
|
||||
"provinceFk": {
|
||||
"type": "belongsTo",
|
||||
"model": "Province",
|
||||
"foreignKey": "provinceFk"
|
||||
},
|
||||
"clientFk": {
|
||||
"type": "hasOne",
|
||||
"type": "belongsTo",
|
||||
"model": "Client",
|
||||
"foreignKey": "id"
|
||||
"foreignKey": "clientFk"
|
||||
},
|
||||
"defaultAgencyFk": {
|
||||
"type": "hasOne",
|
||||
"type": "belongsTo",
|
||||
"model": "Agency",
|
||||
"foreignKey": "id"
|
||||
"foreignKey": "defaultAgencyFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -15,15 +15,9 @@
|
|||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"agencyTypeFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"m3": {
|
||||
"type": "Number"
|
||||
},
|
||||
"agencyFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"inflation": {
|
||||
"type": "Number"
|
||||
},
|
||||
|
@ -31,6 +25,18 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"agencyFk": {
|
||||
"type": "belongsTo",
|
||||
"model": "Agency",
|
||||
"foreignKey": "agencyFk"
|
||||
},
|
||||
"agencyTypeFk": {
|
||||
"type": "belongsTo",
|
||||
"model": "AgencyType",
|
||||
"foreignKey": "agencyTypeFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "*",
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
{
|
||||
"name": "Client",
|
||||
"base": "MyModel",
|
||||
"scopes": {
|
||||
"test": {
|
||||
"where": {
|
||||
"name": "Verdnatura"
|
||||
}
|
||||
}
|
||||
},
|
||||
"validateUpsert": true,
|
||||
"properties": {
|
||||
"id": {
|
||||
|
@ -41,12 +34,6 @@
|
|||
"postcode": {
|
||||
"type": "string"
|
||||
},
|
||||
"provinceFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"countryFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -86,15 +73,6 @@
|
|||
"type": "boolean",
|
||||
"description": "Send invoices by email"
|
||||
},
|
||||
"payMethodFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"salesPersonFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"contactChannelFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"sepaVnl": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
@ -126,29 +104,39 @@
|
|||
"validations": [],
|
||||
"relations": {
|
||||
"accountFk": {
|
||||
"type": "hasOne",
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "id"
|
||||
},
|
||||
"payMethodFk": {
|
||||
"type": "hasOne",
|
||||
"type": "belongsTo",
|
||||
"model": "PayMethod",
|
||||
"foreignKey": "id"
|
||||
"foreignKey": "payMethodFk"
|
||||
},
|
||||
"salesPersonFk": {
|
||||
"type": "hasOne",
|
||||
"type": "belongsTo",
|
||||
"model": "Employee",
|
||||
"foreignKey": "id"
|
||||
"foreignKey": "salesPersonFk"
|
||||
},
|
||||
"provinceFk":{
|
||||
"type": "belongsTo",
|
||||
"model": "Province",
|
||||
"foreignKey": "provinceFk"
|
||||
},
|
||||
"countryFk":{
|
||||
"type": "belongsTo",
|
||||
"model": "Country",
|
||||
"foreignKey": "countryFk"
|
||||
},
|
||||
"contactChannelFk":{
|
||||
"type": "belongsTo",
|
||||
"model": "ContactChannel",
|
||||
"foreignKey": "contactChannelFk"
|
||||
},
|
||||
"addressesFk": {
|
||||
"type": "hasMany",
|
||||
"model": "Address",
|
||||
"foreignKey": "clientFk"
|
||||
},
|
||||
"chanelFK":{
|
||||
"type": "hasOne",
|
||||
"model": "ContactChannel",
|
||||
"foreignKey": "contactChannelFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
@ -159,5 +147,12 @@
|
|||
"permission": "ALLOW"
|
||||
}
|
||||
],
|
||||
"methods": {}
|
||||
"methods": {},
|
||||
"scopes": {
|
||||
"test": {
|
||||
"where": {
|
||||
"name": "Verdnatura"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,28 +12,28 @@
|
|||
"clientFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"employeeFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "Text"
|
||||
},
|
||||
"employeeFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"creationTime": {
|
||||
"type": "date",
|
||||
"description": "Creation date and time"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"employeeFk": {
|
||||
"type": "hasOne",
|
||||
"model": "Employee",
|
||||
"foreignKey": "id"
|
||||
},
|
||||
"clientFk": {
|
||||
"type": "hasOne",
|
||||
"model": "Client",
|
||||
"foreignKey": "id"
|
||||
},
|
||||
"employeeFk": {
|
||||
"type": "hasOne",
|
||||
"model": "Employee",
|
||||
"foreignKey": "id"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -17,12 +17,18 @@
|
|||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"currencyFk": {
|
||||
"type": "Number"
|
||||
"type": "belongsTo",
|
||||
"model": "Currency",
|
||||
"foreignKey": "currencyFk"
|
||||
},
|
||||
"realCountryFk": {
|
||||
"type": "Number"
|
||||
"type": "belongsTo",
|
||||
"model": "Country",
|
||||
"foreignKey": "realCountryFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -11,10 +11,13 @@
|
|||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"userFk": {
|
||||
"type": "Number",
|
||||
"required": true
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -11,22 +11,23 @@
|
|||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"countryFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"warehouseFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"zoneFk": {
|
||||
"type": "Number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"countryFk": {
|
||||
"type": "hasOne",
|
||||
"type": "belongsTo",
|
||||
"model": "Country",
|
||||
"foreignKey": "id"
|
||||
"foreignKey": "countryFk"
|
||||
},
|
||||
"warehouseFk": {
|
||||
"type": "belongsTo",
|
||||
"model": "Warehouse",
|
||||
"foreignKey": "warehouseFk"
|
||||
},
|
||||
"zoneFk": {
|
||||
"type": "belongsTo",
|
||||
"model": "Zone",
|
||||
"foreignKey": "zoneFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"dataSource": "vn",
|
||||
"public": true
|
||||
},
|
||||
"Employee": {
|
||||
"ClientObservation": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
},
|
||||
|
@ -62,10 +62,6 @@
|
|||
"dataSource": "vn",
|
||||
"public": true
|
||||
},
|
||||
"ClientObservation": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
},
|
||||
"Account": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
|
@ -73,5 +69,9 @@
|
|||
"ContactChannel": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
},
|
||||
"Employee": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue