139 lines
3.1 KiB
JSON
139 lines
3.1 KiB
JSON
{
|
|
"name": "Worker",
|
|
"description": "Company employees",
|
|
"base": "VnModel",
|
|
"mixins": {
|
|
"Loggable": true
|
|
},
|
|
"options": {
|
|
"mysql": {
|
|
"table": "worker"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"id": true,
|
|
"description": "Identifier"
|
|
},
|
|
"firstName": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"lastName": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"bossFk": {
|
|
"type": "number"
|
|
},
|
|
"maritalStatus": {
|
|
"type": "string"
|
|
},
|
|
"originCountryFk": {
|
|
"type": "number"
|
|
},
|
|
"educationLevelFk": {
|
|
"type": "number"
|
|
},
|
|
"SSN": {
|
|
"type": "string"
|
|
},
|
|
"mobileExtension": {
|
|
"type": "number"
|
|
},
|
|
"code": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"fi": {
|
|
"type": "string"
|
|
},
|
|
"birth": {
|
|
"type": "date"
|
|
},
|
|
"isF11Allowed": {
|
|
"type": "boolean"
|
|
},
|
|
"sex": {
|
|
"type": "string"
|
|
},
|
|
"isFreelance": {
|
|
"type": "boolean"
|
|
},
|
|
"fiDueDate": {
|
|
"type": "date"
|
|
},
|
|
"hasMachineryAuthorized": {
|
|
"type": "boolean"
|
|
},
|
|
"seniority": {
|
|
"type": "date"
|
|
},
|
|
"isDisable": {
|
|
"type": "boolean"
|
|
},
|
|
"isSsDiscounted": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"relations": {
|
|
"user": {
|
|
"type": "belongsTo",
|
|
"model": "VnUser",
|
|
"foreignKey": "id"
|
|
},
|
|
"boss": {
|
|
"type": "belongsTo",
|
|
"model": "VnUser",
|
|
"foreignKey": "bossFk"
|
|
},
|
|
"client": {
|
|
"type": "belongsTo",
|
|
"model": "Client",
|
|
"foreignKey": "id"
|
|
},
|
|
"sip": {
|
|
"type": "belongsTo",
|
|
"model": "Sip",
|
|
"foreignKey": "id"
|
|
},
|
|
"department": {
|
|
"type": "belongsTo",
|
|
"model": "WorkerDepartment",
|
|
"foreignKey": "id"
|
|
},
|
|
"collegues": {
|
|
"type": "hasMany",
|
|
"model": "WorkerTeamCollegues",
|
|
"foreignKey": "workerFk"
|
|
},
|
|
"locker": {
|
|
"type": "hasMany",
|
|
"model": "Locker",
|
|
"foreignKey": "workerFk"
|
|
},
|
|
"incomes": {
|
|
"type": "hasMany",
|
|
"model": "WorkerIncome"
|
|
},
|
|
"trainingCourse": {
|
|
"type": "hasMany",
|
|
"model": "TrainingCourse",
|
|
"foreignKey": "workerFk"
|
|
}
|
|
},
|
|
"acls": [
|
|
{
|
|
"property": "__get__locker",
|
|
"accessType": "READ",
|
|
"permission": "ALLOW",
|
|
"principalType": "ROLE",
|
|
"principalId": "$owner"
|
|
}
|
|
]
|
|
}
|