1234567891011121314151617181920212223242526272829 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const SchemaDefine = {
- // 头像
- thumbnail: { type: String, required: false },
- // 昵称
- name: { type: String, required: true },
- // 手机号
- phone: { type: String, required: true },
- // 单位
- company: { type: String, required: false },
- // 标识
- vipTab: { type: String, required: false },
- // 标识
- tab: { type: String, required: false },
- // openid
- openid: { type: String, required: true },
- // 状态:0=正常,1=过期
- status: { type: String, required: true },
- // 创建时间
- startTime: { type: Number, required: true },
- // 结束时间
- endTime: { type: Number, required: true },
- };
- const schema = new Schema(SchemaDefine);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('vip', schema, 'vip');
- };
|