Skip to content

Commit

Permalink
행사 수정 api의 formDate관련 수정 (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeon-z authored Dec 2, 2023
1 parent 5476790 commit 80e31cb
Showing 1 changed file with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,21 @@ private EventInfo toEntity() {
.build();
}

private EventInfo toEntity(FormInfoRequest formInfoRequest) {
return EventInfo.builder()
.title(title)
.content(content)
.startDateTime(formInfoRequest.openDate.atTime(formInfoRequest.openTime))
.endDateTime(formInfoRequest.closeDate.atTime(formInfoRequest.closeTime))
.dues(dues)
.location(location)
.capacity(capacity)
.recruitmentTarget(recruitmentTarget)
.activityArea(activityArea)
.recruitmentLimit(recruitmentLimit)
.build();
}

}

@JsonInclude(JsonInclude.Include.NON_NULL)
Expand Down Expand Up @@ -134,37 +149,37 @@ private Event withShow() {
return Event.builder()
.id(eventId)
.category(EventCategory.SHOW)
.eventInfo(eventInfo != null ? eventInfo.toEntity() : null)
.ticketInfo(ticketInfo != null ? ticketInfo.toEntity() : null)
.formInfo(formInfo != null ? formInfo.toEntity() : null)
.bankInfo(bankInfo != null ? bankInfo.toEntity() : null)
.eventInfo(eventInfo.toEntity())
.ticketInfo(ticketInfo.toEntity())
.formInfo(formInfo.toEntity())
.bankInfo(bankInfo.toEntity())
.build();
}

private Event withClub() {
return Event.builder()
.id(eventId)
.category(EventCategory.CLUB)
.eventInfo(eventInfo != null ? eventInfo.toEntity() : null)
.formInfo(formInfo != null ? formInfo.toEntity() : null)
.eventInfo(eventInfo.toEntity())
.formInfo(formInfo.toEntity())
.build();
}

private Event withPromotion() {
return Event.builder()
.id(eventId)
.category(EventCategory.PROMOTION)
.eventInfo(eventInfo != null ? eventInfo.toEntity() : null)
.formInfo(formInfo != null ? formInfo.toEntity() : null)
.eventInfo(eventInfo.toEntity())
.formInfo(formInfo.toEntity())
.build();
}

private Event withRecruitment() {
return Event.builder()
.id(eventId)
.category(EventCategory.RECRUITMENT)
.eventInfo(eventInfo != null ? eventInfo.toEntity() : null)
.formInfo(formInfo != null ? formInfo.toEntity() : null)
.eventInfo(eventInfo.toEntity(formInfo))
.formInfo(formInfo.toEntity())
.build();
}

Expand Down

0 comments on commit 80e31cb

Please sign in to comment.