美文网首页
2019-11-07

2019-11-07

作者: 翌日生命科技 | 来源:发表于2019-11-07 09:31 被阅读0次

    ```

    let schema = mongoose.Schema({

      name: {type: String, default: ''}, // 名称

      imageUrl: {type: String, default: ''}, // 图片Url

      html: {type: String, default: ''}, // 正文

      type: {type: String, default: ''}, // 类型

      sort: {type: Number, default: 100}, //  排序

      tags: {type: Array, default: []}, // 标签

      isRecommend: {type: Boolean, default: false}, // 是否首页推荐

      active: {type: Boolean, default: true},

      deleted: {type: Boolean, default: false},

      createdAt: {type: Date, default: Date.now},

      updatedAt: {type: Date, default: Date.now},

    })

    let model = mongoose.model('article', schema, 'article')

    ```

    相关文章

      网友评论

          本文标题:2019-11-07

          本文链接:https://www.haomeiwen.com/subject/zmsmbctx.html