feat(mylogger): refs #6533 #6533 export logs.local.yml into each model.json

This commit is contained in:
Javier Segarra 2024-04-25 07:33:46 +02:00
parent 6ee28d56b2
commit dee1510bb6
16 changed files with 732 additions and 431 deletions

View File

@ -1,12 +1,30 @@
{ {
"name": "VnRole", "name": "VnRole",
"base": "Role", "base": "Role",
"validateUpsert": true, "validateUpsert": true,
"options": { "options": {
"mysql": { "mysql": {
"table": "account.role" "table": "account.role"
} }
}, },
"log": {
"schema": "account",
"logTable": "roleLog",
"mainTable": "role",
"tables": [
{
"name": "role",
"exclude": [
"modified"
]
},
{
"name": "roleInherit",
"relation": "role",
"showRelation": "inheritsFrom"
}
]
},
"mixins": { "mixins": {
"Loggable": true "Loggable": true
} }

View File

@ -10,6 +10,34 @@
"mixins": { "mixins": {
"Loggable": true "Loggable": true
}, },
"log": {
"schema": "account",
"logTable": "userLog",
"mainTable": "user",
"tables": [
{
"name": "user",
"modelName": "VnUser",
"exclude": [
"bcryptPassword",
"password",
"verificationToken"
]
},
{
"name": "account",
"relation": "id"
},
{
"name": "mailAliasAccount",
"relation": "account"
},
{
"name": "mailForward",
"relation": "account"
}
]
},
"resetPasswordTokenTTL": "604800", "resetPasswordTokenTTL": "604800",
"properties": { "properties": {
"id": { "id": {

View File

@ -5,8 +5,18 @@
"Loggable": true "Loggable": true
}, },
"log": { "log": {
"model":"ClaimLog", "logTable": "claimLog",
"showField": "id" "mainTable": "claim",
"tables": [
{
"name": "claimDms",
"idName": "dmsFk"
},
"claimDevelopment",
"claimBeginning",
"claimEnd",
"claimObservation"
]
}, },
"options": { "options": {
"mysql": { "mysql": {

View File

@ -1,271 +1,304 @@
{ {
"name": "Client", "name": "Client",
"base": "VnModel", "base": "VnModel",
"mixins": { "mixins": {
"Loggable": true "Loggable": true
}, },
"options": { "options": {
"mysql": { "mysql": {
"table": "client" "table": "client"
} }
}, },
"log": { "log": {
"model":"ClientLog", "logTable": "clientLog",
"showField": "id" "mainTable": "client",
}, "tables": [
"properties": { "address",
"id": { {
"type": "number", "name": "client",
"id": true, "types": {
"description": "Identifier" "payMethodFk": "integer"
}, },
"name": { "exclude": [
"type": "string", "defaultAddressFk"
"required": true ]
}, },
"fi": { {
"type": "string", "name": "clientContact",
"description": "Fiscal indentifier" "relation": "clientFk"
}, },
"socialName": { "clientDms",
"type": "string", "clientObservation",
"required": true {
}, "name": "clientSample",
"contact": { "relation": "clientFk"
"type": "string" },
}, {
"street": { "name": "greuge",
"type": "string", "relation": "clientFk"
"required": true },
}, {
"city": { "name": "recovery",
"type": "string", "relation": "clientFk"
"required": true },
}, {
"postcode": { "name": "clientUnpaid",
"type": "string" "relation": "clientFk"
}, }
"email": { ]
"type": "string" },
}, "properties": {
"phone": { "id": {
"type": "string" "type": "number",
}, "id": true,
"mobile": { "description": "Identifier"
"type": "string" },
}, "name": {
"isActive": { "type": "string",
"type": "boolean" "required": true
}, },
"credit": { "fi": {
"type": "number" "type": "string",
}, "description": "Fiscal indentifier"
"creditInsurance": { },
"type": "number" "socialName": {
}, "type": "string",
"iban": { "required": true
"type": "string" },
}, "contact": {
"dueDay": { "type": "string"
"type": "number" },
}, "street": {
"isEqualizated": { "type": "string",
"type": "boolean", "required": true
"description": "The client has equalization tax" },
}, "city": {
"isFreezed": { "type": "string",
"type": "boolean", "required": true
"description": "The client frozen" },
}, "postcode": {
"hasToInvoiceByAddress": { "type": "string"
"type": "boolean", },
"description": "The client has to be invoiced by address" "email": {
}, "type": "string"
"hasToInvoice": { },
"type": "boolean", "phone": {
"description": "Global invoicing enabled for the client" "type": "string"
}, },
"isToBeMailed": { "mobile": {
"type": "boolean", "type": "string"
"description": "Send invoices by email" },
}, "isActive": {
"hasSepaVnl": { "type": "boolean"
"type": "boolean" },
}, "credit": {
"hasLcr": { "type": "number"
"type": "boolean" },
}, "creditInsurance": {
"hasCoreVnl": { "type": "number"
"type": "boolean" },
}, "iban": {
"hasCoreVnh": { "type": "string"
"type": "boolean" },
}, "dueDay": {
"hasIncoterms": { "type": "number"
"type": "boolean" },
}, "isEqualizated": {
"isTaxDataChecked":{ "type": "boolean",
"type": "boolean" "description": "The client has equalization tax"
}, },
"eypbc": { "isFreezed": {
"type": "boolean" "type": "boolean",
}, "description": "The client frozen"
"quality": { },
"type": "number" "hasToInvoiceByAddress": {
}, "type": "boolean",
"isVies": { "description": "The client has to be invoiced by address"
"type": "boolean" },
}, "hasToInvoice": {
"isRelevant": { "type": "boolean",
"type": "boolean" "description": "Global invoicing enabled for the client"
}, },
"accountingAccount": { "isToBeMailed": {
"type": "string" "type": "boolean",
}, "description": "Send invoices by email"
"created": { },
"type": "date" "hasSepaVnl": {
}, "type": "boolean"
"sageTaxTypeFk": { },
"type": "number", "hasLcr": {
"mysql": { "type": "boolean"
"columnName": "taxTypeSageFk" },
} "hasCoreVnl": {
}, "type": "boolean"
"sageTransactionTypeFk": { },
"type": "number", "hasCoreVnh": {
"mysql": { "type": "boolean"
"columnName": "transactionTypeSageFk" },
} "hasIncoterms": {
}, "type": "boolean"
"businessTypeFk": { },
"type": "string", "isTaxDataChecked": {
"mysql": { "type": "boolean"
"columnName": "businessTypeFk" },
} "eypbc": {
}, "type": "boolean"
"salesPersonFk": { },
"type": "number" "quality": {
}, "type": "number"
"hasElectronicInvoice": { },
"type": "boolean" "isVies": {
}, "type": "boolean"
"rating": { },
"type": "number" "isRelevant": {
}, "type": "boolean"
"recommendedCredit": { },
"type": "number" "accountingAccount": {
} "type": "string"
},
}, "created": {
"relations": { "type": "date"
"account": { },
"type": "belongsTo", "sageTaxTypeFk": {
"model": "VnUser", "type": "number",
"foreignKey": "id" "mysql": {
}, "columnName": "taxTypeSageFk"
"user": { }
"type": "belongsTo", },
"model": "VnUser", "sageTransactionTypeFk": {
"foreignKey": "id" "type": "number",
}, "mysql": {
"payMethod": { "columnName": "transactionTypeSageFk"
"type": "belongsTo", }
"model": "PayMethod", },
"foreignKey": "payMethodFk" "businessTypeFk": {
}, "type": "string",
"salesPersonUser": { "mysql": {
"type": "belongsTo", "columnName": "businessTypeFk"
"model": "VnUser", }
"foreignKey": "salesPersonFk" },
}, "salesPersonFk": {
"province": { "type": "number"
"type": "belongsTo", },
"model": "Province", "hasElectronicInvoice": {
"foreignKey": "provinceFk" "type": "boolean"
}, },
"country": { "rating": {
"type": "belongsTo", "type": "number"
"model": "Country", },
"foreignKey": "countryFk" "recommendedCredit": {
}, "type": "number"
}
},
"relations": {
"account": {
"type": "belongsTo",
"model": "VnUser",
"foreignKey": "id"
},
"user": {
"type": "belongsTo",
"model": "VnUser",
"foreignKey": "id"
},
"payMethod": {
"type": "belongsTo",
"model": "PayMethod",
"foreignKey": "payMethodFk"
},
"salesPersonUser": {
"type": "belongsTo",
"model": "VnUser",
"foreignKey": "salesPersonFk"
},
"province": {
"type": "belongsTo",
"model": "Province",
"foreignKey": "provinceFk"
},
"country": {
"type": "belongsTo",
"model": "Country",
"foreignKey": "countryFk"
},
"isSocialNameUnique": { "isSocialNameUnique": {
"type": "belongsTo", "type": "belongsTo",
"model": "Country", "model": "Country",
"foreignKey": "countryFk" "foreignKey": "countryFk"
}, },
"contactChannel": { "contactChannel": {
"type": "belongsTo", "type": "belongsTo",
"model": "ContactChannel", "model": "ContactChannel",
"foreignKey": "contactChannelFk" "foreignKey": "contactChannelFk"
}, },
"type": { "type": {
"type": "belongsTo", "type": "belongsTo",
"model": "ClientType", "model": "ClientType",
"foreignKey": "typeFk" "foreignKey": "typeFk"
}, },
"businessType": { "businessType": {
"type": "belongsTo", "type": "belongsTo",
"model": "BusinessType", "model": "BusinessType",
"foreignKey": "businessTypeFk" "foreignKey": "businessTypeFk"
}, },
"addresses": { "addresses": {
"type": "hasMany", "type": "hasMany",
"model": "Address", "model": "Address",
"foreignKey": "clientFk" "foreignKey": "clientFk"
}, },
"greuge": { "greuge": {
"type": "hasMany", "type": "hasMany",
"model": "Greuge", "model": "Greuge",
"foreignKey": "clientFk" "foreignKey": "clientFk"
}, },
"classifications": { "classifications": {
"type": "hasMany", "type": "hasMany",
"model": "CreditClassification", "model": "CreditClassification",
"foreignKey": "client" "foreignKey": "client"
}, },
"defaultAddress": { "defaultAddress": {
"type": "belongsTo", "type": "belongsTo",
"model": "Address", "model": "Address",
"foreignKey": "defaultAddressFk" "foreignKey": "defaultAddressFk"
}, },
"contacts": { "contacts": {
"type": "hasMany", "type": "hasMany",
"model": "ClientContact", "model": "ClientContact",
"foreignKey": "clientFk" "foreignKey": "clientFk"
}, },
"bank": { "bank": {
"type": "belongsTo", "type": "belongsTo",
"model": "BankEntity", "model": "BankEntity",
"foreignKey": "bankEntityFk" "foreignKey": "bankEntityFk"
}, },
"defaulters": { "defaulters": {
"type": "hasMany", "type": "hasMany",
"model": "Defaulter", "model": "Defaulter",
"foreignKey": "clientFk" "foreignKey": "clientFk"
}, },
"clientRisks": { "clientRisks": {
"type": "hasMany", "type": "hasMany",
"model": "ClientRisk", "model": "ClientRisk",
"foreignKey": "clientFk" "foreignKey": "clientFk"
}, },
"claimsRatio": { "claimsRatio": {
"type": "hasOne", "type": "hasOne",
"model": "ClaimRatio", "model": "ClaimRatio",
"foreignKey": "clientFk" "foreignKey": "clientFk"
}, },
"transferor": { "transferor": {
"type": "belongsTo", "type": "belongsTo",
"model": "Client", "model": "Client",
"foreignKey": "transferorFk" "foreignKey": "transferorFk"
}, },
"supplier": { "supplier": {
"type": "belongsTo", "type": "belongsTo",
"model": "Supplier", "model": "Supplier",
"foreignKey": "fi", "foreignKey": "fi",
"primaryKey": "nif" "primaryKey": "nif"
} }
}, },
"scopes": { "scopes": {
"isActive": { "isActive": {
"where": { "where": {
"isActive": { "isActive": {

View File

@ -10,9 +10,13 @@
} }
}, },
"log": { "log": {
"model":"EntryLog", "logTable": "entryLog",
"showField": "id" "mainTable": "entry",
}, "tables": [
"buy",
"entryObservation"
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",
@ -39,9 +43,9 @@
}, },
"isVirtual": { "isVirtual": {
"type": "boolean", "type": "boolean",
"mysql": { "mysql": {
"columnName": "isRaid" "columnName": "isRaid"
} }
}, },
"isRaid": { "isRaid": {
"type": "boolean" "type": "boolean"
@ -57,9 +61,9 @@
}, },
"observation": { "observation": {
"type": "string", "type": "string",
"mysql": { "mysql": {
"columnName": "evaNotes" "columnName": "evaNotes"
} }
}, },
"loadPriority": { "loadPriority": {
"type": "number" "type": "number"

View File

@ -10,9 +10,13 @@
} }
}, },
"log": { "log": {
"model":"InvoiceInLog", "logTable": "invoiceInLog",
"showField": "id" "mainTable": "invoiceIn",
}, "tables": [
"invoiceInDueDay",
"invoiceInTax"
]
},
"properties": { "properties": {
"id": { "id": {
"id": true, "id": true,
@ -115,5 +119,3 @@
} }
} }
} }

View File

@ -10,9 +10,42 @@
} }
}, },
"log": { "log": {
"model":"ItemLog", "logTable": "itemLog",
"showField": "id" "mainTable": "item",
}, "tables": [
"itemBarcode",
"itemBotanical",
{
"name": "itemTag",
"showRelation": "tagFk"
},
{
"name": "itemTaxCountry",
"types": {
"taxClassFk": "integer"
}
},
{
"name": "item",
"exclude": [
"lastUsed",
"supplyResponseFk",
"tag5",
"tag6",
"tag7",
"tag8",
"tag9",
"tag10",
"value5",
"value6",
"value7",
"value8",
"value9",
"value10"
]
}
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",

View File

@ -1,6 +1,6 @@
{ {
"name": "Route", "name": "Route",
"base": "VnModel", "base": "VnModel",
"mixins": { "mixins": {
"Loggable": true "Loggable": true
}, },
@ -9,6 +9,16 @@
"table": "route" "table": "route"
} }
}, },
"log": {
"logTable": "routeLog",
"mainTable": "route",
"tables": [
{
"name": "routesMonitor",
"relation": "routeFk"
}
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",
@ -70,13 +80,13 @@
"type": "belongsTo", "type": "belongsTo",
"model": "AgencyMode", "model": "AgencyMode",
"foreignKey": "agencyModeFk" "foreignKey": "agencyModeFk"
}, },
"ticket": { "ticket": {
"type": "hasMany", "type": "hasMany",
"model": "Ticket", "model": "Ticket",
"foreignKey": "routeFk" "foreignKey": "routeFk"
}, },
"zone": { "zone": {
"type": "belongsTo", "type": "belongsTo",
"model": "Zone", "model": "Zone",
"foreignKey": "zoneFk" "foreignKey": "zoneFk"

View File

@ -1,11 +1,18 @@
{ {
"name": "Parking", "name": "Parking",
"base": "VnModel", "base": "VnModel",
"options": { "options": {
"mysql": { "mysql": {
"table": "parking" "table": "parking"
} }
}, },
"log": {
"logTable": "parkingLog",
"mainTable": "parking",
"tables": [
"saleGroup"
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",

View File

@ -1,6 +1,6 @@
{ {
"name": "Shelving", "name": "Shelving",
"base": "VnModel", "base": "VnModel",
"mixins": { "mixins": {
"Loggable": true "Loggable": true
}, },
@ -9,6 +9,10 @@
"table": "shelving" "table": "shelving"
} }
}, },
"log": {
"logTable": "shelvingLog",
"mainTable": "shelving"
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",

View File

@ -9,6 +9,31 @@
"table": "supplier" "table": "supplier"
} }
}, },
"log": {
"logTable": "supplierLog",
"mainTable": "supplier",
"tables": [
{
"name": "supplier",
"types": {
"payMethodFk": "integer"
}
},
{
"name": "supplierAccount",
"showField": "iban"
},
{
"name": "supplierAddress",
"relation": "supplierFk"
},
"supplierContact",
{
"name": "supplierDms",
"idName": "supplierFk"
}
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",
@ -85,23 +110,23 @@
"type": "number" "type": "number"
}, },
"sageTaxTypeFk": { "sageTaxTypeFk": {
"type": "number", "type": "number",
"mysql": { "mysql": {
"columnName": "taxTypeSageFk" "columnName": "taxTypeSageFk"
} }
}, },
"sageTransactionTypeFk": { "sageTransactionTypeFk": {
"type": "number", "type": "number",
"mysql": { "mysql": {
"columnName": "transactionTypeSageFk" "columnName": "transactionTypeSageFk"
} }
}, },
"sageWithholdingFk": { "sageWithholdingFk": {
"type": "number", "type": "number",
"mysql": { "mysql": {
"columnName": "withholdingSageFk" "columnName": "withholdingSageFk"
} }
}, },
"isPayMethodChecked": { "isPayMethodChecked": {
"type": "boolean" "type": "boolean"
}, },
@ -116,26 +141,26 @@
} }
}, },
"relations": { "relations": {
"payMethod": { "payMethod": {
"type": "belongsTo", "type": "belongsTo",
"model": "PayMethod", "model": "PayMethod",
"foreignKey": "payMethodFk" "foreignKey": "payMethodFk"
}, },
"payDem": { "payDem": {
"type": "belongsTo", "type": "belongsTo",
"model": "PayDem", "model": "PayDem",
"foreignKey": "payDemFk" "foreignKey": "payDemFk"
}, },
"province": { "province": {
"type": "belongsTo", "type": "belongsTo",
"model": "Province", "model": "Province",
"foreignKey": "provinceFk" "foreignKey": "provinceFk"
}, },
"country": { "country": {
"type": "belongsTo", "type": "belongsTo",
"model": "Country", "model": "Country",
"foreignKey": "countryFk" "foreignKey": "countryFk"
}, },
"client": { "client": {
"type": "belongsTo", "type": "belongsTo",
"model": "Client", "model": "Client",
@ -147,35 +172,35 @@
"model": "Worker", "model": "Worker",
"foreignKey": "workerFk" "foreignKey": "workerFk"
}, },
"sageTaxType": { "sageTaxType": {
"type": "belongsTo", "type": "belongsTo",
"model": "SageTaxType", "model": "SageTaxType",
"foreignKey": "sageTaxTypeFk" "foreignKey": "sageTaxTypeFk"
}, },
"sageTransactionType": { "sageTransactionType": {
"type": "belongsTo", "type": "belongsTo",
"model": "SageTransactionType", "model": "SageTransactionType",
"foreignKey": "sageTransactionTypeFk" "foreignKey": "sageTransactionTypeFk"
}, },
"sageWithholding": { "sageWithholding": {
"type": "belongsTo", "type": "belongsTo",
"model": "SageWithholding", "model": "SageWithholding",
"foreignKey": "sageWithholdingFk" "foreignKey": "sageWithholdingFk"
}, },
"contacts": { "contacts": {
"type": "hasMany", "type": "hasMany",
"model": "SupplierContact", "model": "SupplierContact",
"foreignKey": "supplierFk" "foreignKey": "supplierFk"
}, },
"addresses": { "addresses": {
"type": "hasMany", "type": "hasMany",
"model": "SupplierAddress", "model": "SupplierAddress",
"foreignKey": "supplierFk" "foreignKey": "supplierFk"
}, },
"supplierActivity": { "supplierActivity": {
"type": "belongsTo", "type": "belongsTo",
"model": "SupplierActivity", "model": "SupplierActivity",
"foreignKey": "supplierActivityFk" "foreignKey": "supplierActivityFk"
} }
} }
} }

View File

@ -1,14 +1,69 @@
{ {
"name": "Ticket", "name": "Ticket",
"base": "VnModel", "base": "VnModel",
"mixins": { "mixins": {
"Loggable": true "Loggable": true
}, },
"options": { "options": {
"mysql": { "mysql": {
"table": "ticket" "table": "ticket"
} }
}, },
"log": {
"logTable": "ticketLog",
"mainTable": "ticket",
"tables": [
"expedition",
{
"name": "sale",
"showField": "concept",
"types": {
"discount": "integer"
},
"exclude": [
"priceFixed"
]
},
{
"name": "ticket",
"types": {
"priority": "integer"
},
"exclude": [
"totalWithVat",
"totalWithoutVat"
]
},
{
"name": "ticketDms",
"idName": "dmsFk"
},
{
"name": "ticketObservation",
"types": {
"observationTypeFk": "integer"
}
},
"ticketPackaging",
{
"name": "ticketRefund",
"relation": "originalTicketFk"
},
"ticketRequest",
"ticketService",
{
"name": "ticketTracking",
"showRelation": "stateFk",
"types": {
"stateFk": "integer"
},
"exclude": [
"failFk"
]
},
"ticketWeekly"
]
},
"properties": { "properties": {
"id": { "id": {
"id": true, "id": true,

View File

@ -1,6 +1,6 @@
{ {
"name": "Travel", "name": "Travel",
"base": "VnModel", "base": "VnModel",
"mixins": { "mixins": {
"Loggable": true "Loggable": true
}, },
@ -9,6 +9,23 @@
"table": "travel" "table": "travel"
} }
}, },
"log": {
"logTable": "travelLog",
"mainTable": "travel",
"tables": [
{
"name": "travel",
"showField": "ref",
"types": {
"totalEntries": "integer"
}
},
{
"name": "travelThermograph",
"showField": "thermographFk"
}
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",

View File

@ -5,7 +5,11 @@
"Loggable": true "Loggable": true
}, },
"log": { "log": {
"model": "DeviceProductionLog" "logTable": "deviceProductionLog",
"mainTable": "deviceProduction",
"tables": [
"deviceProductionUser"
]
}, },
"options": { "options": {
"mysql": { "mysql": {
@ -24,25 +28,25 @@
"type": "number" "type": "number"
}, },
"macWifi": { "macWifi": {
"type" : "string" "type": "string"
}, },
"serialNumber": { "serialNumber": {
"type" : "string" "type": "string"
}, },
"android_id": { "android_id": {
"type" : "string" "type": "string"
}, },
"purchased": { "purchased": {
"type" : "date" "type": "date"
}, },
"stateFk": { "stateFk": {
"type" : "string" "type": "string"
}, },
"isInScaleFusion": { "isInScaleFusion": {
"type" : "boolean" "type": "boolean"
}, },
"description": { "description": {
"type" : "string" "type": "string"
} }
}, },
"relations": { "relations": {

View File

@ -10,6 +10,30 @@
"table": "worker" "table": "worker"
} }
}, },
"log": {
"logTable": "workerLog",
"mainTable": "worker",
"tables": [
{
"name": "worker",
"showField": "firstName",
"exclude": [
"balance"
]
},
{
"name": "workerDocument",
"showRelation": "document",
"modelName": "WorkerDms",
"relation": "worker"
},
"business",
{
"name": "workerTimeControl",
"relation": "userFk"
}
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",
@ -25,40 +49,40 @@
"required": true "required": true
}, },
"phone": { "phone": {
"type" : "string" "type": "string"
}, },
"bossFk": { "bossFk": {
"type" : "number" "type": "number"
}, },
"maritalStatus": { "maritalStatus": {
"type" : "string" "type": "string"
}, },
"originCountryFk": { "originCountryFk": {
"type" : "number" "type": "number"
}, },
"educationLevelFk": { "educationLevelFk": {
"type" : "number" "type": "number"
}, },
"SSN": { "SSN": {
"type" : "string" "type": "string"
}, },
"mobileExtension": { "mobileExtension": {
"type" : "number" "type": "number"
}, },
"code": { "code": {
"type" : "string" "type": "string"
}, },
"locker": { "locker": {
"type" : "number" "type": "number"
}, },
"fi": { "fi": {
"type" : "string" "type": "string"
}, },
"birth": { "birth": {
"type" : "date" "type": "date"
}, },
"isF11Allowed": { "isF11Allowed": {
"type" : "boolean" "type": "boolean"
} }
}, },
"relations": { "relations": {
@ -93,38 +117,51 @@
"foreignKey": "workerFk" "foreignKey": "workerFk"
} }
}, },
"scopes":{ "scopes": {
"summary": { "summary": {
"include": [ "include": [
{ {
"relation": "user", "relation": "user",
"scope": { "scope": {
"fields": ["email", "name", "nickname", "roleFk", "emailVerified"], "fields": [
"email",
"name",
"nickname",
"roleFk",
"emailVerified"
],
"include": [ "include": [
{ {
"relation": "role", "relation": "role",
"scope": { "scope": {
"fields": ["name"] "fields": [
"name"
]
} }
}, },
{ {
"relation": "emailUser", "relation": "emailUser",
"scope": { "scope": {
"fields": ["email"] "fields": [
"email"
]
} }
} }
] ]
} }
}, { },
{
"relation": "department", "relation": "department",
"scope": { "scope": {
"include": { "include": {
"relation": "department" "relation": "department"
} }
} }
}, { },
{
"relation": "boss" "relation": "boss"
}, { },
{
"relation": "client", "relation": "client",
"scope": { "scope": {
"fields": [ "fields": [
@ -169,7 +206,8 @@
"recommendedCredit" "recommendedCredit"
] ]
} }
}, { },
{
"relation": "sip" "relation": "sip"
} }
] ]

View File

@ -1,74 +1,87 @@
{ {
"name": "Zone", "name": "Zone",
"base": "VnModel", "base": "VnModel",
"mixins": { "mixins": {
"Loggable": true "Loggable": true
}, },
"options": { "options": {
"mysql": { "mysql": {
"table": "zone" "table": "zone"
} }
}, },
"properties": { "log": {
"id": { "logTable": "zoneLog",
"id": true, "mainTable": "zone",
"type": "number" "tables": [
}, "zoneEvent",
"name": { "zoneExclusion",
"type": "string", "zoneWarehouse",
"required": true {
}, "name": "zoneIncluded",
"hour": { "idName": "zoneFk"
"type": "date", }
"required": true ]
}, },
"travelingDays": { "properties": {
"type": "number" "id": {
}, "id": true,
"price": { "type": "number"
"type": "number" },
}, "name": {
"bonus": { "type": "string",
"type": "number" "required": true
}, },
"isVolumetric": { "hour": {
"type": "boolean" "type": "date",
}, "required": true
"inflation": { },
"type": "number" "travelingDays": {
}, "type": "number"
"m3Max": { },
"type": "number" "price": {
}, "type": "number"
"itemMaxSize": { },
"type": "number" "bonus": {
} "type": "number"
}, },
"relations": { "isVolumetric": {
"type": "boolean"
},
"inflation": {
"type": "number"
},
"m3Max": {
"type": "number"
},
"itemMaxSize": {
"type": "number"
}
},
"relations": {
"agencyMode": { "agencyMode": {
"type": "belongsTo", "type": "belongsTo",
"model": "AgencyMode", "model": "AgencyMode",
"foreignKey": "agencyModeFk" "foreignKey": "agencyModeFk"
}, },
"events": { "events": {
"type": "hasMany", "type": "hasMany",
"model": "ZoneEvent", "model": "ZoneEvent",
"foreignKey": "zoneFk" "foreignKey": "zoneFk"
}, },
"exclusions": { "exclusions": {
"type": "hasMany", "type": "hasMany",
"model": "ZoneExclusion", "model": "ZoneExclusion",
"foreignKey": "zoneFk" "foreignKey": "zoneFk"
},
"warehouses": {
"type": "hasMany",
"model": "ZoneWarehouse",
"foreignKey": "zoneFk"
}, },
"closures": { "warehouses": {
"type": "hasMany", "type": "hasMany",
"model": "ZoneClosure", "model": "ZoneWarehouse",
"foreignKey": "zoneFk" "foreignKey": "zoneFk"
},
"closures": {
"type": "hasMany",
"model": "ZoneClosure",
"foreignKey": "zoneFk"
} }
} }
} }