12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 'use strict';
- module.exports = app => {
- const { mongoose } = app;
- const { Schema } = mongoose;
- const PageSchema = new Schema({
- // 标题
- title: {
- type: String,
- },
- // 发表日期
- date: {
- type: String,
- },
- // 摘要
- slug: {
- type: String,
- },
- // 附件
- annex: {
- type: String,
- },
- annexname: {
- type: String,
- },
- // 内容
- content: {
- type: String,
- },
- // 创建时间
- createAt: {
- type: String,
- },
- // 数据id
- id: {
- type: String,
- },
- // 数据编码
- code: {
- type: String,
- },
- });
- return mongoose.model('Page', PageSchema);
- };
|