Skip to content

Ticket Module#385

Merged
BigBen-7 merged 2 commits into
Lead-Studios:dev-v1from
LaGodxy:Ticket-Module
Sep 30, 2025
Merged

Ticket Module#385
BigBen-7 merged 2 commits into
Lead-Studios:dev-v1from
LaGodxy:Ticket-Module

Conversation

@LaGodxy
Copy link
Copy Markdown
Contributor

@LaGodxy LaGodxy commented Sep 30, 2025

Description

Introduce a Ticket entity and implement basic lifecycle management, ensuring tickets are tied to events and users with proper status handling.

Related Issues

Closes #361

Changes Made

  • Added Ticket entity with fields: id, eventId, ownerId, status (valid, used, transferred).

  • Implemented endpoints:

    • POST /tickets → create a new ticket
    • GET /tickets/:id → retrieve a ticket by ID
    • PATCH /tickets/:id → update ticket status or ownership
  • Linked tickets to Event and User entities.

  • Enforced rule: tickets cannot exist without an event.

How to Test

  1. Run the server and ensure migrations for Ticket are applied.
  2. Use POST /tickets to create a ticket linked to an event and user.
  3. Use GET /tickets/:id to retrieve the ticket details.
  4. Use PATCH /tickets/:id to update the ticket’s status (e.g., valid → used).
  5. Verify that creating a ticket without an event fails as expected.

Screenshots (if applicable)

N/A

Checklist

  • My code follows the project's coding style.
  • I have tested these changes locally.
  • Documentation has been updated where necessary.

@BigBen-7 BigBen-7 merged commit 0a75ced into Lead-Studios:dev-v1 Sep 30, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8. Ticket Module (Entity + Basic API)

2 participants