123456789101112131415161718 |
- 'use strict';
- module.exports = app => {
- const mongoose = app.mongoose;
- const Schema = mongoose.Schema;
- const conn = app.mongooseDB.get('etlDB');
- // 用于提供流量查询结果数据
- const MsgQueryRecordSchema = new Schema({
- _id: { type: String }, // 日月年+序列号
- type: { type: String }, // 流量编码(MSC_016005:流量余量查询、MSC_016015:流量信息查询)
- is_success: { type: Number }, // 是否成功(1:成功 0:失败)
- create_time: { type: Number }, // 查询流量时间戳(毫秒)
- });
- MsgQueryRecordSchema.index({ create_time: -1 });
- MsgQueryRecordSchema.index({ create_time: -1, is_success: -1 });
- return conn.model('MsgQueryRecord', MsgQueryRecordSchema, 'msc_query_record');
- };
|