diff --git a/src/main/java/com/first/flash/account/member/application/dto/MemberReportRequest.java b/src/main/java/com/first/flash/account/member/application/dto/MemberReportRequest.java index d9199d5b..db564259 100644 --- a/src/main/java/com/first/flash/account/member/application/dto/MemberReportRequest.java +++ b/src/main/java/com/first/flash/account/member/application/dto/MemberReportRequest.java @@ -3,9 +3,12 @@ import com.first.flash.account.member.domain.ContentType; import com.first.flash.global.annotation.ValidEnum; import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; public record MemberReportRequest(@NotEmpty(message = "신고 사유는 필수입니다.") String reason, - @NotNull(message = "콘텐츠 타입은 필수입니다.") @ValidEnum(enumClass = ContentType.class) ContentType contentType) { + @ValidEnum(enumClass = ContentType.class) ContentType contentType) { + public MemberReportRequest(final String reason, final ContentType contentType) { + this.reason = reason; + this.contentType = contentType != null ? contentType : ContentType.SOLUTION; + } } diff --git a/src/main/java/com/first/flash/climbing/solution/domain/dto/SolutionCreateRequestDto.java b/src/main/java/com/first/flash/climbing/solution/domain/dto/SolutionCreateRequestDto.java index aeca2afc..621ea90b 100644 --- a/src/main/java/com/first/flash/climbing/solution/domain/dto/SolutionCreateRequestDto.java +++ b/src/main/java/com/first/flash/climbing/solution/domain/dto/SolutionCreateRequestDto.java @@ -3,13 +3,16 @@ import com.first.flash.climbing.solution.domain.PerceivedDifficulty; import com.first.flash.global.annotation.ValidEnum; import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; public record SolutionCreateRequestDto( @NotEmpty(message = "비디오 URL은 필수입니다.") String videoUrl, @Size(max = 500, message = "리뷰는 최대 500자까지 가능합니다.") String review, - @NotNull(message = "체감 난이도는 필수입니다.") @ValidEnum(enumClass = PerceivedDifficulty.class) PerceivedDifficulty perceivedDifficulty) { + public SolutionCreateRequestDto(final String videoUrl, final String review, final PerceivedDifficulty perceivedDifficulty) { + this.videoUrl = videoUrl; + this.review = review; + this.perceivedDifficulty = perceivedDifficulty != null ? perceivedDifficulty : PerceivedDifficulty.NORMAL; + } }