Skip to content

Implement Event CRUD Functionality Based on Prisma Models #5

@adgator101

Description

@adgator101

Overview

Implement Create, Read, Update, and Delete (CRUD) functionality for event-related features using the Prisma models in the backend. Core models to be supported include Events and EventSchedule, as well as the EventStatus enum for status tracking.

Relevant Prisma Models

  • Events: Represents an event entity and contains fields like id, name, description, status, and a relation to EventSchedule.
  • EventSchedule: Represents the schedule for an event, including startDate, endDate, and a relation to its parent Events.
  • EventStatus: Enum used for tracking event state (UPCOMING, ONGOING, COMPLETED).

Tasks

  • Implement endpoint to create new events and associated schedules
  • Implement endpoint to fetch event(s) with their schedule(s)
  • Implement endpoint to update event or schedule details
  • Implement endpoint to delete events and cascade delete schedules
  • Add validation and error handling for all endpoints
  • Write unit and integration tests for all CRUD operations
  • Document new endpoints and update API documentation

Acceptance Criteria

  • All event CRUD endpoints function as specified
  • Event and schedule data is stored and queried using the Prisma models
  • Deleting an event cascades to its schedules
  • Tests cover all CRUD scenarios
  • Documentation is up to date

Reference

Prisma model definitions can be found in prisma/schema/auth.prisma.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions