eyght-models
Version:
Models for eyght
15 lines (12 loc) • 680 B
JavaScript
let mongoose = require('mongoose');
mongoose.Promise = global.Promise;
let ssAggrTxnMapSchema = new mongoose.Schema({
aggrID: {type: mongoose.Schema.Types.ObjectId, ref: 'genAggr', required: true},
txnType: {type: 'String', required: true}, //this is what the aggr calls the txn
txnTypeID: {type: mongoose.Schema.Types.ObjectId, ref: 'ssTxnType', required: true},
txnStat: {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('ssAggrTxnMap', ssAggrTxnMapSchema, 'ssAggrTxnMap');