refs #7529 back models acls #2563

Merged
carlossa merged 19 commits from 7529-workerPIT into dev 2024-11-20 12:21:31 +00:00
5 changed files with 148 additions and 0 deletions
Showing only changes of commit 1a01b3e587 - Show all commits

View File

@ -0,0 +1,8 @@
-- Place your SQL code here
-- Auto-generated SQL script #202406101036
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('Worker','workerRelatives','*','ALLOW','ROLE','hr');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('Worker','workerIrpf','*','ALLOW','ROLE','hr');
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
VALUES ('Worker','disabilityGrade','*','ALLOW','ROLE','hr');

View File

@ -124,6 +124,15 @@
},
"Locker": {
"dataSource": "vn"
},
"WorkerIrpf": {
"dataSource": "vn"
},
"DisabilityGrade": {
"dataSource": "vn"
},
"WorkerRelatives": {
"dataSource": "vn"
}
}

View File

@ -0,0 +1,18 @@
{
"name": "DisabilityGrade",
"base": "VnModel",
"options": {
"mysql": {
"table": "disabilityGrade"
}
},
"properties": {
"id": {
"id": true,
"type": "number"
},
"description": {
"type": "string"
}
}
}

View File

@ -0,0 +1,60 @@
{
"name": "WorkerIrpf",
"description": "Model 145 IRPF",
"base": "VnModel",
"options": {
"mysql": {
"table": "workerIrpf"
}
},
"properties": {
"workerFk": {
"type": "number",
"id": true,
"description": "Identifier"
},
"spouseNif": {
"type": "string"
},
"geographicMobilityDate": {
"type": "date"
},
"disabilityGradeFk": {
"type" : "number"
},
"isDependent": {
"type" : "number"
},
"familySituation": {
"type" : "number"
},
"spousePension": {
"type" : "number"
},
"childPension": {
"type" : "number"
},
"hasHousingPaymentBefore": {
"type" : "number"
},
"hasHousingPaymentAfter": {
"type" : "number"
},
"updated": {
"type" : "date"
}
},
"relations": {
"disabilityGrade": {
"type": "belongsTo",
"model": "disabilityGrade",
"foreignKey": "disabilityGradeFk"
},
"worker": {
"type": "belongsTo",
"model": "VnUser",
"foreignKey": "workerFK"
}
}
}

View File

@ -0,0 +1,53 @@
{
"name": "WorkerRelatives",
"description": "Model 145 IRPF",
"base": "VnModel",
"options": {
"mysql": {
"table": "workerRelatives"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"workerFk": {
"type": "number"
},
"isDescendant": {
"type": "number"
},
"disabilityGradeFk": {
"type" : "number"
},
"birthed": {
"type" : "number"
},
"adoptionYear": {
"type" : "number"
},
"isDependend": {
"type" : "boolean"
},
"islointCustody": {
"type" : "boolean"
},
"updated": {
"type" : "date"
}
},
"relations": {
"disabilityGrade": {
"type": "belongsTo",
"model": "disabilityGrade",
"foreignKey": "disabilityGradeFk"
},
"worker": {
"type": "belongsTo",
"model": "WorkerIrpf",
"foreignKey": "workerFK"
}
}
}