12345678910111213141516171819202122232425262728293031323334353637383940 |
- 'use strict';
- module.exports = app => {
- const { mongoose } = app;
- const { Schema } = mongoose;
- const BannerSchema = new Schema({
- // 标题
- title: {
- type: String,
- },
- // 短标题
- shortTitle: {
- type: String,
- },
- // 摘要
- slug: {
- type: String,
- },
- // banner地址
- path: {
- tyoe: String,
- },
- // 附件
- annex: {
- type: String,
- },
- // 内容
- content: {
- type: Array,
- },
- // 创建时间
- createAt: {
- type: String,
- },
- // 数据id
- id: {
- type: String,
- },
- });
- return mongoose.model('Banner', BannerSchema);
- };
|