Skip to content

Commit

Permalink
Api-v0.2.3-1
Browse files Browse the repository at this point in the history
Api-v0.2.3-1
  • Loading branch information
ImNM authored Feb 26, 2023
2 parents 3c6fb17 + 5d175f3 commit 086d4e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import band.gosrock.common.annotation.DateFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
Expand All @@ -19,7 +20,7 @@ public class CreateEventRequest {
private Long hostId;

@Schema(defaultValue = "고스락 제 22회 정기공연", description = "공연 이름")
@NotBlank(message = "공연 이름을 입력하세요")
@NotBlank(message = "공연 이름을 입력하세요.")
@Length(max = 25)
private String name;

Expand All @@ -28,11 +29,12 @@ public class CreateEventRequest {
pattern = "yyyy.MM.dd HH:mm",
defaultValue = "2023.03.20 12:00",
description = "공연 시작 시각")
@NotNull(message = "공연 시작 시각을 입력하세요")
@NotNull(message = "공연 시작 시각을 입력하세요.")
@Future(message = "공연 시작 시각은 현재보다 이후여야 합니다.")
@DateFormat
private LocalDateTime startAt;

@Schema(defaultValue = "90", description = "공연 진행시간")
@Positive(message = "공연 진행 예상 소요시간(분)을 입력하세요")
@Positive(message = "공연 진행 예상 소요시간(분)을 입력하세요.")
private Long runTime;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import band.gosrock.common.annotation.DateFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
Expand All @@ -25,6 +26,7 @@ public class UpdateEventBasicRequest {
defaultValue = "2023.03.20 12:00",
description = "공연 시작 시각")
@NotNull(message = "공연 시작 시각을 입력하세요")
@Future(message = "공연 시작 시각은 현재보다 이후여야 합니다.")
@DateFormat
private LocalDateTime startAt;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.transaction.annotation.Transactional;

@Mapper
@RequiredArgsConstructor
Expand All @@ -29,7 +28,6 @@ public class EventMapper {
private final EventAdaptor eventAdaptor;
private final TicketItemAdaptor ticketItemAdaptor;

@Transactional(readOnly = true)
public Event toEntity(CreateEventRequest createEventRequest) {
return Event.builder()
.hostId(createEventRequest.getHostId())
Expand Down

0 comments on commit 086d4e1

Please sign in to comment.