feat: 게시판 신고 — 누적 5건 시 블라인드(관리자만 열람)
CI / build (push) Failing after 11m17s

- 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
parent a47b8405f4
commit ba75613e1c
12 changed files with 149 additions and 5 deletions
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sb.web.board.mapper.ReportMapper">
<insert id="insertIgnore">
INSERT IGNORE INTO report (target_type, target_id, member_id, reason, created_at)
VALUES (#{targetType}, #{targetId}, #{memberId}, #{reason}, NOW())
</insert>
<select id="countByTarget" resultType="int">
SELECT COUNT(*) FROM report WHERE target_type = #{targetType} AND target_id = #{targetId}
</select>
<delete id="deleteByTarget">
DELETE FROM report WHERE target_type = #{targetType} AND target_id = #{targetId}
</delete>
<delete id="deleteByMember">
DELETE FROM report WHERE member_id = #{memberId}
</delete>
</mapper>