1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- 'use strict';
- module.exports = app => {
- const { mongoose } = app;
- const { Schema } = mongoose;
- const ContentSchema = new Schema({
- // 标题
- title: {
- type: String,
- },
- // 摘要
- slug: {
- type: String,
- },
- // 缩略图
- thumbnail: {
- type: String,
- },
- // 附件
- annex: {
- type: String,
- },
- // 缩略图
- annexname: {
- type: String,
- },
- // 内容
- content: {
- type: String,
- },
- // 创建时间
- createAt: {
- type: String,
- },
- // 置顶
- istop: {
- type: Number,
- },
- // 数据id
- id: {
- type: String,
- },
- // 绑定菜单组
- menus: {
- type: String,
- },
- // 绑定栏目
- columns: {
- type: Array,
- },
- // 文章年
- year: {
- type: String,
- },
- // 文章日期
- date: {
- type: String,
- },
- // 访问量
- hits: {
- type: Number,
- default: 0,
- },
- // 第多少期
- term: {
- type: String,
- },
- // 排序
- sort: {
- type: Number,
- default: 0,
- },
- });
- return mongoose.model('Content', ContentSchema);
- };
|