mirror of
https://github.com/BradNut/weddingsite
synced 2025-09-08 17:40:36 +00:00
20 lines
360 B
JavaScript
20 lines
360 B
JavaScript
import mongoose from 'mongoose';
|
|
|
|
const { Schema } = mongoose;
|
|
|
|
const groupSchema = new Schema({
|
|
name: String,
|
|
note: String,
|
|
rsvpSubmitted: {
|
|
type: Boolean,
|
|
deafult: false,
|
|
},
|
|
guests: [
|
|
{
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'Guest',
|
|
},
|
|
],
|
|
});
|
|
|
|
export default mongoose.models.Group || mongoose.model('Group', groupSchema);
|