const mongoose = require("mongoose"); const EventSchema = new mongoose.Schema({ event_name: { type: String, required: true, unique: false, }, event_date: { type: Date, required: true, unique: false, }, event_budget: { type: Number, required: true, unique: false, }, event_spent: { type: Number, required: true, unique: false, }, invitees: { type: Array, required: true, unique: false, }, attendees: { type: Number, required: true, unique: false }, event_spent_desc: { type: Array, required: true, unique: false, }, owner_email: { type: String, required: true, unique: false }, favorited_venues: { type: Array, required: false, unique: false, }, tasks: { type: Array, required: true, unique: false, }, tasks_done: { type: Array, required: true, unique: false, }, }); module.exports = mongoose.model.Events || mongoose.model("Events", EventSchema);