diff --git a/TickAPI/TickAPI.Tests/Tickets/Services/TicketServiceTests.cs b/TickAPI/TickAPI.Tests/Tickets/Services/TicketServiceTests.cs index de24569..98d0159 100644 --- a/TickAPI/TickAPI.Tests/Tickets/Services/TicketServiceTests.cs +++ b/TickAPI/TickAPI.Tests/Tickets/Services/TicketServiceTests.cs @@ -537,8 +537,8 @@ public async Task GetTicketsForCustomerAsync_WithValidInput_ReturnsSuccessResult false, new PaginationDetails(0, 2) ); - var mappedData1 = new GetTicketForCustomerDto(tickets[0].Id, "EventName", new DateTime(2025, 10, 10), new DateTime(2025, 10, 20), false); - var mappedData2 = new GetTicketForCustomerDto(tickets[1].Id, "EventName2", new DateTime(2025, 11, 10), new DateTime(2025, 11, 20), false); + var mappedData1 = new GetTicketForCustomerDto(tickets[0].Id, "EventName", new DateTime(2025, 10, 10), new DateTime(2025, 10, 20), false, false, null, null); + var mappedData2 = new GetTicketForCustomerDto(tickets[1].Id, "EventName2", new DateTime(2025, 11, 10), new DateTime(2025, 11, 20), false, false, null, null); var mappedPaginatedData = new PaginatedData ( new List{mappedData1, mappedData2}, diff --git a/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketDetailsResponseDto.cs b/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketDetailsResponseDto.cs index 2a5ecc8..e2dbcab 100644 --- a/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketDetailsResponseDto.cs +++ b/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketDetailsResponseDto.cs @@ -15,5 +15,8 @@ public record GetTicketDetailsResponseDto GetTicketDetailsAddressDto Address, Guid eventId, string qrcode, - bool Used + bool Used, + bool ForResell, + decimal? ResellPrice, + string? ResellCurrency ); \ No newline at end of file diff --git a/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketForCustomerDto.cs b/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketForCustomerDto.cs index 4584d76..05c9da2 100644 --- a/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketForCustomerDto.cs +++ b/TickAPI/TickAPI/Tickets/DTOs/Response/GetTicketForCustomerDto.cs @@ -6,5 +6,8 @@ public record GetTicketForCustomerDto string EventName, DateTime EventStartDate, DateTime EventEndDate, - bool Used + bool Used, + bool ForResell, + decimal? ResellPrice, + string? ResellCurrency ); \ No newline at end of file diff --git a/TickAPI/TickAPI/Tickets/Services/TicketService.cs b/TickAPI/TickAPI/Tickets/Services/TicketService.cs index c9de357..2d369de 100644 --- a/TickAPI/TickAPI/Tickets/Services/TicketService.cs +++ b/TickAPI/TickAPI/Tickets/Services/TicketService.cs @@ -132,7 +132,7 @@ public async Task>> GetTicketsForC } var paginatedResult = _paginationService.MapData(paginatedCustomerTickets.Value!, - t => new GetTicketForCustomerDto(t.Id, t.Type.Event.Name, t.Type.Event.StartDate, t.Type.Event.EndDate, t.Used)); + t => new GetTicketForCustomerDto(t.Id, t.Type.Event.Name, t.Type.Event.StartDate, t.Type.Event.EndDate, t.Used, t.ForResell, t.ResellPrice, t.ResellCurrency)); return Result>.Success(paginatedResult); } @@ -164,7 +164,10 @@ public async Task> GetTicketDetailsAsync(Gui address, ticket.Type.Event.Id, qrcode, - ticket.Used + ticket.Used, + ticket.ForResell, + ticket.ResellPrice, + ticket.ResellCurrency ); return Result.Success(ticketDetails); }