|
@@ -1,8 +1,8 @@
|
|
-'use strict';
|
|
|
|
-const Schema = require('mongoose').Schema;
|
|
|
|
-const moment = require('moment');
|
|
|
|
-const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
|
|
|
|
-const { ObjectId } = require('mongoose').Types;
|
|
|
|
|
|
+"use strict";
|
|
|
|
+const Schema = require("mongoose").Schema;
|
|
|
|
+const moment = require("moment");
|
|
|
|
+const metaPlugin = require("naf-framework-mongoose-free/lib/model/meta-plugin");
|
|
|
|
+const { ObjectId } = require("mongoose").Types;
|
|
// 绩效申请表
|
|
// 绩效申请表
|
|
const apply = {
|
|
const apply = {
|
|
user_id: { type: String }, // 用户id
|
|
user_id: { type: String }, // 用户id
|
|
@@ -19,7 +19,7 @@ schema.index({ id: 1 });
|
|
schema.index({ user_id: 1 });
|
|
schema.index({ user_id: 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
schema.plugin(metaPlugin);
|
|
schema.plugin(metaPlugin);
|
|
-module.exports = app => {
|
|
|
|
|
|
+module.exports = (app) => {
|
|
const { mongoose } = app;
|
|
const { mongoose } = app;
|
|
- return mongoose.model('Apply', schema, 'apply');
|
|
|
|
|
|
+ return mongoose.model("Apply", schema, "apply");
|
|
};
|
|
};
|