Ejemplo 1: mangosta de esquema json anidado
var mongoose =require('mongoose');
var Schema = mongoose.Schema;
var msg = new Schema({
messageType: String,
timestamp: Number,
messagestatus: String
});
var standardmessage = new Schema({
id: Number,
name: String,
type: String,
message: [msg]
});
Ejemplo 2: mangosta de esquema json anidado
var mongoose =require('mongoose');
var Schema = mongoose.Schema;
var standardmessage = new Schema({
id: Number,
name: String,
type: String,
message: {
messageType: String,
timestamp: Number,
messagestatus: String
}
});
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)