apply-update.js 581 B

1234567891011121314151617
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const moment = require('moment');
  4. const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
  5. const { ObjectId } = require('mongoose').Types;
  6. // 绩效修改申请表
  7. const applyUpdate = {
  8. remark: { type: String },
  9. };
  10. const schema = new Schema(applyUpdate, { toJSON: { virtuals: true } });
  11. schema.index({ id: 1 });
  12. schema.index({ 'meta.createdAt': 1 });
  13. schema.plugin(metaPlugin);
  14. module.exports = app => {
  15. const { mongoose } = app;
  16. return mongoose.model('applyUpdate', schema, 'applyUpdate');
  17. };