group.js 269 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 const mongoose = require("mongoose"); const { Schema } = mongoose; const GroupSchema = new Schema({ members: [{ type: Schema.Types.ObjectId, ref: 'User' }] },{ collection: 'group' }); const Group = mongoose.model('Group',GroupSchema); module.exports = Group;