【发布时间】:2017-06-10 08:50:48
【问题描述】:
如果我想在下面的架构中添加一些数据:
'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);
但结果是这样的..
【问题讨论】:
-
请尝试以 JSON 格式发送原始数据。选择单选按钮“原始”。
标签: javascript postman