12345678910111213141516171819202122232425262728 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
- const LookuserSchema = {
- roomid: { type: String, required: false, maxLength: 200 },
- roomname: { type: String, required: false, maxLength: 200 },
- userid: { type: String, required: false, maxLength: 200 },
- username: { type: String, required: false, maxLength: 200 },
- phone: { type: String, required: false, maxLength: 200 },
- switchrole: { type: String, required: false },
- createtime: { type: String, required: false, maxLength: 200 },
- isxf: { type: String, required: false, maxLength: 200 },
- hosname: { type: String, required: false },
- deptname: { type: String, required: false },
- level: { type: String, required: false },
- major: { type: String, required: false },
- isonline: { type: String, required: false, maxLength: 200, default: '0' },
- };
- const schema = new Schema(LookuserSchema, { toJSON: { virtuals: true } });
- schema.index({ id: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Lookuser', schema, 'lookuser');
- };
|