16 lines
298 B
JavaScript
16 lines
298 B
JavaScript
const mongoose = require('mongoose');
|
|
const Schema = mongoose.Schema;
|
|
|
|
// Define collection and schema for Post
|
|
let Room = new Schema({
|
|
title: {
|
|
type: String
|
|
},
|
|
members: {
|
|
type: Array
|
|
}
|
|
}, {
|
|
collection: 'rooms'
|
|
});
|
|
|
|
module.exports = mongoose.model('Room', Room); |