feat: Initial commit of backend services and AGENTS.md
This commit is contained in:
33
backend/models/Event.js
Normal file
33
backend/models/Event.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
const EventSchema = new mongoose.Schema(
|
||||
{
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
date: {
|
||||
type: Date,
|
||||
required: true,
|
||||
},
|
||||
location: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
participants: [
|
||||
{
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
ref: "User",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = mongoose.model("Event", EventSchema);
|
||||
Reference in New Issue
Block a user