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

@ -7,6 +7,24 @@
"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

@ -10,8 +10,42 @@
} }
}, },
"log": { "log": {
"model":"ClientLog", "logTable": "clientLog",
"showField": "id" "mainTable": "client",
"tables": [
"address",
{
"name": "client",
"types": {
"payMethodFk": "integer"
},
"exclude": [
"defaultAddressFk"
]
},
{
"name": "clientContact",
"relation": "clientFk"
},
"clientDms",
"clientObservation",
{
"name": "clientSample",
"relation": "clientFk"
},
{
"name": "greuge",
"relation": "clientFk"
},
{
"name": "recovery",
"relation": "clientFk"
},
{
"name": "clientUnpaid",
"relation": "clientFk"
}
]
}, },
"properties": { "properties": {
"id": { "id": {
@ -104,7 +138,7 @@
"hasIncoterms": { "hasIncoterms": {
"type": "boolean" "type": "boolean"
}, },
"isTaxDataChecked":{ "isTaxDataChecked": {
"type": "boolean" "type": "boolean"
}, },
"eypbc": { "eypbc": {
@ -155,7 +189,6 @@
"recommendedCredit": { "recommendedCredit": {
"type": "number" "type": "number"
} }
}, },
"relations": { "relations": {
"account": { "account": {

View File

@ -10,8 +10,12 @@
} }
}, },
"log": { "log": {
"model":"EntryLog", "logTable": "entryLog",
"showField": "id" "mainTable": "entry",
"tables": [
"buy",
"entryObservation"
]
}, },
"properties": { "properties": {
"id": { "id": {

View File

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

View File

@ -10,8 +10,41 @@
} }
}, },
"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": {

View File

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

View File

@ -6,6 +6,13 @@
"table": "parking" "table": "parking"
} }
}, },
"log": {
"logTable": "parkingLog",
"mainTable": "parking",
"tables": [
"saleGroup"
]
},
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",

View File

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

View File

@ -9,6 +9,61 @@
"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

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

@ -9,6 +9,19 @@
"table": "zone" "table": "zone"
} }
}, },
"log": {
"logTable": "zoneLog",
"mainTable": "zone",
"tables": [
"zoneEvent",
"zoneExclusion",
"zoneWarehouse",
{
"name": "zoneIncluded",
"idName": "zoneFk"
}
]
},
"properties": { "properties": {
"id": { "id": {
"id": true, "id": true,