1234567891011121314151617181920212223 |
- "use strict";
- const Schema = require("mongoose").Schema;
- const moment = require("moment");
- const metaPlugin = require("naf-framework-mongoose-free/lib/model/meta-plugin");
- const { ObjectId } = require("mongoose").Types;
- // 展会视频表表
- const dock_video = {
- dock_id: { type: String }, // 展会id
- title: { type: String }, // 标题
- brief: { type: String }, // 简介
- video_url: { type: Array }, // 视频地址
- remark: { type: String },
- };
- const schema = new Schema(dock_video, { toJSON: { virtuals: true } });
- schema.index({ id: 1 });
- schema.index({ dock_id: 1 });
- schema.index({ title: 1 });
- schema.index({ "meta.createdAt": 1 });
- schema.plugin(metaPlugin);
- module.exports = (app) => {
- const { mongoose } = app;
- return mongoose.model("DockVideo", schema, "dockVideo");
- };
|