diff --git a/db/versions/11116-tealRuscus/00-firstScript.sql b/db/versions/11116-tealRuscus/00-firstScript.sql new file mode 100644 index 000000000..a74021dd5 --- /dev/null +++ b/db/versions/11116-tealRuscus/00-firstScript.sql @@ -0,0 +1,3 @@ +-- Place your SQL code here +USE vn; +INSERT INTO salix.ACL ( model, property, accessType, permission, principalType, principalId) VALUES('ItemShelvingLog', '*', 'READ', 'ALLOW', 'ROLE', 'production'); \ No newline at end of file diff --git a/modules/item/back/model-config.json b/modules/item/back/model-config.json index 40d73f1a6..2d06e1ada 100644 --- a/modules/item/back/model-config.json +++ b/modules/item/back/model-config.json @@ -50,6 +50,9 @@ "ItemShelving": { "dataSource": "vn" }, + "ItemShelvingLog": { + "dataSource": "vn" + }, "ItemShelvingSale": { "dataSource": "vn" }, @@ -74,4 +77,4 @@ "FixedPrice": { "dataSource": "vn" } -} +} \ No newline at end of file diff --git a/modules/item/back/models/item-shelving-log.json b/modules/item/back/models/item-shelving-log.json new file mode 100644 index 000000000..f976008f1 --- /dev/null +++ b/modules/item/back/models/item-shelving-log.json @@ -0,0 +1,52 @@ +{ + "name": "ItemShelvingLog", + "base": "VnModel", + "mixins": { + "Loggable": true + }, + "options": { + "mysql": { + "table": "itemShelvingLog" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "created": { + "type": "date" + }, + "shelvingFk": { + "type": "string" + }, + "itemFk": { + "type": "number" + }, + "visible": { + "type": "number" + }, + "accion": { + "type": "string" + } + }, + "relations": { + "item": { + "type": "belongsTo", + "model": "Item", + "foreignKey": "itemFk" + }, + "worker": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "workerFk" + }, + "shelving": { + "type": "belongsTo", + "model": "Shelving", + "foreignKey": "shelvingFk", + "primaryKey": "code" + } + } +} \ No newline at end of file