2013-05-06 03:38:29 -04:00
|
|
|
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: {},
|
2013-09-04 03:05:47 -04:00
|
|
|
pms: {},
|
2013-05-06 03:38:29 -04:00
|
|
|
workorders: [{ type: ObjectId, ref: 'Workorder' }],
|
2013-09-30 01:47:14 -04:00
|
|
|
deleted: { type: Boolean, default: false },
|
|
|
|
notes: {
|
|
|
|
internal: String,
|
|
|
|
tech: String
|
|
|
|
}
|
2013-05-06 03:38:29 -04:00
|
|
|
});
|
|
|
|
|
2013-09-04 03:05:47 -04:00
|
|
|
module.exports = mongoose.model('Client', clientSchema);
|