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