Module: models/eventModel

Defines the Mongoose schema and model for an Event.

Source:

Requires

  • module:mongoose

Members

(inner, constant) Event :mongoose.Model.<Event>

The Mongoose model for Event documents.

Type:
  • mongoose.Model.<Event>
Source:

(inner, constant) eventSchema :mongoose.Schema.<Event>

Mongoose schema for the Event collection.

Type:
  • mongoose.Schema.<Event>
Source:

Type Definitions

Event

Properties:
Name Type Description
title string

The title of the event (required).

description string

A detailed description of the event (required).

date Date

The date and time of the event (required).

location string

The location where the event will take place (required).

organizer mongoose.Types.ObjectId

Reference to the user who organized the event (required).

createdAt Date

Timestamp when the event was created (auto-generated).

updatedAt Date

Timestamp when the event was last updated (auto-generated).

Source: