mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Added a bunch of stuff
This commit is contained in:
11
app/model/checkList.js
Normal file
11
app/model/checkList.js
Normal file
@ -0,0 +1,11 @@
|
||||
var mongoose = require('mongoose')
|
||||
Schema = mongoose.Schema,
|
||||
ObjectId = Schema.ObjectId;
|
||||
|
||||
var checkListSchema = new Schema({
|
||||
name: String,
|
||||
fields: [{}],
|
||||
deleted: { type: Boolean, default: false }
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('CheckList', checkListSchema);
|
@ -11,6 +11,8 @@ var deviceSchema = new Schema({
|
||||
purchaseDate: Date,
|
||||
warrantyExpiration: Date,
|
||||
location: String,
|
||||
frequencyType: String,
|
||||
frequencySchedule: [],
|
||||
deleted: { type: Boolean, default: false }
|
||||
});
|
||||
|
||||
|
@ -10,6 +10,7 @@ var deviceTypeSchema = new Schema({
|
||||
links: String,
|
||||
partsRecommended: String,
|
||||
images: [{ type: String }],
|
||||
checkList: { type: ObjectId, ref: 'CheckList' },
|
||||
deleted: { type: Boolean, default: false }
|
||||
});
|
||||
|
||||
|
14
app/model/testRun.js
Normal file
14
app/model/testRun.js
Normal file
@ -0,0 +1,14 @@
|
||||
var mongoose = require('mongoose')
|
||||
Schema = mongoose.Schema,
|
||||
ObjectId = Schema.ObjectId;
|
||||
|
||||
var testRunSchema = new Schema({
|
||||
device: { type: ObjectId, ref: 'Device' },
|
||||
fields: [{}],
|
||||
date: Date,
|
||||
result: Boolean,
|
||||
comment: String,
|
||||
deleted: { type: Boolean, default: false }
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('TestRun', testRunSchema);
|
@ -30,7 +30,8 @@ var workorderSchema = new Schema({
|
||||
checkNumber: String,
|
||||
paidOn: Date,
|
||||
alternativeContact: String,
|
||||
trackingNumber: String
|
||||
trackingNumber: String,
|
||||
devices: [{ type: ObjectId, ref: 'Device' }]
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Workorder', workorderSchema);
|
||||
|
Reference in New Issue
Block a user