From 11071592ff1719ee5dbd99798b44c6f59bde66d4 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 7 Nov 2024 09:23:50 +0100 Subject: [PATCH] feat: refs #8099 addSalarySupplement --- db/dump/fixtures.before.sql | 2 + db/versions/11329-tealRose/00-firstScript.sql | 10 +++++ modules/route/back/model-config.json | 8 +++- modules/route/back/models/routeAction.json | 30 +++++++++++++++ .../route/back/models/routeComplement.json | 37 +++++++++++++++++++ 5 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 db/versions/11329-tealRose/00-firstScript.sql create mode 100644 modules/route/back/models/routeAction.json create mode 100644 modules/route/back/models/routeComplement.json diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index f25a4aab4..b587dd4c5 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -4007,4 +4007,6 @@ INSERT IGNORE INTO pbx.queueMember UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA"; UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS"; +INSERT INTO vn.routeAction (id, name, price, isMainlineDelivered) VALUES(1, 'Pintar traje', 50.00, 0); +INSERT INTO vn.routeComplement (id, dated, workerFk, price, routeActionFk) VALUES(1, util.VN_CURDATE(), 9, 50.00, 1); diff --git a/db/versions/11329-tealRose/00-firstScript.sql b/db/versions/11329-tealRose/00-firstScript.sql new file mode 100644 index 000000000..4a4603fd9 --- /dev/null +++ b/db/versions/11329-tealRose/00-firstScript.sql @@ -0,0 +1,10 @@ + + +USE vn; + +INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) +VALUES('RouteAction', '*', 'READ', 'ALLOW', 'ROLE', 'delivery'); + +INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) +VALUES('RouteComplement', '*', '*', 'ALLOW', 'ROLE', 'delivery'); + diff --git a/modules/route/back/model-config.json b/modules/route/back/model-config.json index ccae87bd9..c8184898a 100644 --- a/modules/route/back/model-config.json +++ b/modules/route/back/model-config.json @@ -20,6 +20,12 @@ "Route": { "dataSource": "vn" }, + "RouteAction": { + "dataSource": "vn" + }, + "RouteComplement": { + "dataSource": "vn" + }, "RouteLog": { "dataSource": "vn" }, @@ -29,4 +35,4 @@ "RoutesMonitor": { "dataSource": "vn" } -} +} \ No newline at end of file diff --git a/modules/route/back/models/routeAction.json b/modules/route/back/models/routeAction.json new file mode 100644 index 000000000..88f7a8226 --- /dev/null +++ b/modules/route/back/models/routeAction.json @@ -0,0 +1,30 @@ +{ + "name": "RouteAction", + "base": "VnModel", + "mixins": { + "Loggable": true + }, + "options": { + "mysql": { + "table": "routeAction" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "name": { + "type": "string", + "required": true + }, + "price": { + "type": "number" + }, + "isMainlineDelivered": { + "type": "boolean", + "required": true + } + } +} \ No newline at end of file diff --git a/modules/route/back/models/routeComplement.json b/modules/route/back/models/routeComplement.json new file mode 100644 index 000000000..e2086f78d --- /dev/null +++ b/modules/route/back/models/routeComplement.json @@ -0,0 +1,37 @@ +{ + "name": "RouteComplement", + "base": "VnModel", + "mixins": { + "Loggable": true + }, + "options": { + "mysql": { + "table": "routeComplement" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "dated": { + "type": "date" + }, + "price": { + "type": "number" + } + }, + "relations": { + "worker": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "workerFk" + }, + "routeAction": { + "type": "belongsTo", + "model": "RouteAction", + "foreignKey": "routeActionFk" + } + } +} \ No newline at end of file -- 2.40.1