refs #7406 worker formation #2511

Merged
carlossa merged 12 commits from 7406-workerFormation into dev 2024-06-25 11:17:58 +00:00
4 changed files with 139 additions and 3 deletions
Showing only changes of commit 723327918b - Show all commits

View File

@ -3799,3 +3799,12 @@ INSERT INTO `vn`.`ledgerCompany` SET
INSERT INTO `vn`.`ledgerConfig` SET INSERT INTO `vn`.`ledgerConfig` SET
maxTolerance = 0.01; maxTolerance = 0.01;
INSERT INTO vn.trainingCourse (workerFk,trainingCourseTypeFk,centerFk,started,ended,hasDiscount,hasDiploma)
VALUES (9,2,1,'2018-06-20 00:00:00.000','2020-06-24 00:00:00.000',0,1);
INSERT INTO vn.trainingCourse (workerFk,trainingCourseTypeFk,centerFk,started,ended,hasDiscount,hasDiploma)
VALUES (9,1,2,'2018-06-20 00:00:00.000','2020-06-24 00:00:00.000',1,0);
INSERT INTO vn.trainingCourse (workerFk,trainingCourseTypeFk,centerFk,started,ended,hasDiscount,hasDiploma)
VALUES (9,2,2,'2018-06-20 00:00:00.000','2020-06-24 00:00:00.000',1,1);

View File

@ -0,0 +1,21 @@
{
"name": "TrainingCenter",
"base": "VnModel",
"options": {
"mysql": {
"table": "trainingCenter"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": true
}
}
}

View File

@ -0,0 +1,67 @@
{
"name": "TrainingCourse",
"description": "List of workers who have completed training",
"base": "VnModel",
"options": {
"mysql": {
"table": "trainingCourse"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"workerFk": {
"type": "number",
"required": true
},
"trainingCourseTypeFk": {
"type": "number",
"required": true
},
"centerFk": {
"type" : "number"
},
"started": {
"type" : "date"
},
"ended": {
"type" : "date"
},
"invoice": {
"type" : "string"
},
"amount": {
"type" : "number"
},
"remark": {
"type" : "boolean"
},
"hasDiscount": {
"type" : "boolean"
},
"hasDiploma": {
"type" : "boolean"
}
},
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
},
"trainingCourseType": {
"type": "belongsTo",
"model": "trainingCourseType",
"foreignKey": "trainingCourseTypeFk"
},
"centerFk": {
"type": "belongsTo",
"model": "Center",
"foreignKey": "centerFk"
}
}
}

View File

@ -0,0 +1,39 @@
{
"name": "trainingCourseType",
"description": "List of trainings",
"base": "VnModel",
"options": {
"mysql": {
"table": "trainingCourseType"
}
},
"properties": {
"id": {
"type": "number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": true
}
},
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
},
"trainingCourseType": {
"type": "belongsTo",
"model": "trainingCourseType",
"foreignKey": "trainingCourseTypeFk"
},
"centerFk": {
"type": "belongsTo",
"model": "Center",
"foreignKey": "centerFk"
}
}
}