refs #7406 worker formation #2511
|
@ -3799,3 +3799,12 @@ INSERT INTO `vn`.`ledgerCompany` 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);
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue