Repository navigation
[feat] 커뮤니티 인기글·공지사항·신고 기능 추가 #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8cd7750
[merge] develop -> main
You-Hyuk 9db70dc
[feat] 게시글 인기글(추천 임계치) 조회 API 추가
You-Hyuk 25ea648
[feat] Notice 엔티티 및 마이그레이션 추가
You-Hyuk 17321fd
[feat] 공지사항 공개 조회 API 추가
You-Hyuk 08f653d
[feat] 관리자 공지사항 작성·수정·삭제 API 추가
You-Hyuk 5ec48be
[feat] Report 엔티티 및 마이그레이션 추가
You-Hyuk 5839843
[feat] 신고 생성 API 및 이벤트 발행 추가
You-Hyuk 6a62380
[feat] 신고 접수 디스코드 알림 추가
You-Hyuk 9901121
[feat] 게시글·댓글 관리자 강제 삭제 메서드 추가
You-Hyuk 0333dc1
[feat] 관리자 신고 처리 API 추가
You-Hyuk 9fc2e4d
[feat] 관리자 신고 조회 응답에 신고자 닉네임 추가
You-Hyuk 694453f
[fix] PR #124 CodeRabbit 리뷰 반영 (공지 검증, 정렬 안정성, CD 환경변수)
You-Hyuk 09201cd
[style] 테스트 파일 import 순서를 프로젝트 컨벤션에 맞게 정렬
You-Hyuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
11 changes: 11 additions & 0 deletions
11
src/main/java/com/Coming/Backend/admin/dto/AdminNoticeCreateRequest.java
This file contains hidden or 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,11 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| public record AdminNoticeCreateRequest( | ||
| @NotBlank @Size(max = 255) String title, | ||
| @NotBlank String content, | ||
| Boolean active | ||
| ) { | ||
| } |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/Coming/Backend/admin/dto/AdminNoticeCreateResponse.java
This file contains hidden or 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,4 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| public record AdminNoticeCreateResponse(Long noticeId) { | ||
| } |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/Coming/Backend/admin/dto/AdminNoticeDetailResponse.java
This file contains hidden or 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,25 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| import com.Coming.Backend.notice.entity.Notice; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| public record AdminNoticeDetailResponse( | ||
| Long id, | ||
| String title, | ||
| String content, | ||
| boolean active, | ||
| LocalDateTime createdAt, | ||
| LocalDateTime updatedAt | ||
| ) { | ||
| public static AdminNoticeDetailResponse of(Notice notice) { | ||
| return new AdminNoticeDetailResponse( | ||
| notice.getId(), | ||
| notice.getTitle(), | ||
| notice.getContent(), | ||
| notice.isActive(), | ||
| notice.getCreatedAt(), | ||
| notice.getUpdatedAt() | ||
| ); | ||
| } | ||
| } |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/Coming/Backend/admin/dto/AdminNoticeListItemResponse.java
This file contains hidden or 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,21 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| import com.Coming.Backend.notice.entity.Notice; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| public record AdminNoticeListItemResponse( | ||
| Long id, | ||
| String title, | ||
| boolean active, | ||
| LocalDateTime createdAt | ||
| ) { | ||
| public static AdminNoticeListItemResponse of(Notice notice) { | ||
| return new AdminNoticeListItemResponse( | ||
| notice.getId(), | ||
| notice.getTitle(), | ||
| notice.isActive(), | ||
| notice.getCreatedAt() | ||
| ); | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/Coming/Backend/admin/dto/AdminNoticeUpdateRequest.java
This file contains hidden or 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,16 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| import jakarta.validation.constraints.Pattern; | ||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| public record AdminNoticeUpdateRequest( | ||
| @Pattern(regexp = "(?s).*\\S.*", message = "제목은 공백일 수 없습니다") | ||
| @Size(max = 255) | ||
| String title, | ||
|
|
||
| @Pattern(regexp = "(?s).*\\S.*", message = "내용은 공백일 수 없습니다") | ||
| String content, | ||
|
|
||
| Boolean active | ||
| ) { | ||
| } | ||
36 changes: 36 additions & 0 deletions
36
src/main/java/com/Coming/Backend/admin/dto/AdminReportDetailResponse.java
This file contains hidden or 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,36 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| import com.Coming.Backend.report.entity.Report; | ||
| import com.Coming.Backend.report.entity.ReportReason; | ||
| import com.Coming.Backend.report.entity.ReportStatus; | ||
| import com.Coming.Backend.report.entity.ReportTargetType; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| public record AdminReportDetailResponse( | ||
| Long id, | ||
| ReportTargetType targetType, | ||
| Long targetId, | ||
| ReportReason reason, | ||
| String detail, | ||
| ReportStatus status, | ||
| String adminNote, | ||
| Long reporterId, | ||
| String reporterNickname, | ||
| LocalDateTime createdAt | ||
| ) { | ||
| public static AdminReportDetailResponse of(Report report, String reporterNickname) { | ||
| return new AdminReportDetailResponse( | ||
| report.getId(), | ||
| report.getTargetType(), | ||
| report.getTargetId(), | ||
| report.getReason(), | ||
| report.getDetail(), | ||
| report.getStatus(), | ||
| report.getAdminNote(), | ||
| report.getReporterId(), | ||
| reporterNickname, | ||
| report.getCreatedAt() | ||
| ); | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
src/main/java/com/Coming/Backend/admin/dto/AdminReportListItemResponse.java
This file contains hidden or 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,32 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| import com.Coming.Backend.report.entity.Report; | ||
| import com.Coming.Backend.report.entity.ReportReason; | ||
| import com.Coming.Backend.report.entity.ReportStatus; | ||
| import com.Coming.Backend.report.entity.ReportTargetType; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| public record AdminReportListItemResponse( | ||
| Long id, | ||
| ReportTargetType targetType, | ||
| Long targetId, | ||
| ReportReason reason, | ||
| ReportStatus status, | ||
| Long reporterId, | ||
| String reporterNickname, | ||
| LocalDateTime createdAt | ||
| ) { | ||
| public static AdminReportListItemResponse of(Report report, String reporterNickname) { | ||
| return new AdminReportListItemResponse( | ||
| report.getId(), | ||
| report.getTargetType(), | ||
| report.getTargetId(), | ||
| report.getReason(), | ||
| report.getStatus(), | ||
| report.getReporterId(), | ||
| reporterNickname, | ||
| report.getCreatedAt() | ||
| ); | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/Coming/Backend/admin/dto/AdminReportStatusUpdateRequest.java
This file contains hidden or 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,11 @@ | ||
| package com.Coming.Backend.admin.dto; | ||
|
|
||
| import com.Coming.Backend.report.entity.ReportStatus; | ||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public record AdminReportStatusUpdateRequest( | ||
| @NotNull ReportStatus status, | ||
| String adminNote, | ||
| Boolean deleteTarget | ||
| ) { | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.