1234567891011121314151617181920 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
- // 云就业关联
- const YjyconnectSchema = {
- ycode: { type: String, required: true, maxLength: 200 }, // 云就业标识
- yorg: { type: String, required: true, maxLength: 200 }, // 云就业机构
- ytype: { type: String, required: true }, // 云就业身份标识
- suid: { type: String, required: true, maxLength: 200 }, // 双困生用户表id
- };
- const schema = new Schema(YjyconnectSchema, { toJSON: { virtuals: true } });
- schema.index({ id: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Yjyconnect', schema, 'yjyconnect');
- };
|