'use strict'; const Schema = require('mongoose').Schema; const SchemaDefine = { // 标识 vipTab: { type: String, required: false }, // openid openid: { type: String, required: true }, // 文章IDlist list: { type: Array, required: true }, // 绑定类型 type: { type: String, required: true }, }; const schema = new Schema(SchemaDefine); module.exports = app => { const { mongoose } = app; return mongoose.model('power', schema, 'power'); };