resume.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
  4. const { Secret } = require('naf-framework-mongoose/lib/model/schema');
  5. // 简历表
  6. const ResumeSchema = {
  7. talents_userId: { type: String, required: true, maxLength: 500 }, // 用户id
  8. title: { type: String, required: true, maxLength: 500 }, // 简历名称
  9. name: { type: String, required: true, maxLength: 200 }, // 姓名
  10. imgpath: { type: String, required: false, maxLength: 500 }, // 头像图片路径
  11. gender: { type: String, required: false, maxLength: 200 }, // 性别
  12. nation: { type: String, required: false, maxLength: 200 }, // 民族
  13. birth: { type: String, required: false, maxLength: 500 }, // 出生年月
  14. marital: { type: String, required: false, maxLength: 200 }, // 婚姻状况,0-未婚,1-已婚
  15. hukou: { type: String, required: false, maxLength: 500 }, // 户口所在地
  16. cardnumber: { type: String, required: false, maxLength: 500 }, // 身份证号
  17. addr: { type: String, required: false, maxLength: 500 }, // 当前住址
  18. education: { type: String, required: false, maxLength: 500 }, // 学历
  19. phone: { type: String, required: false, maxLength: 200 }, // 手机号
  20. email: { type: String, required: false, maxLength: 200 }, // 邮箱
  21. job_nature: { type: String, required: false, maxLength: 200 }, // 工作性质,0-兼职,1-全职
  22. profession: { type: String, required: false }, // 求职意向
  23. workplace: { type: String, required: false }, // 期望工作地点
  24. salary: { type: String, required: false, maxLength: 500 }, // 薪资要求
  25. current: { type: String, required: false, maxLength: 500 }, // 目前状况
  26. introduction: { type: String, required: false }, // 自我简介
  27. work_exp: { type: String, required: false }, // 工作经验
  28. project_exp: { type: String, required: false }, // 项目经验
  29. education_exp: { type: String, required: false }, // 教育经历
  30. language: { type: String, required: false }, // 语言能力
  31. skills: { type: String, required: false }, // 专业技能
  32. hobbies: { type: String, required: false }, // 兴趣爱好
  33. state: { type: String, required: false, maxLength: 200 }, // 状态,0-草稿,1-发布,2-删除
  34. };
  35. const schema = new Schema(ResumeSchema, { toJSON: { virtuals: true } });
  36. schema.index({ id: 1 });
  37. schema.plugin(metaPlugin);
  38. module.exports = app => {
  39. const { mongoose } = app;
  40. return mongoose.model('Resume', schema, 'talent_resume');
  41. }
  42. ;