let mongoose = require('mongoose'); /* let workReportSchema = mongoose.Schema({ // Napi jelentés workId:{type: mongoose.Schema.Types.ObjectId}, date: {type: Date}, foremanId: {type: String}, workTitle: {type: String}, employeeList:[{ employeeId:{type: mongoose.Schema.Types.ObjectId}, workFlow: {type: String}, }] }) */ let workReportSchema = mongoose.Schema({ // Napi jelentés workId:{type: mongoose.Schema.Types.ObjectId}, date: {type: Date}, foremanId: {type: String}, workTitle: {type: String}, workFlow: [{ Title: {type: String}, employeeList:[{ employeeId:{type: mongoose.Schema.Types.ObjectId}, name: {type: String}, company: {type: String}, }] }], }) let WorkReport = module.exports = mongoose.model('WorkReport', workReportSchema);