小编swa*_*ran的帖子

如何将数据添加到邮递员

如果我想在下面的架构中添加一些数据:

'use strict';

var mongoose = require('mongoose')
, Schema = mongoose.Schema;
var notificationsSchema = new mongoose.Schema({
    notifyMessage                   : { 
            title                       : { type: String },
            des                         : { type: String }
        },
        notifier                        : { type: String },
        recipient                       : [{
            id                          : { type: String },
            status                      : {type:String,trim:true,enum:['read','unread']}
        }]
});

module.exports = mongoose.model('notification_tracker', notificationsSchema);
Run Code Online (Sandbox Code Playgroud)

我试过这种方式: 在此输入图像描述 在此输入图像描述

但它以这种方式结束了..

javascript postman

5
推荐指数
1
解决办法
907
查看次数

标签 统计

javascript ×1

postman ×1