/** * Created by zhang on 2020/2/14. */ let mongoose = require("mongoose"); let Schema = mongoose.Schema; let collectionName = 'welcome_setting'; let modelSchema = { // ID ID: { type: String, index: true }, compilationId: String, normal:{ showType:{type:Number,default:0},// 1 每天一次 2 每次登录显示,0 关闭 context:String }, // 专业用户 professional: { showType:{type:Number,default:0},// 1 每天一次 2 每次登录显示,0 关闭 context:String } }; mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));