Skip to content

Commit

Permalink
Merge pull request #86 from softeerbootcamp4th/feature/#79-rush-event…
Browse files Browse the repository at this point in the history
…-fix

fix: LotteryEvent 타입 변경 및 이름 수정
  • Loading branch information
wjddn2165 authored Aug 11, 2024
2 parents 3b54055 + ebf2d11 commit c5dc27a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
public class LotteryEventRequestDto {

@NotNull(message = "이벤트 시작 일자를 지정하세요.")
private LocalDateTime eventStartDate;
private LocalDateTime eventStartDateTime;

@NotNull(message = "이벤트 종료 일자를 지정하세요.")
private LocalDateTime eventEndDate;
private LocalDateTime eventEndDateTime;

@NotNull(message = "당첨인원 수를 지정하세요.")
private int winnerCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ public class LotteryEvent extends BaseEvent {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long lotteryEventId;

public LotteryEvent(LocalDateTime eventStartDate, LocalDateTime eventEndDate, int winnerCount){
this.eventStartDate = eventStartDate;
this.eventEndDate = eventEndDate;
public LotteryEvent(LocalDateTime eventStartDateTime, LocalDateTime eventEndDateTime, int winnerCount){
this.startDateTime = eventStartDateTime;
this.endDateTime = eventEndDateTime;
this.winnerCount = winnerCount;
}

public LotteryEvent() {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public ResponseDto postAdmin(AdminRequestDto adminRequestDto) {

public LotteryEventResponseDto createLotteryEvent(LotteryEventRequestDto lotteryEventRequestDto) {
LotteryEvent lotteryEvent = lotteryEventRepository.save(new LotteryEvent(
lotteryEventRequestDto.getEventStartDate(),
lotteryEventRequestDto.getEventEndDate(),
lotteryEventRequestDto.getEventStartDateTime(),
lotteryEventRequestDto.getEventEndDateTime(),
lotteryEventRequestDto.getWinnerCount()
));

Expand Down

0 comments on commit c5dc27a

Please sign in to comment.