12345678910111213141516171819202122232425262728293031 |
- '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 RecruitmentSchema = {
- license: { type: String, required: true, maxLength: 200 }, // 信用代码
- name: { type: String, required: true, maxLength: 500 }, // 招聘信息名称
- column_id: { type: String, required: false, maxLength: 200 }, // 栏目id
- salary: { type: String, required: false, maxLength: 200 }, // 职位月薪
- job_nature: { type: String, required: false, maxLength: 200 }, // 工作性质,0-兼职,1-全职
- profession: { type: String, required: false, maxLength: 500 }, // 公司名称
- workplace: { type: String, required: false, maxLength: 200 }, // 工作地点
- workexp: { type: String, required: false }, // 工作经验
- education: { type: String, required: false, maxLength: 200 }, // 学历
- people_number: { type: String, required: false, maxLength: 200 }, // 招聘人数
- explains: { type: String, required: false }, // 职位说明
- state: { type: String, required: false, maxLength: 200 }, // 状态,0-草稿,1-发布,2-删除
- };
- const schema = new Schema(RecruitmentSchema, { toJSON: { virtuals: true } });
- schema.index({ id: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Recruitment', schema, 'talent_recruitment');
- }
- ;
|