-
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.
Merge pull request #89 from SWM-Flash/integration
Integration
- Loading branch information
Showing
14 changed files
with
79 additions
and
38 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); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/first/flash/account/member/domain/ContentType.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.first.flash.account.member.domain; | ||
|
||
import lombok.ToString; | ||
|
||
@ToString | ||
public enum ContentType { | ||
SOLUTION, COMMENT; | ||
} |
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
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/first/flash/climbing/solution/application/dto/SolutionsResponseDto.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
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
19 changes: 19 additions & 0 deletions
19
src/main/java/com/first/flash/climbing/solution/domain/dto/SolutionResponseDto.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.first.flash.climbing.solution.domain.dto; | ||
|
||
import com.first.flash.climbing.solution.infrastructure.dto.SolutionRepositoryResponseDto; | ||
import com.first.flash.global.util.AuthUtil; | ||
import java.util.UUID; | ||
|
||
public record SolutionResponseDto(Long id, String uploader, String review, String instagramId, | ||
String videoUrl, UUID uploaderId, Boolean isUploader, | ||
String profileImageUrl, Long commentCount) { | ||
|
||
public static SolutionResponseDto from( | ||
final SolutionRepositoryResponseDto repositoryResponseDto) { | ||
return new SolutionResponseDto(repositoryResponseDto.id(), repositoryResponseDto.uploader(), | ||
repositoryResponseDto.review(), repositoryResponseDto.instagramId(), | ||
repositoryResponseDto.videoUrl(), repositoryResponseDto.uploaderId(), | ||
AuthUtil.isSameId(repositoryResponseDto.uploaderId()), | ||
repositoryResponseDto.profileImageUrl(), repositoryResponseDto.commentCount()); | ||
} | ||
} |
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
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
9 changes: 9 additions & 0 deletions
9
...a/com/first/flash/climbing/solution/infrastructure/dto/SolutionRepositoryResponseDto.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.first.flash.climbing.solution.infrastructure.dto; | ||
|
||
import java.util.UUID; | ||
|
||
public record SolutionRepositoryResponseDto(Long id, String uploader, String review, | ||
String instagramId, String videoUrl, UUID uploaderId, | ||
String profileImageUrl, Long commentCount) { | ||
|
||
} |
9 changes: 0 additions & 9 deletions
9
src/main/java/com/first/flash/climbing/solution/infrastructure/dto/SolutionResponseDto.java
This file was deleted.
Oops, something went wrong.
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