eyght-models
Version:
Models for eyght
32 lines (29 loc) • 1.5 kB
JavaScript
let mongoose = require('mongoose');
mongoose.Promise = global.Promise;
let eygClientMidSchema = new mongoose.Schema({
clientID: {type: mongoose.Schema.Types.ObjectId, ref: 'eygClient'},
clientMidNum: {type: 'Number'}, //this is a count for the number of mids for a client
midNum: {type: 'String'},
gwID: {type: mongoose.Schema.Types.ObjectId, ref: 'genAggr'},
gwWhositID: {type: mongoose.Schema.Types.ObjectId, ref: 'genAggr'}, //who the gw is really
procID: {type: mongoose.Schema.Types.ObjectId, ref: 'genAggr'},
procWhositID: {type: mongoose.Schema.Types.ObjectId, ref: 'genAggr'}, //who the proc is really (ie easy pay is really priority payment systems)
gwSubAcct: {type: 'String'},
procSubAcct: {type: 'String'},
midDescriptor: {type: 'String'},
retrieveHistoricalData: {type: 'Boolean'},
grabGwData: {type: 'Boolean'},
grabProcData: {type: 'Boolean'},
clientActive: {type: 'Boolean'},
clientInactDt: {type: 'Date'}, //store all dates in utc
clientInactRsn: {type: 'String'},
midMoLimit: {type: 'Number'},
midTxnLimit: {type: 'Number'},
aggrSame: {type: 'Boolean'}, //indicates whether the gw is the same as the proc
startDate: {type: 'Date'}, //store all dates in utc
endDate: {type: 'Date'}, //store all dates in utc
active: {type: 'Boolean', required: true},
inactDt: {type: 'Date'}, //store all dates in utc
inact_rsn: {type: 'String'}
}, {timestamps: true});
module.exports = mongoose.model('eygClientMid', eygClientMidSchema, 'eygClientMid');