UNPKG

eyght-models

Version:

Models for eyght

17 lines (14 loc) 678 B
let mongoose = require('mongoose'); mongoose.Promise = global.Promise; let arCtryReconSchema = new mongoose.Schema({ custID: {type: mongoose.Schema.Types.ObjectId, ref: 'arCust', required: true}, ctryID: {type: mongoose.Schema.Types.ObjectId, ref: 'genCtry', required: true}, ctryAddr: {type: 'String'}, ctryIP: {type: 'String'}, ctryCC: {type: 'String'}, ctryBillAddr: {type: 'String'}, 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('arCtryRecon', arCtryReconSchema, 'arCtryRecon');