draft.js 726 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const SchemaDefine = {
  4. // 标题
  5. title: { type: String, required: true },
  6. // 姓名
  7. name: { type: String, required: true },
  8. // 电话
  9. phone: { type: String, required: true },
  10. // 单位
  11. workUnit: { type: String, required: true },
  12. // 地址
  13. address: { type: String, required: true },
  14. // 文件地址
  15. url: { type: String, required: false },
  16. // 用户id
  17. openid: { type: String, required: true },
  18. // 状态 0=审核中,1=已审核, 2=已录用
  19. status: { type: String, required: true },
  20. };
  21. const schema = new Schema(SchemaDefine);
  22. module.exports = app => {
  23. const { mongoose } = app;
  24. return mongoose.model('draft', schema, 'draft');
  25. };