Skip to content

Commit

Permalink
FLASH-307 feat: 신고 컨텐츠 유형을 선택하지 않으면 해설 신고로 간주
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoiWonYu committed Oct 19, 2024
1 parent 5a82ec5 commit 2f544d6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 2f544d6

Please sign in to comment.