mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
21 lines
535 B
JavaScript
21 lines
535 B
JavaScript
var mongoose = require('mongoose')
|
|
Schema = mongoose.Schema,
|
|
ObjectId = Schema.ObjectId;
|
|
|
|
var deviceSchema = new Schema({
|
|
client: { type: ObjectId, ref: 'Client' },
|
|
deviceType: { type: ObjectId, ref: 'DeviceType' },
|
|
|
|
biomedId: String,
|
|
serialNumber: String,
|
|
purchaseDate: Date,
|
|
warrantyExpiration: Date,
|
|
location: String,
|
|
frequencyType: String,
|
|
frequencySchedule: [],
|
|
lastTestRun: {},
|
|
deleted: { type: Boolean, default: false }
|
|
});
|
|
|
|
module.exports = mongoose.model('Device', deviceSchema);
|