1234567891011121314151617 |
- 'use strict';
- // 弃用
- const Schema = require('mongoose').Schema;
- const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
- const Personroomtalk = {
- pr_id: { type: String, required: true, maxLength: 200 }, // 房间id
- type: { type: String, required: false, maxLength: 200 }, // 类型
- };
- const schema = new Schema(Personroomtalk, { toJSON: { virtuals: true } });
- schema.index({ id: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Personroomtalk', schema, 'person_room_talk');
- };
|