refs #5134 feat: add saleMistake model
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-08-11 12:32:49 +02:00
parent 6eb88f8ab7
commit 9ef4ba9bef
4 changed files with 22 additions and 12 deletions

View File

@ -0,0 +1,3 @@
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES
('SaleMistake', 'create', 'WRITE', 'ALLOW', 'ROLE', 'employee');

View File

@ -2958,3 +2958,7 @@ INSERT INTO `vn`.`invoiceInSerial` (`code`, `description`, `cplusTerIdNifFk`, `t
INSERT INTO `hedera`.`imageConfig` (`id`, `maxSize`, `useXsendfile`, `url`) INSERT INTO `hedera`.`imageConfig` (`id`, `maxSize`, `useXsendfile`, `url`)
VALUES VALUES
(1, 0, 0, 'marvel.com'); (1, 0, 0, 'marvel.com');
INSERT INTO `vn`.`mistakeType` (`id`, `description`)
VALUES
(1, 'Incorrect quantity');

View File

@ -44,6 +44,9 @@
"SaleGroup": { "SaleGroup": {
"dataSource": "vn" "dataSource": "vn"
}, },
"SaleMistake": {
"dataSource": "vn"
},
"SaleGroupDetail": { "SaleGroupDetail": {
"dataSource": "vn" "dataSource": "vn"
}, },

View File

@ -1,4 +1,4 @@
{ // A REVISAR QUE NOFA INSERT EN {
"name": "SaleMistake", "name": "SaleMistake",
"base": "VnModel", "base": "VnModel",
"options": { "options": {
@ -16,33 +16,33 @@
"type": "date" "type": "date"
}, },
"saleFk": { "saleFk": {
"type": "number" "type": "number",
"required": true
}, },
"userFk": { "userFk": {
"type": "number" "type": "number",
"required": true
}, },
"typeFk": { "typeFk": {
"type": "number" "type": "number",
"required": true
} }
}, },
"relations": { "relations": {
"sale": { "sale": {
"type": "belongsTo", "type": "belongsTo",
"model": "Sale", "model": "Sale",
"foreignKey": "saleFk", "foreignKey": "saleFk"
"required": true
}, },
"worker": { "worker": {
"type": "belongsTo", "type": "belongsTo",
"model": "Worker", "model": "Worker",
"foreignKey": "userFk", "foreignKey": "userFk"
"required": true
}, },
"mistakeType": { "mistakeType": {
"type": "belongsTo", "type": "belongsTo",
"model": "MistakeType", "model": "MistakeType",
"foreignKey": "typeFk", "foreignKey": "typeFk"
"required": true
} }
} }