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

@ -3788,14 +3788,23 @@ INSERT INTO vn.workerTeam(id, team, workerFk)
VALUES
(8, 1, 19);
INSERT INTO vn.workCenter (id, name, payrollCenterFk, counter, warehouseFk, street, geoFk, deliveryManAdjustment)
INSERT INTO vn.workCenter (id, name, payrollCenterFk, counter, warehouseFk, street, geoFk, deliveryManAdjustment)
VALUES(100, 'workCenterOne', 1, NULL, 1, 'gotham', NULL, NULL);
UPDATE vn.locker SET workerFk = 1110 WHERE id = 147;
UPDATE vn.locker SET workerFk = 1110 WHERE id = 147;
INSERT INTO `vn`.`ledgerCompany` SET
fiscalYear = YEAR(util.VN_CURDATE()),
bookEntry = 2;
INSERT INTO `vn`.`ledgerConfig` SET
INSERT INTO `vn`.`ledgerConfig` SET
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"
}
}
}