Files
biomedjs/app/model/device.js
Dobie Wollert b4e727c0e6 latest bits
2015-08-03 05:00:22 -04:00

18 lines
463 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,
deleted: { type: Boolean, default: false }
});
module.exports = mongoose.model('Device', deviceSchema);