2017-10-13 14:22:45 +00:00
|
|
|
{
|
2019-02-01 08:31:01 +00:00
|
|
|
"name": "Worker",
|
|
|
|
"description": "Company employees",
|
2023-12-05 06:48:56 +00:00
|
|
|
"base": "VnModel",
|
|
|
|
"mixins": {
|
|
|
|
"Loggable": true
|
|
|
|
},
|
2019-02-01 08:31:01 +00:00
|
|
|
"options": {
|
|
|
|
"mysql": {
|
|
|
|
"table": "worker"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
2022-03-31 08:54:30 +00:00
|
|
|
"type": "number",
|
2019-02-01 08:31:01 +00:00
|
|
|
"id": true,
|
|
|
|
"description": "Identifier"
|
|
|
|
},
|
|
|
|
"firstName": {
|
|
|
|
"type": "string",
|
|
|
|
"required": true
|
|
|
|
},
|
2019-02-27 12:10:26 +00:00
|
|
|
"lastName": {
|
2019-02-01 08:31:01 +00:00
|
|
|
"type": "string",
|
2019-08-27 09:12:17 +00:00
|
|
|
"required": true
|
2019-02-01 08:31:01 +00:00
|
|
|
},
|
|
|
|
"phone": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "string"
|
2019-02-01 08:31:01 +00:00
|
|
|
},
|
2020-09-22 11:59:00 +00:00
|
|
|
"bossFk": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "number"
|
2022-03-31 07:18:18 +00:00
|
|
|
},
|
|
|
|
"maritalStatus": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "string"
|
2022-03-31 07:18:18 +00:00
|
|
|
},
|
|
|
|
"originCountryFk": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "number"
|
2022-03-31 07:18:18 +00:00
|
|
|
},
|
|
|
|
"educationLevelFk": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "number"
|
2022-03-31 07:18:18 +00:00
|
|
|
},
|
|
|
|
"SSN": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "string"
|
2022-04-27 12:17:41 +00:00
|
|
|
},
|
2022-07-27 10:16:41 +00:00
|
|
|
"mobileExtension": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "number"
|
2022-11-14 14:19:16 +00:00
|
|
|
},
|
|
|
|
"code": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "string",
|
|
|
|
"required": true
|
2023-02-27 07:39:46 +00:00
|
|
|
},
|
2023-10-17 12:02:08 +00:00
|
|
|
"fi": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "string"
|
2023-10-17 12:02:08 +00:00
|
|
|
},
|
|
|
|
"birth": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "date"
|
2023-10-17 12:02:08 +00:00
|
|
|
},
|
2023-10-02 07:14:30 +00:00
|
|
|
"isF11Allowed": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "boolean"
|
2024-01-12 08:03:54 +00:00
|
|
|
},
|
|
|
|
"sex": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "string"
|
2024-05-09 06:45:17 +00:00
|
|
|
},
|
2024-05-03 12:54:12 +00:00
|
|
|
"isFreelance": {
|
2024-06-05 14:27:00 +00:00
|
|
|
"type": "boolean"
|
2024-05-17 12:28:28 +00:00
|
|
|
},
|
|
|
|
"fiDueDate": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"hasMachineryAuthorized": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"seniority": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"isDisable": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"isSsDiscounted": {
|
|
|
|
"type": "boolean"
|
2019-02-01 08:31:01 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"relations": {
|
|
|
|
"user": {
|
|
|
|
"type": "belongsTo",
|
2023-01-24 08:05:50 +00:00
|
|
|
"model": "VnUser",
|
2023-07-04 07:57:16 +00:00
|
|
|
"foreignKey": "id"
|
2019-02-01 08:31:01 +00:00
|
|
|
},
|
2021-02-24 15:12:44 +00:00
|
|
|
"boss": {
|
|
|
|
"type": "belongsTo",
|
2023-01-24 08:05:50 +00:00
|
|
|
"model": "VnUser",
|
2021-02-24 15:12:44 +00:00
|
|
|
"foreignKey": "bossFk"
|
|
|
|
},
|
2019-02-01 08:31:01 +00:00
|
|
|
"client": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Client",
|
2023-08-22 08:45:41 +00:00
|
|
|
"foreignKey": "id"
|
2019-02-01 08:31:01 +00:00
|
|
|
},
|
|
|
|
"sip": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Sip",
|
2023-08-22 08:45:41 +00:00
|
|
|
"foreignKey": "id"
|
2019-02-01 08:31:01 +00:00
|
|
|
},
|
|
|
|
"department": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "WorkerDepartment",
|
|
|
|
"foreignKey": "id"
|
|
|
|
},
|
|
|
|
"collegues": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "WorkerTeamCollegues",
|
|
|
|
"foreignKey": "workerFk"
|
2023-12-26 12:44:52 +00:00
|
|
|
},
|
|
|
|
"locker": {
|
2024-05-10 11:04:12 +00:00
|
|
|
"type": "hasMany",
|
2023-12-26 12:44:52 +00:00
|
|
|
"model": "Locker",
|
2024-01-12 08:03:54 +00:00
|
|
|
"foreignKey": "workerFk"
|
2024-06-18 08:12:22 +00:00
|
|
|
},
|
2024-09-12 08:28:29 +00:00
|
|
|
"medicalReview": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "MedicalReview",
|
|
|
|
"foreignKey": "workerFk"
|
|
|
|
},
|
2024-06-17 12:17:43 +00:00
|
|
|
"incomes": {
|
|
|
|
"type": "hasMany",
|
2024-06-25 14:03:59 +00:00
|
|
|
"model": "WorkerIncome",
|
|
|
|
"foreignKey": "workerFk"
|
2024-06-25 12:49:32 +00:00
|
|
|
},
|
2024-05-27 09:50:15 +00:00
|
|
|
"trainingCourse": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "TrainingCourse",
|
2024-06-18 08:12:22 +00:00
|
|
|
"foreignKey": "workerFk"
|
2024-09-12 08:27:18 +00:00
|
|
|
},
|
|
|
|
"mail": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "WorkerTimeControlMail",
|
|
|
|
"foreignKey": "workerFk"
|
2019-02-01 08:31:01 +00:00
|
|
|
}
|
2024-05-08 09:03:18 +00:00
|
|
|
},
|
2024-06-05 14:27:00 +00:00
|
|
|
"acls": [
|
2024-05-08 09:03:18 +00:00
|
|
|
{
|
|
|
|
"property": "__get__locker",
|
|
|
|
"accessType": "READ",
|
|
|
|
"permission": "ALLOW",
|
|
|
|
"principalType": "ROLE",
|
|
|
|
"principalId": "$owner"
|
2024-09-12 08:27:18 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"property": "__get__mail",
|
|
|
|
"accessType": "READ",
|
|
|
|
"permission": "ALLOW",
|
|
|
|
"principalType": "ROLE",
|
|
|
|
"principalId": "$owner"
|
2024-05-08 09:03:18 +00:00
|
|
|
}
|
2024-09-12 08:29:03 +00:00
|
|
|
],
|
|
|
|
"scopes": {
|
|
|
|
"descriptor": {
|
|
|
|
"fields": [
|
|
|
|
"id",
|
|
|
|
"phone"
|
|
|
|
],
|
|
|
|
"include": [
|
|
|
|
{
|
|
|
|
"relation": "user",
|
|
|
|
"scope": {
|
|
|
|
"fields": [
|
|
|
|
"name",
|
|
|
|
"nickname"
|
|
|
|
],
|
|
|
|
"include": {
|
|
|
|
"relation": "emailUser",
|
|
|
|
"scope": {
|
|
|
|
"fields": [
|
|
|
|
"email"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"relation": "department",
|
|
|
|
"scope": {
|
|
|
|
"fields": [
|
|
|
|
"departmentFk"
|
|
|
|
],
|
|
|
|
"include": [
|
|
|
|
{
|
|
|
|
"relation": "department",
|
|
|
|
"scope": {
|
|
|
|
"fields": [
|
|
|
|
"id",
|
|
|
|
"name"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"relation": "sip",
|
|
|
|
"scope": {
|
|
|
|
"fields": [
|
|
|
|
"extension"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2024-09-06 08:40:16 +00:00
|
|
|
}
|