From 1963cc2265529b6a5c69a6c6f48850f0ca72d9be Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 25 Jan 2023 07:49:51 +0100 Subject: [PATCH] log en tablas invoiceIn --- .../invoiceIn/back/models/invoice-in-due-day.json | 14 ++++++++++---- .../back/models/invoice-in-intrastat.json | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/modules/invoiceIn/back/models/invoice-in-due-day.json b/modules/invoiceIn/back/models/invoice-in-due-day.json index d2cffc81b..be5e61486 100644 --- a/modules/invoiceIn/back/models/invoice-in-due-day.json +++ b/modules/invoiceIn/back/models/invoice-in-due-day.json @@ -1,6 +1,10 @@ { "name": "InvoiceInDueDay", - "base": "VnModel", + "base": "Loggable", + "log": { + "model": "InvoiceInLog", + "relation": "invoiceIn" + }, "options": { "mysql": { "table": "invoiceInDueDay" @@ -12,9 +16,6 @@ "type": "number", "description": "Identifier" }, - "invoiceInFk": { - "type": "number" - }, "dueDated": { "type": "date" }, @@ -32,6 +33,11 @@ } }, "relations": { + "invoiceIn": { + "type": "belongsTo", + "model": "InvoiceIn", + "foreignKey": "invoiceInFk" + }, "bank": { "type": "belongsTo", "model": "Bank", diff --git a/modules/invoiceIn/back/models/invoice-in-intrastat.json b/modules/invoiceIn/back/models/invoice-in-intrastat.json index 65ab1f36a..cc50bdbc5 100644 --- a/modules/invoiceIn/back/models/invoice-in-intrastat.json +++ b/modules/invoiceIn/back/models/invoice-in-intrastat.json @@ -1,6 +1,10 @@ { "name": "InvoiceInIntrastat", - "base": "VnModel", + "base": "Loggable", + "log": { + "model": "InvoiceInLog", + "relation": "invoiceIn" + }, "options": { "mysql": { "table": "invoiceInIntrastat" @@ -12,9 +16,6 @@ "type": "number", "description": "Identifier" }, - "invoiceInFk": { - "type": "number" - }, "net": { "type": "number" }, @@ -35,6 +36,11 @@ } }, "relations": { + "invoiceIn": { + "type": "belongsTo", + "model": "InvoiceIn", + "foreignKey": "invoiceInFk" + }, "intrastat": { "type": "belongsTo", "model": "Intrastat",