nihao e4c8828577 爬虫增加教师 5 years ago
..
README.md c29e37b9a5 Update README.md 7 years ago
column.js e4c8828577 爬虫增加教师 5 years ago
img.js 7c80ad4b90 cms修改,爬虫吉林省事业单位招聘好使 5 years ago
menu.js e4c8828577 爬虫增加教师 5 years ago
modules.js 0d32796cb8 新改栏目,菜单,新闻,新加模块,信息列表 5 years ago
news.js 7c80ad4b90 cms修改,爬虫吉林省事业单位招聘好使 5 years ago
newslist.js 0d32796cb8 新改栏目,菜单,新闻,新加模块,信息列表 5 years ago
site.js 6044c09938 新增短信图片验证码 5 years ago

README.md

数据模型

'use strict';
const Schema = require('mongoose').Schema;

const SchemaDefine = {
  code: { type: String, required: true, maxLength: 64 },
  name: { type: String, required: true, maxLength: 128 },
  order: Number,
};
const schema = new Schema(SchemaDefine);
schema.index({ code: 1 }, { unique: true });

module.exports = app => {
  const { mongoose } = app;
  return mongoose.model('CodeCategory', schema, 'naf_code_category');
};