12345678910111213 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const SchemaDefine = {
- // 姓名
- name: { type: String, required: true },
- // 电话
- phone: { type: String, required: true },
- };
- const schema = new Schema(SchemaDefine);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('vip', schema, 'vip');
- };
|