refs #5134 feat:modelsSalix
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Sergio De la torre 2023-08-11 12:45:18 +02:00
parent 9ef4ba9bef
commit a6047d257b
12 changed files with 167 additions and 2 deletions

View File

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

View File

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

View File

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

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

@ -29,6 +29,9 @@
"ExpeditionMistake": {
"dataSource": "vn"
},
"ExpeditionMistakeType": {
"dataSource": "vn"
},
"PrintServerQueue": {
"dataSource": "vn"
},
@ -50,6 +53,9 @@
"SaleGroupDetail": {
"dataSource": "vn"
},
"SaleMistake": {
"dataSource": "vn"
},
"SaleTracking": {
"dataSource": "vn"
},

View File

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

View File

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

View File

@ -40,6 +40,9 @@
},
"EducationLevel": {
"dataSource": "vn"
},
"MistakeType": {
"dataSource": "vn"
},
"ProfileType":{
"dataSource": "vn"
@ -80,6 +83,12 @@
"WorkerMana": {
"dataSource": "vn"
},
"WorkerMistake": {
"dataSource": "vn"
},
"WorkerMistakeType": {
"dataSource": "vn"
},
"WorkerMedia": {
"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,27 @@
{
"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"
}
}
}