diff --git a/db/changes/233201/00-genereicAllocationACL.sql b/db/changes/233201/00-genereicAllocationACL.sql new file mode 100644 index 000000000..d46fb2665 --- /dev/null +++ b/db/changes/233201/00-genereicAllocationACL.sql @@ -0,0 +1,2 @@ +INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) + VALUES ('GenericAllocation','find','READ','ALLOW','ROLE','employee'); diff --git a/modules/item/back/model-config.json b/modules/item/back/model-config.json index 40d73f1a6..eba9e0306 100644 --- a/modules/item/back/model-config.json +++ b/modules/item/back/model-config.json @@ -2,6 +2,9 @@ "Expense": { "dataSource": "vn" }, + "GenericAllocation": { + "dataSource": "vn" + }, "Genus": { "dataSource": "vn" }, diff --git a/modules/item/back/models/generic-allocation.json b/modules/item/back/models/generic-allocation.json new file mode 100644 index 000000000..711566bdf --- /dev/null +++ b/modules/item/back/models/generic-allocation.json @@ -0,0 +1,38 @@ +{ + "name": "GenericAllocation", + "base": "VnModel", + "options": { + "mysql": { + "table": "genericAllocation" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "color": { + "type": "string" + }, + "started": { + "type": "date", + "mysql": { + "columnName": "startDated" + } + }, + "finished": { + "type": "date", + "mysql": { + "columnName": "endDated" + } + } + }, + "relations": { + "item": { + "type": "belongsTo", + "model": "Item", + "foreignKey": "itemFk" + } + } +}