feat: add TicketOrder model and ticket-orders API for user/organizer transparency#52
Draft
Jayrodri088 wants to merge 2 commits intoBuidlZone-Labs:mainfrom
Draft
feat: add TicketOrder model and ticket-orders API for user/organizer transparency#52Jayrodri088 wants to merge 2 commits intoBuidlZone-Labs:mainfrom
Jayrodri088 wants to merge 2 commits intoBuidlZone-Labs:mainfrom
Conversation
DioChuks
requested changes
Mar 6, 2026
Contributor
There was a problem hiding this comment.
Wasn't requested for, remove this.
Contributor
There was a problem hiding this comment.
wasnt part of issue description.
Contributor
|
@Jayrodri088 no changes so far, will be unassigning & closing PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Ticket Order model and read-only API so organizers and users can see ticket orders and payments, giving transparency between both sides.
Changes
Model:
TicketOrder(src/models/ticket-order.ts)_id(returned asidin API)0= pending,1= completed,3= failedAPI (protected, requires auth)
GET /ticket-orders/me?page=1&limit=20– Current user’s ticket orders (buyer view). Paginated; returns{ page, limit, total, orders }.GET /ticket-orders/organizer?page=1&limit=20– Ticket orders for events the current user organizes. Same response shape.Role-based access
/me)./organizer).Other
validateAndGetUserto useUser.findById(decoded.id)so JWT auth works for protected routes.TicketOrderService.createOrder()is implemented for use when a payment/checkout flow exists (creates order and fillseventName/privacyLevelfrom the event).#47