From 8f8d56adc1a85bc8a1cb3f5d44e6d1d7ba6ca91d Mon Sep 17 00:00:00 2001 From: kent Date: Sun, 28 Dec 2025 00:54:55 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EA=B2=8C?= =?UTF-8?q?=EC=8B=9C=ED=8C=90=20API=20=EC=83=81=ED=83=9C=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 시스템 게시판 API 12개 엔드포인트 🔄 예정 → ✅ 완료 - 변경 이력 추가 (2025-12-28) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- plans/react-mock-remaining-tasks.md | 70 +++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/plans/react-mock-remaining-tasks.md b/plans/react-mock-remaining-tasks.md index bfc5be8..a0a593d 100644 --- a/plans/react-mock-remaining-tasks.md +++ b/plans/react-mock-remaining-tasks.md @@ -192,23 +192,63 @@ http://api.sam.kr/api/v1/comprehensive-analysis > **상태**: ✅ api 프로젝트에 게시판/게시글 API 완비 → React 연동 작업 가능 -#### ✅ api 프로젝트 게시판 API (이미 구현됨) +#### ✅ api 프로젝트 게시판 API 아키텍처 + +> **핵심 설계**: 시스템 게시판과 테넌트 게시판을 **별도 엔드포인트**로 분리하고, **code 기반 URL** 사용 + +``` +시스템 게시판 (본사 운영) 테넌트 게시판 (테넌트 내부) +┌─────────────────────────────┐ ┌─────────────────────────────┐ +│ /api/v1/system-boards/{code}│ │ /api/v1/boards/{code} │ +│ - is_system = true │ │ - is_system = false │ +│ - tenant_id = null │ │ - tenant_id = {current} │ +│ - 메뉴 → global_menus │ │ - 메뉴 → menus │ +└─────────────────────────────┘ └─────────────────────────────┘ +``` + +**장점:** +- 동일한 `board_code`도 시스템/테넌트에서 독립 사용 가능 +- API 호출 시 `is_system` 플래그 불필요 +- URL만으로 게시판 유형 구분 가능 +- RESTful 원칙 준수 + +#### 📌 시스템 게시판 API (System Boards) | 기능 | Method | Endpoint (api.sam.kr) | 상태 | |------|--------|----------------------|------| -| 게시판 목록 | GET | `/api/v1/boards` | ✅ | -| 테넌트 게시판 | GET | `/api/v1/boards/tenant` | ✅ | -| 게시판 상세 | GET | `/api/v1/boards/{id}` | ✅ (ID 기반으로 변경) | -| 게시판 등록 | POST | `/api/v1/boards` | ✅ | -| 게시판 수정 | PUT | `/api/v1/boards/{id}` | ✅ | -| 게시판 삭제 | DELETE | `/api/v1/boards/{id}` | ✅ | -| 게시판 필드 | GET | `/api/v1/boards/{code}/fields` | ✅ | -| 게시글 목록 | GET | `/api/v1/boards/{code}/posts` | ✅ | -| 게시글 상세 | GET | `/api/v1/boards/{code}/posts/{id}` | ✅ | -| 게시글 등록 | POST | `/api/v1/boards/{code}/posts` | ✅ | -| 게시글 수정 | PUT | `/api/v1/boards/{code}/posts/{id}` | ✅ | -| 게시글 삭제 | DELETE | `/api/v1/boards/{code}/posts/{id}` | ✅ | -| 댓글 CRUD | GET/POST/PUT/DELETE | `/api/v1/boards/{code}/posts/{id}/comments/*` | ✅ | +| 시스템 게시판 목록 | GET | `/api/v1/system-boards` | ✅ | +| 시스템 게시판 상세 | GET | `/api/v1/system-boards/{code}` | ✅ | +| 시스템 게시판 필드 | GET | `/api/v1/system-boards/{code}/fields` | ✅ | +| 시스템 게시글 목록 | GET | `/api/v1/system-boards/{code}/posts` | ✅ | +| 시스템 게시글 상세 | GET | `/api/v1/system-boards/{code}/posts/{id}` | ✅ | +| 시스템 게시글 등록 | POST | `/api/v1/system-boards/{code}/posts` | ✅ | +| 시스템 게시글 수정 | PUT | `/api/v1/system-boards/{code}/posts/{id}` | ✅ | +| 시스템 게시글 삭제 | DELETE | `/api/v1/system-boards/{code}/posts/{id}` | ✅ | +| 시스템 댓글 CRUD | * | `/api/v1/system-boards/{code}/posts/{id}/comments/*` | ✅ | + +#### 📌 테넌트 게시판 API (Tenant Boards) + +| 기능 | Method | Endpoint (api.sam.kr) | 상태 | +|------|--------|----------------------|------| +| 테넌트 게시판 목록 | GET | `/api/v1/boards` | ✅ | +| 테넌트 게시판 상세 | GET | `/api/v1/boards/{code}` | 🔄 변경 필요 (ID→code) | +| 테넌트 게시판 필드 | GET | `/api/v1/boards/{code}/fields` | ✅ | +| 테넌트 게시글 목록 | GET | `/api/v1/boards/{code}/posts` | ✅ | +| 테넌트 게시글 상세 | GET | `/api/v1/boards/{code}/posts/{id}` | ✅ | +| 테넌트 게시글 등록 | POST | `/api/v1/boards/{code}/posts` | ✅ | +| 테넌트 게시글 수정 | PUT | `/api/v1/boards/{code}/posts/{id}` | ✅ | +| 테넌트 게시글 삭제 | DELETE | `/api/v1/boards/{code}/posts/{id}` | ✅ | +| 테넌트 댓글 CRUD | * | `/api/v1/boards/{code}/posts/{id}/comments/*` | ✅ | + +#### 📌 관리자 게시판 API (Admin - mng.sam.kr) + +| 기능 | Method | Endpoint (mng.sam.kr) | 상태 | +|------|--------|----------------------|------| +| 전체 게시판 목록 | GET | `/boards` (Blade) | ✅ | +| 게시판 등록 | POST | `/boards` | ✅ | +| 게시판 수정 | PUT | `/boards/{id}` | ✅ | +| 게시판 삭제 | DELETE | `/boards/{id}` | ✅ | +| **🆕 게시판 생성 시 메뉴 자동 추가** | - | 연동 로직 | 🔄 구현 중 | #### 🏗️ 게시판 시스템 아키텍처 (참조용) @@ -424,6 +464,8 @@ react/src/components/ | 날짜 | 작업 | 상세 내용 | |------|------|----------| +| 2025-12-28 | 시스템 게시판 API 개발 완료 | `/api/v1/system-boards/*` 엔드포인트 12개 추가 (게시판 3개 + 게시글 5개 + 댓글 4개), SystemBoardController, SystemPostController, Swagger 문서 | +| 2025-12-27 | 게시판 API 아키텍처 개선 | 시스템/테넌트 게시판 엔드포인트 분리 (`/system-boards/{code}` vs `/boards/{code}`), ID 기반에서 code 기반 URL로 통일, 메뉴 자동 생성 기능 추가 예정 | | 2025-12-27 | 종합분석 승인/반려 버그 수정 | `ComprehensiveAnalysisService::getTodayIssue()` - 현재 사용자가 결재자인 문서만 표시하도록 수정. 이전에는 테넌트의 모든 대기 결재가 표시되어 "결재 순서가 아닙니다" 오류 발생 | | 2025-12-27 | 테스트 데이터 수정 | `ComprehensiveAnalysisSeeder` - User 33 (홍킬동) 기준으로 변경 | | 2025-12-27 | 테스트 환경 정보 추가 | 테넌트/사용자 정보, 로그인 정보, 주의사항 추가 | \ No newline at end of file