Skip to content

Implement Members CRUD Functionality Based on Prisma Models #7

@adgator101

Description

@adgator101

Overview

Implement Create, Read, Update, and Delete (CRUD) functionality for Members using the Prisma models defined in prisma/schema/auth.prisma. This should address all fields and relationships, including links to User entities.

Relevant Prisma Models

  • members: Contains fields such as id, name, role, year, and a relation to multiple User records.
  • User: Contains a memberId field relating to the members table, and each User can be associated with a member.

Tasks

  • Implement endpoint to add a new member
  • - [ ] Implement endpoint to update member details and user associations
  • Implement endpoint to delete a member (and handle orphaned users appropriately)
  • Add validation and error handling for all endpoints
  • Write unit and integration tests for all CRUD operations
  • Update API documentation for new endpoints

Acceptance Criteria

  • All CRUD endpoints for Members function as intended
  • Members are stored and queried using the Prisma models
  • Related users can be assigned and updated for members
  • Tests cover all CRUD scenarios
  • Documentation is up-to-date and accurate

Reference

See the members and User models 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