UNPKG

eyght-models

Version:

Models for eyght

17 lines (14 loc) 669 B
let mongoose = require('mongoose'); mongoose.Promise = global.Promise; let arCustPhSchema = new mongoose.Schema({ custID: [{type: mongoose.Schema.Types.ObjectId, ref: 'arCust', required: true}], phNum: {type: 'String'}, clientInfo: [{ clientID: {type: mongoose.Schema.Types.ObjectId, ref: 'eygClient'}, clientCustPhTypeID: {type: mongoose.Schema.Types.ObjectId, ref: 'genPhType'} }], active: {type: 'Boolean', required: true}, inactDt: {type: 'Date'}, //store all dates in utc inactRsnID: {type: mongoose.Schema.Types.ObjectId, ref: 'genInactRsn'} }, {timestamps: true}); module.exports = mongoose.model('arCustPh', arCustPhSchema, 'arCustPh');