|
@@ -1,24 +0,0 @@
|
|
|
-'use strict';
|
|
|
-const Schema = require('mongoose').Schema;
|
|
|
-const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
-// 图片数组
|
|
|
-const images = new Schema({
|
|
|
- url: { type: String, required: true }, // 图片路径
|
|
|
-});
|
|
|
-// 展会信息表
|
|
|
-const ImgtxtdocksSchema = {
|
|
|
- dock_id: { type: String, required: true, maxLength: 500 }, // 展会id
|
|
|
- user_name: { type: String, required: false, maxLength: 500 }, // 发言人
|
|
|
- brief: { type: String, required: false, maxLength: 500 }, // 发言文字内容
|
|
|
- image: { type: [ images ], select: true }, // 图片
|
|
|
-};
|
|
|
-
|
|
|
-
|
|
|
-const schema = new Schema(ImgtxtdocksSchema, { toJSON: { virtuals: true } });
|
|
|
-schema.index({ id: 1 });
|
|
|
-schema.plugin(metaPlugin);
|
|
|
-
|
|
|
-module.exports = app => {
|
|
|
- const { mongoose } = app;
|
|
|
- return mongoose.model('Imgtxtdocks', schema, 'imgtxtdocks');
|
|
|
-};
|