32 lines
824 B
JavaScript
32 lines
824 B
JavaScript
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},
|
|
}]
|
|
}],
|
|
})
|
|
|
|
let WorkReport = module.exports = mongoose.model('WorkReport', workReportSchema); |