1234567891011121314151617 |
- 'use strict';
- module.exports = app => {
- const mongoose = app.mongoose;
- const Schema = mongoose.Schema;
- const conn = app.mongooseDB.get('etlDB');
- // APP异常数据结构
- const AppExceptionRecordSchema = new Schema({
- _id: { type: String }, // 日月年拼接
- exception_type: { type: Number }, // 异常类型(系统异常/功能异常)
- sys_count: { type: Number }, // 系统异常总数
- create_time: { type: Number }, // 统计时间(时间戳)
- interface_exception_count: { type: Number }, // 接口异常总数
- });
- AppExceptionRecordSchema.index({ create_time: -1 });
- return conn.model('AppExceptionRecord', AppExceptionRecordSchema, 'app_exception_record');
- };
|