Skip to content

Commit

Permalink
update api spec
Browse files Browse the repository at this point in the history
  • Loading branch information
claycat committed Apr 15, 2024
1 parent db635ec commit 8858ace
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class GetAllTicketingsResponseDto {
private final String location;
private final String category;
private final Integer runningMinutes;
private final Integer remainedStock;
private final Integer remainStock;
private final Long price;
private final LocalDateTime eventTime;
private final LocalDateTime saleStart;
Expand All @@ -29,7 +29,7 @@ public GetAllTicketingsResponseDto(UUID ticketingId, String title,
String location,
String category,
Integer runningMinutes,
Integer remainedStock,
Integer remainStock,
Long price,
LocalDateTime eventTime,
LocalDateTime saleStart,
Expand All @@ -39,7 +39,7 @@ public GetAllTicketingsResponseDto(UUID ticketingId, String title,
this.location = location;
this.category = category;
this.runningMinutes = runningMinutes;
this.remainedStock = remainedStock;
this.remainStock = remainStock;
this.price = price;
this.eventTime = eventTime;
this.saleStart = saleStart;
Expand All @@ -54,7 +54,7 @@ public static GetAllTicketingsResponseDto convertFromDto(GetAllTicketingsResultD
.location(dto.getLocation())
.category(dto.getCategory())
.runningMinutes(dto.getRunningMinutes())
.remainedStock(dto.getRemainedStock())
.remainStock(dto.getRemainStock())
.price(dto.getPrice())
.eventTime(dto.getEventTime())
.saleStart(dto.getSaleStart())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class GetTicketingResponseDto {
private final String category;
private final Integer runningMinutes;
private final Integer stock;
private final Integer remainedStock;
private final Integer remainStock;
private final Long price;
private final LocalDateTime eventTime;
private final LocalDateTime saleStart;
Expand All @@ -34,7 +34,7 @@ public GetTicketingResponseDto(UUID ticketingId, String title,
String category,
Integer runningMinutes,
Integer stock,
Integer remainedStock,
Integer remainStock,
Long price,
LocalDateTime eventTime,
LocalDateTime saleStart,
Expand All @@ -46,7 +46,7 @@ public GetTicketingResponseDto(UUID ticketingId, String title,
this.category = category;
this.runningMinutes = runningMinutes;
this.stock = stock;
this.remainedStock = remainedStock;
this.remainStock = remainStock;
this.price = price;
this.eventTime = eventTime;
this.saleStart = saleStart;
Expand All @@ -64,7 +64,7 @@ public static GetTicketingResponseDto convertFromDto(GetTicketingResultDto dto)
.category(dto.getCategory())
.runningMinutes(dto.getRunningMinutes())
.stock(dto.getStock())
.remainedStock(dto.getRemainedStock())
.remainStock(dto.getRemainStock())
.price(dto.getPrice())
.eventTime(dto.getEventTime())
.saleStart(dto.getSaleStart())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public List<GetAllTicketingsResultDto> getAllTicketings() {
.saleStart(ticketing.getSaleStart())
.saleEnd(ticketing.getSaleEnd())
.createdAt(ticketing.getCreatedAt())
.remainedStock(remainedTickets.size())
.remainStock(remainedTickets.size())
.build();
})
.toList();
Expand All @@ -75,7 +75,7 @@ public GetTicketingResultDto getTickting(GetTicketingCommandDto command) {
.saleEnd(ticketing.getSaleEnd())
.createdAt(ticketing.getCreatedAt())
.stock(tickets.size())
.remainedStock(numOfRemainedTickets)
.remainStock(numOfRemainedTickets)
.owner(ticketing.getMember().getEmail())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<GetAllTicketingsResultDto> getAllTicketings() {
.saleStart(ticketing.getSaleStart())
.saleEnd(ticketing.getSaleEnd())
.createdAt(ticketing.getCreatedAt())
.remainedStock(remainedTickets.size())
.remainStock(remainedTickets.size())
.build();
})
.toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public GetTicketingResultDto getTicketing(GetTicketingCommandDto command) {
.saleEnd(ticketing.getSaleEnd())
.createdAt(ticketing.getCreatedAt())
.stock(tickets.size())
.remainedStock(numOfRemainedTickets)
.remainStock(numOfRemainedTickets)
.owner(ticketing.getMember().getEmail())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class GetAllTicketingsResultDto {
private final String location;
private final String category;
private final Integer runningMinutes;
private final Integer remainedStock;
private final Integer remainStock;
private final Long price;
private final LocalDateTime eventTime;
private final LocalDateTime saleStart;
Expand All @@ -27,7 +27,7 @@ public GetAllTicketingsResultDto(UUID ticketingId, String title,
String location,
String category,
Integer runningMinutes,
Integer remainedStock,
Integer remainStock,
Long price,
LocalDateTime eventTime,
LocalDateTime saleStart,
Expand All @@ -37,7 +37,7 @@ public GetAllTicketingsResultDto(UUID ticketingId, String title,
this.location = location;
this.category = category;
this.runningMinutes = runningMinutes;
this.remainedStock = remainedStock;
this.remainStock = remainStock;
this.price = price;
this.eventTime = eventTime;
this.saleStart = saleStart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class GetTicketingResultDto {
private final String category;
private final Integer runningMinutes;
private final Integer stock;
private final Integer remainedStock;
private final Integer remainStock;
private final Long price;
private final LocalDateTime eventTime;
private final LocalDateTime saleStart;
Expand All @@ -32,7 +32,7 @@ public GetTicketingResultDto(UUID ticketingId, String title,
String category,
Integer runningMinutes,
Integer stock,
Integer remainedStock,
Integer remainStock,
Long price,
LocalDateTime eventTime,
LocalDateTime saleStart,
Expand All @@ -44,7 +44,7 @@ public GetTicketingResultDto(UUID ticketingId, String title,
this.category = category;
this.runningMinutes = runningMinutes;
this.stock = stock;
this.remainedStock = remainedStock;
this.remainStock = remainStock;
this.price = price;
this.eventTime = eventTime;
this.saleStart = saleStart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void getTicketingSuccess() throws Exception {
var ticketing = apiResponse.getData();
Assertions.assertThat(ticketing.getTitle()).isEqualTo("0");
Assertions.assertThat(ticketing.getStock()).isEqualTo(stock);
Assertions.assertThat(ticketing.getRemainedStock()).isEqualTo(stock);
Assertions.assertThat(ticketing.getRemainStock()).isEqualTo(stock);
Assertions.assertThat(ticketing.getOwner()).isEqualTo(member.getEmail());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void getTicketingSuccess() {
// then
Assertions.assertThat(result.getTitle()).isEqualTo("0");
Assertions.assertThat(result.getStock()).isEqualTo(stock);
Assertions.assertThat(result.getRemainedStock()).isEqualTo(stock - purchasedStock);
Assertions.assertThat(result.getRemainStock()).isEqualTo(stock - purchasedStock);
Assertions.assertThat(result.getOwner()).isEqualTo(member.getEmail());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void getTicketingSuccess() {
// then
Assertions.assertThat(result.getTitle()).isEqualTo("0");
Assertions.assertThat(result.getStock()).isEqualTo(stock);
Assertions.assertThat(result.getRemainedStock()).isEqualTo(stock - purchasedStock);
Assertions.assertThat(result.getRemainStock()).isEqualTo(stock - purchasedStock);
Assertions.assertThat(result.getOwner()).isEqualTo(member.getEmail());

}
Expand Down

0 comments on commit 8858ace

Please sign in to comment.