mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Initial Commit
This commit is contained in:
27
app/model/workorder.js
Normal file
27
app/model/workorder.js
Normal file
@ -0,0 +1,27 @@
|
||||
var mongoose = require('mongoose')
|
||||
Schema = mongoose.Schema,
|
||||
ObjectId = Schema.ObjectId;
|
||||
|
||||
var workorderSchema = new Schema({
|
||||
biomedId: Number,
|
||||
client: { type: ObjectId, ref: 'Client' },
|
||||
createdOn: Date,
|
||||
createdBy: { type: ObjectId, ref: 'User' },
|
||||
reason: String,
|
||||
remarks: String,
|
||||
status: String,
|
||||
scheduling: {
|
||||
start: Date,
|
||||
end: Date
|
||||
},
|
||||
calendarId: String,
|
||||
techs: [{ type: ObjectId, ref: 'User' }],
|
||||
history: [{
|
||||
oldValues: {},
|
||||
newValues: {},
|
||||
modifiedBy: { type: ObjectId, ref: 'User' }
|
||||
}],
|
||||
deleted: { type: Boolean, default: false }
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Workorder', workorderSchema);
|
Reference in New Issue
Block a user