{ "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" }, "trainingCenter": { "type": "belongsTo", "model": "TrainingCenter", "foreignKey": "centerFk" } } }