|
@@ -0,0 +1,46 @@
|
|
|
|
+'use strict';
|
|
|
|
+const Schema = require('mongoose').Schema;
|
|
|
|
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
|
+const { Secret } = require('naf-framework-mongoose/lib/model/schema');
|
|
|
|
+
|
|
|
|
+// 简历表
|
|
|
|
+const ResumeSchema = {
|
|
|
|
+ talents_userId: { type: String, required: true, maxLength: 500 }, // 用户id
|
|
|
|
+ title: { type: String, required: true, maxLength: 500 }, // 简历名称
|
|
|
|
+ name: { type: String, required: true, maxLength: 200 }, // 姓名
|
|
|
|
+ imgpath: { type: String, required: false, maxLength: 500 }, // 头像图片路径
|
|
|
|
+ gender: { type: String, required: false, maxLength: 200 }, // 性别
|
|
|
|
+ nation: { type: String, required: false, maxLength: 200 }, // 民族
|
|
|
|
+ birth: { type: String, required: false, maxLength: 500 }, // 出生年月
|
|
|
|
+ marital: { type: String, required: false, maxLength: 200 }, // 婚姻状况,0-未婚,1-已婚
|
|
|
|
+ hukou: { type: String, required: false, maxLength: 500 }, // 户口所在地
|
|
|
|
+ cardnumber: { type: String, required: false, maxLength: 500 }, // 身份证号
|
|
|
|
+ addr: { type: String, required: false, maxLength: 500 }, // 当前住址
|
|
|
|
+ education: { type: String, required: false, maxLength: 500 }, // 学历
|
|
|
|
+ phone: { type: String, required: false, maxLength: 200 }, // 手机号
|
|
|
|
+ email: { type: String, required: false, maxLength: 200 }, // 邮箱
|
|
|
|
+ job_nature: { type: String, required: false, maxLength: 200 }, // 工作性质,0-兼职,1-全职
|
|
|
|
+ profession: { type: String, required: false }, // 求职意向
|
|
|
|
+ workplace: { type: String, required: false }, // 期望工作地点
|
|
|
|
+ salary: { type: String, required: false, maxLength: 500 }, // 薪资要求
|
|
|
|
+ current: { type: String, required: false, maxLength: 500 }, // 目前状况
|
|
|
|
+ introduction: { type: String, required: false }, // 自我简介
|
|
|
|
+ work_exp: { type: String, required: false }, // 工作经验
|
|
|
|
+ project_exp: { type: String, required: false }, // 项目经验
|
|
|
|
+ education_exp: { type: String, required: false }, // 教育经历
|
|
|
|
+ language: { type: String, required: false }, // 语言能力
|
|
|
|
+ skills: { type: String, required: false }, // 专业技能
|
|
|
|
+ hobbies: { type: String, required: false }, // 兴趣爱好
|
|
|
|
+ state: { type: String, required: false, maxLength: 200 }, // 状态,0-草稿,1-发布,2-删除
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+const schema = new Schema(ResumeSchema, { toJSON: { virtuals: true } });
|
|
|
|
+schema.index({ id: 1 });
|
|
|
|
+schema.plugin(metaPlugin);
|
|
|
|
+
|
|
|
|
+module.exports = app => {
|
|
|
|
+ const { mongoose } = app;
|
|
|
|
+ return mongoose.model('Resume', schema, 'resume');
|
|
|
|
+}
|
|
|
|
+;
|