feat: 게시판 신고 — 누적 5건 시 블라인드(관리자만 열람)

- report 테이블(회원당 대상별 1회), comment.blocked 컬럼
- POST /board/posts|comments/{id}/report, 본인 글/댓글 신고 불가
- 글: 5건이면 blocked(기존 열람제한 재사용) / 댓글: blocked → 비관리자 본문 숨김
- 삭제·탈퇴 시 신고 정리

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-28 18:05:10 +09:00
co-authored by Claude Opus 4.8
parent a47b8405f4
commit ba75613e1c
12 changed files with 149 additions and 5 deletions
+7 -2
View File
@@ -11,11 +11,12 @@
<result property="authorGooglePicture" column="author_google_picture"/>
<result property="authorProfileImage" column="author_profile_image"/>
<result property="content" column="content"/>
<result property="blocked" column="blocked"/>
<result property="createdAt" column="created_at"/>
</resultMap>
<select id="findByPostId" parameterType="long" resultMap="commentResultMap">
SELECT c.id, c.post_id, c.author_id, c.author_name, c.content, c.created_at,
SELECT c.id, c.post_id, c.author_id, c.author_name, c.content, c.blocked, c.created_at,
m.google_picture AS author_google_picture, m.profile_image AS author_profile_image
FROM comment c
LEFT JOIN member m ON m.id = c.author_id
@@ -24,13 +25,17 @@
</select>
<select id="findById" parameterType="long" resultMap="commentResultMap">
SELECT c.id, c.post_id, c.author_id, c.author_name, c.content, c.created_at,
SELECT c.id, c.post_id, c.author_id, c.author_name, c.content, c.blocked, c.created_at,
m.google_picture AS author_google_picture, m.profile_image AS author_profile_image
FROM comment c
LEFT JOIN member m ON m.id = c.author_id
WHERE c.id = #{id}
</select>
<update id="updateBlocked">
UPDATE comment SET blocked = #{blocked} WHERE id = #{id}
</update>
<insert id="insert" parameterType="com.sb.web.board.domain.Comment"
useGeneratedKeys="true" keyProperty="id">
INSERT INTO comment (post_id, author_id, author_name, content, created_at)