|
@@ -0,0 +1,20 @@
|
|
|
+'use strict';
|
|
|
+const Schema = require('mongoose').Schema;
|
|
|
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
+
|
|
|
+// 栏目表
|
|
|
+const ImgtxtdockSchema = {
|
|
|
+ name: { type: String, required: true, maxLength: 500 }, // 名称
|
|
|
+ type: { type: String, required: false, maxLength: 500 }, // 类别
|
|
|
+ dock_id: { type: String, required: false, maxLength: 500 }, // 展会id
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+const schema = new Schema(ImgtxtdockSchema, { toJSON: { virtuals: true } });
|
|
|
+schema.index({ id: 1 });
|
|
|
+schema.plugin(metaPlugin);
|
|
|
+
|
|
|
+module.exports = app => {
|
|
|
+ const { mongoose } = app;
|
|
|
+ return mongoose.model('Imgtxtdock', schema, 'imgtxtdock');
|
|
|
+};
|