Merge pull request '5134-ModelsSalix' (!1768) from 5134-ModelsSalix into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1768
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Alex Moreno 2023-09-28 11:20:20 +00:00
commit 2f22c2807a
19 changed files with 289 additions and 5 deletions

View File

@ -0,0 +1,11 @@
INSERT INTO `salix`.`ACL` ( model, property, accessType, permission, principalType, principalId)
VALUES
('ExpeditionMistakeType', '*', 'READ', 'ALLOW', 'ROLE', 'employee'),
('WorkerMistakeType', '*', 'READ', 'ALLOW', 'ROLE', 'employee'),
('ExpeditionMistake','*','WRITE','ALLOW','ROLE','employee'),
('WorkerMistake', '*', 'WRITE', 'ALLOW', 'ROLE', 'coolerBoss'),
('MistakesTypes', '*', 'WRITE', 'ALLOW', 'ROLE', 'coolerBoss'),
('MistakeType','*','READ','ALLOW','ROLE','employee'),
('MachineWorker', '*', 'READ', 'ALLOW', 'ROLE', 'coolerAssist'),
('Printer','*','READ','ALLOW','ROLE','employee'),
('SaleMistake', '*', 'WRITE', 'ALLOW', 'ROLE', 'production');

View File

@ -2974,3 +2974,7 @@ INSERT INTO vn.XDiario (id, ASIEN, FECHA, SUBCTA, CONTRA, CONCEPTO, EURODEBE, EU
(4, 2.0, util.VN_CURDATE(), '4300001104', NULL, 'n/fra T4444444', 8.88, NULL, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0), (4, 2.0, util.VN_CURDATE(), '4300001104', NULL, 'n/fra T4444444', 8.88, NULL, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0),
(5, 2.0, util.VN_CURDATE(), '2000000000', '4300001104', 'n/fra T4444444 Tony Stark', NULL, 8.07, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0), (5, 2.0, util.VN_CURDATE(), '2000000000', '4300001104', 'n/fra T4444444 Tony Stark', NULL, 8.07, NULL, NULL, '0', NULL, 0.00, NULL, NULL, NULL, NULL, NULL, '2', NULL, 1, 2, 'I.F.', 'Nombre Importador', 1, 0, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0),
(6, 2.0, util.VN_CURDATE(), '4770000010', '4300001104', 'Inmovilizado pendiente : n/fra T4444444 Tony Stark', NULL, 0.81, 8.07, 'T', '4444444', 10.00, NULL, NULL, NULL, NULL, NULL, '', '2', '', 1, 1, '06089160W', 'IRON MAN', 1, 1, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0); (6, 2.0, util.VN_CURDATE(), '4770000010', '4300001104', 'Inmovilizado pendiente : n/fra T4444444 Tony Stark', NULL, 0.81, 8.07, 'T', '4444444', 10.00, NULL, NULL, NULL, NULL, NULL, '', '2', '', 1, 1, '06089160W', 'IRON MAN', 1, 1, 0, util.VN_CURDATE(), 0, 442, 0, 0, 0.00, NULL, NULL, util.VN_CURDATE(), NULL, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0);
INSERT INTO `vn`.`mistakeType` (`id`, `description`)
VALUES
(1, 'Incorrect quantity');

View File

@ -18,6 +18,13 @@
"isLabeler": { "isLabeler": {
"type": "boolean" "type": "boolean"
} }
},
"relations": {
"sector": {
"type": "belongsTo",
"model": "Sector",
"foreignKey": "sectorFk"
}
}, },
"acls": [{ "acls": [{
"accessType": "READ", "accessType": "READ",

View File

@ -26,11 +26,17 @@
"shelving": { "shelving": {
"type": "string" "type": "string"
}, },
"subName": {
"type": "string"
},
"packing": { "packing": {
"type": "number" "type": "number"
}, },
"stock": { "stock": {
"type": "number" "type": "number"
},
"size": {
"type": "number"
} }
} }
} }

View File

@ -20,10 +20,16 @@
}, },
"created": { "created": {
"type": "date" "type": "date"
},
"grouping": {
"type": "number"
}, },
"isChecked": { "isChecked": {
"type": "boolean" "type": "boolean"
}, },
"packing": {
"type": "number"
},
"visible": { "visible": {
"type": "number" "type": "number"
}, },

View File

@ -10,5 +10,8 @@
}, },
"Sector": { "Sector": {
"dataSource": "vn" "dataSource": "vn"
},
"Train": {
"dataSource": "vn"
} }
} }

View File

@ -9,12 +9,11 @@
"properties": { "properties": {
"id": { "id": {
"type": "number", "type": "number",
"id": true, "description": "Identifier",
"description": "Identifier" "id": true
}, },
"code": { "code": {
"type": "string", "type": "string"
"required": true
}, },
"parkingFk": { "parkingFk": {
"type": "number" "type": "number"

View File

@ -0,0 +1,19 @@
{
"name": "Train",
"options": {
"mysql": {
"table": "train"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"name": {
"type": "string",
"required": true
}
}
}

View File

@ -17,6 +17,12 @@
"Expedition": { "Expedition": {
"dataSource": "vn" "dataSource": "vn"
}, },
"ExpeditionPallet": {
"dataSource": "vn"
},
"ExpeditionScan": {
"dataSource": "vn"
},
"ExpeditionState": { "ExpeditionState": {
"dataSource": "vn" "dataSource": "vn"
}, },
@ -32,6 +38,9 @@
"ExpeditionMistake": { "ExpeditionMistake": {
"dataSource": "vn" "dataSource": "vn"
}, },
"ExpeditionMistakeType": {
"dataSource": "vn"
},
"PrintServerQueue": { "PrintServerQueue": {
"dataSource": "vn" "dataSource": "vn"
}, },
@ -47,6 +56,9 @@
"SaleGroup": { "SaleGroup": {
"dataSource": "vn" "dataSource": "vn"
}, },
"SaleMistake": {
"dataSource": "vn"
},
"SaleGroupDetail": { "SaleGroupDetail": {
"dataSource": "vn" "dataSource": "vn"
}, },

View File

@ -24,7 +24,7 @@
}, },
"type": { "type": {
"type": "belongsTo", "type": "belongsTo",
"model": "MistakeType", "model": "ExpeditionMistakeType",
"foreignKey": "typeFk" "foreignKey": "typeFk"
} }
} }

View File

@ -0,0 +1,19 @@
{
"name": "ExpeditionMistakeType",
"base": "VnModel",
"options": {
"mysql": {
"table": "expeditionMistakeType"
}
},
"properties": {
"code": {
"id":true,
"type": "string"
},
"description": {
"type": "string"
}
}
}

View File

@ -0,0 +1,22 @@
{
"name": "ExpeditionPallet",
"options": {
"mysql": {
"table": "expeditionPallet"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
}
},
"acls": [{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "production",
"permission": "ALLOW"
}]
}

View File

@ -0,0 +1,47 @@
{
"name": "ExpeditionScan",
"options": {
"mysql": {
"table": "expeditionScan"
}
},
"properties": {
"id": {
"type": "number",
"description": "Identifier"
},
"expeditionFk": {
"type": "number",
"description": "Identifier",
"id": true
},
"palletFk": {
"type": "number",
"description": "Identifier",
"id": true
},
"scanned": {
"type": "date",
"default": "$now"
}
},
"relations": {
"expedition": {
"type": "belongsTo",
"model": "Expedition",
"foreignKey": "expeditionFk"
},
"pallet": {
"type": "belongsTo",
"model": "expeditionPallet",
"foreignKey": "palletFk"
}
},
"acls": [{
"accessType": "WRITE",
"principalType": "ROLE",
"principalId": "production",
"permission": "ALLOW"
}]
}

View File

@ -0,0 +1,49 @@
{
"name": "SaleMistake",
"base": "VnModel",
"options": {
"mysql": {
"table": "saleMistake"
}
},
"properties": {
"id": {
"id": true,
"type": "number",
"description": "Identifier"
},
"created": {
"type": "date"
},
"saleFk": {
"type": "number",
"required": true
},
"userFk": {
"type": "number",
"required": true
},
"typeFk": {
"type": "number",
"required": true
}
},
"relations": {
"sale": {
"type": "belongsTo",
"model": "Sale",
"foreignKey": "saleFk"
},
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "userFk"
},
"mistakeType": {
"type": "belongsTo",
"model": "MistakeType",
"foreignKey": "typeFk"
}
}
}

View File

@ -43,6 +43,9 @@
}, },
"EducationLevel": { "EducationLevel": {
"dataSource": "vn" "dataSource": "vn"
},
"MistakeType": {
"dataSource": "vn"
}, },
"ProfileType":{ "ProfileType":{
"dataSource": "vn" "dataSource": "vn"
@ -83,6 +86,12 @@
"WorkerMana": { "WorkerMana": {
"dataSource": "vn" "dataSource": "vn"
}, },
"WorkerMistake": {
"dataSource": "vn"
},
"WorkerMistakeType": {
"dataSource": "vn"
},
"WorkerMedia": { "WorkerMedia": {
"dataSource": "vn" "dataSource": "vn"
}, },

View File

@ -0,0 +1,20 @@
{
"name": "MistakeType",
"base": "VnModel",
"options": {
"mysql": {
"table": "mistakeType"
}
},
"properties": {
"id": {
"id":true,
"type": "number"
},
"description": {
"type": "string"
}
}
}

View File

@ -0,0 +1,25 @@
{
"name": "WorkerMistake",
"base": "VnModel",
"options": {
"mysql": {
"table": "workerMistake"
}
},
"properties": {
"id": {
"id":true,
"type": "number"
},
"userFk": {
"type": "number"
},
"workerMistakeTypeFk": {
"type": "string"
},
"created": {
"type": "date"
}
}
}

View File

@ -0,0 +1,26 @@
{
"name": "WorkerMistakeType",
"base": "VnModel",
"options": {
"mysql": {
"table": "workerMistakeType"
}
},
"properties": {
"code": {
"id":true,
"type": "string"
},
"description": {
"type": "string"
}
},
"relations": {
"type": {
"type": "belongsTo",
"model": "WorkerMistakeType",
"foreignKey": "code"
}
}
}