Files
biomedjs/app/model/client.js
Dobie Wollert 460e8f0be0 latest digs
2013-09-04 03:05:47 -04:00

27 lines
543 B
JavaScript

var mongoose = require('mongoose'),
Schema = mongoose.Schema,
ObjectId = Schema.ObjectId;
var clientSchema = new Schema({
name: String,
identifier: String,
address: {
street1: String,
street2: String,
city: String,
state: String,
zip: String
},
contacts: [{
name: String,
phone: String,
email: String
}],
frequencies: {},
pms: {},
workorders: [{ type: ObjectId, ref: 'Workorder' }],
deleted: { type: Boolean, default: false }
});
module.exports = mongoose.model('Client', clientSchema);