-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
src/main/java/com/first/flash/account/member/application/dto/MemberReportRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
package com.first.flash.account.member.application.dto; | ||
|
||
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) { | ||
public record MemberReportRequest(@NotEmpty(message = "신고 사유는 필수입니다.") String reason, | ||
@NotNull(message = "콘텐츠 타입은 필수입니다.") @ValidEnum(enumClass = ContentType.class) ContentType contentType) { | ||
|
||
} |
9 changes: 6 additions & 3 deletions
9
src/main/java/com/first/flash/account/member/application/dto/MemberReportResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
package com.first.flash.account.member.application.dto; | ||
|
||
public record MemberReportResponse(Long reportedContentId, String reason) { | ||
import com.first.flash.account.member.domain.ContentType; | ||
|
||
public static MemberReportResponse toDto(final Long reportedContentId, final String reason) { | ||
return new MemberReportResponse(reportedContentId, reason); | ||
public record MemberReportResponse(Long reportedContentId, String contentType, String reason) { | ||
|
||
public static MemberReportResponse toDto(final Long reportedContentId, | ||
final ContentType contentType, final String reason) { | ||
return new MemberReportResponse(reportedContentId, contentType.name(), reason); | ||
} | ||
} |