Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var chatSchema = new mongoose.Schema({
- creationDate: { type: Date, default: Date.now},
- messageCount: { type: Number, default: 0},
- members: [ { type: mongoose.Schema.ObjectId, ref : 'User' } ],
- messages: [ { type: mongoose.Schema.ObjectId, ref : 'Message' } ]
- });
- module.exports = restful.model('Chat', chatSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement