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

@ -2955,6 +2955,10 @@ INSERT INTO `vn`.`invoiceInSerial` (`code`, `description`, `cplusTerIdNifFk`, `t
('W', 'Vanaheim', 1, 'WORLD');
INSERT INTO `hedera`.`imageConfig` (`id`, `maxSize`, `useXsendfile`, `url`)
INSERT INTO `hedera`.`imageConfig` (`id`, `maxSize`, `useXsendfile`, `url`)
VALUES
(1, 0, 0, 'marvel.com');
INSERT INTO `vn`.`mistakeType` (`id`, `description`)
VALUES
(1, 'Incorrect quantity');

View File

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

View File

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