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": { "isLabeler": {
"type": "boolean" "type": "boolean"
} }
},
"relations": {
"sector": {
"type": "belongsTo",
"model": "Sector",
"foreignKey": "sectorFk"
}
}, },
"acls": [{ "acls": [{
"accessType": "READ", "accessType": "READ",

View File

@ -10,5 +10,8 @@
}, },
"Sector": { "Sector": {
"dataSource": "vn" "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": { "ExpeditionMistake": {
"dataSource": "vn" "dataSource": "vn"
}, },
"ExpeditionMistakeType": {
"dataSource": "vn"
},
"PrintServerQueue": { "PrintServerQueue": {
"dataSource": "vn" "dataSource": "vn"
}, },
@ -50,6 +53,9 @@
"SaleGroupDetail": { "SaleGroupDetail": {
"dataSource": "vn" "dataSource": "vn"
}, },
"SaleMistake": {
"dataSource": "vn"
},
"SaleTracking": { "SaleTracking": {
"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,20 @@
{
"name": "ExpeditionMistakeType",
"base": "VnModel",
"options": {
"mysql": {
"table": "expeditionMistakeType"
}
},
"properties": {
"code": {
"id":true,
"type": "string"
},
"description": {
"type": "string"
}
}
}

View File

@ -46,4 +46,4 @@
} }
} }
} }

View File

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