eyght-models
Version:
Models for eyght
17 lines (14 loc) • 716 B
JavaScript
let mongoose = require('mongoose');
mongoose.Promise = global.Promise;
let arCustChgbkSchema = new mongoose.Schema({
clientID: {type: mongoose.Schema.Types.ObjectId, ref: 'eygClient'},
custID: {type: mongoose.Schema.Types.ObjectId, ref: 'arCust'},
chgbkCodeID: {type: mongoose.Schema.Types.ObjectId, ref: 'genCCChgbkCode'},
txnDt: {type: 'Date'}, //store all dates in utc
notes: {type: 'String'},
resolved: {type: 'Boolean'},
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('arCustChgbk', arCustChgbkSchema, 'arCustChgbk');