-
Notifications
You must be signed in to change notification settings - Fork 0
Ari pick #27
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
Open
HyunwooKiim
wants to merge
26
commits into
main
Choose a base branch
from
ari-pick
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ari pick #27
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
c1d9477
feat: 제안 상태 enum 타입 추가
HyunwooKiim 3f9b3cb
feat: 제안 정보 Value Object 추가
HyunwooKiim a5de7de
feat: 제안 도메인 엔티티 추가
HyunwooKiim b37982b
feat: 제안 좋아요 엔티티 추가
HyunwooKiim 8dd9880
feat: 제안 관련 에러 메시지 추가
HyunwooKiim d35af3b
feat: 제안 관련 예외 클래스 추가
HyunwooKiim 166560a
feat: 제안 관련 DTO 추가
HyunwooKiim 3139269
feat: 제안 엔티티-DTO 변환 Mapper 추가
HyunwooKiim c3b3d62
feat: 제안 Repository 계층 추가
HyunwooKiim e024bd0
feat: 제안 좋아요 Repository 계층 추가
HyunwooKiim 029d537
feat: 제안 조회 서비스 추가
HyunwooKiim 69c9238
feat: 제안 생성/수정/삭제/좋아요 서비스 추가
HyunwooKiim 398732f
feat: 제안 조회 API 엔드포인트 추가
HyunwooKiim f909a02
feat: 제안 생성/수정/삭제/좋아요 API 엔드포인트 추가
HyunwooKiim 12d66be
docs: AriPick API 명세서 추가
HyunwooKiim ef88fbe
docs: 프로젝트 개발 가이드라인 문서 추가
HyunwooKiim dbcc400
chore: gitignore 업데이트
HyunwooKiim 78e191d
fix: .DS_Store 무시 패턴 수정
HyunwooKiim 995c44b
feat: 제안 요청 DTO에 입력값 검증 추가
HyunwooKiim 56bdb30
refactor: 좋아요 개수 타입을 Int에서 Long으로 통일
HyunwooKiim 5a895a6
feat: 페이지네이션 파라미터 검증 추가
HyunwooKiim ce74cb3
feat: 제안 엔티티에 낙관적 락 추가로 동시성 문제 해결
HyunwooKiim aca15d8
refactor: Proposal 엔티티를 data class에서 일반 class로 변경
HyunwooKiim 545e18a
feat: ProposalLike에 유니크 제약조건 추가 및 data class 제거
HyunwooKiim f038e66
refactor: Repository의 하드 삭제 메서드 제거하여 soft delete 일관성 유지
HyunwooKiim 631139f
feat: 페이지 크기 최대값 제한 추가 (최대 100)
HyunwooKiim 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ out/ | |
| /dist/ | ||
| /nbdist/ | ||
| /.nb-gradle/ | ||
| DS_Store | ||
|
|
||
| ### VS Code ### | ||
| .vscode/ | ||
|
|
||
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,168 @@ | ||
| # AriPick 제안 시스템 API 명세서 | ||
|
|
||
| 아리픽(AriPick)에서 학생들이 상품을 제안하고, 목록을 조회하고, 승인/검토 상태 관리 및 좋아요 기능을 수행하기 위한 REST API 명세서입니다. | ||
|
|
||
| --- | ||
|
|
||
| # 1. 제안(Proposals) API | ||
|
|
||
| ## 1.1 제안 생성 | ||
| ### `POST /api/proposals` | ||
|
|
||
| ### Request Body | ||
| ```json | ||
| { | ||
| "title": "상품명", | ||
| "reason": "상품을 제안하는 이유", | ||
| "writerId": 1 | ||
| } | ||
| ``` | ||
|
|
||
| ### Response | ||
| ```json | ||
| { | ||
| "id": 12, | ||
| "title": "상품명", | ||
| "reason": "제안 이유", | ||
| "writerId": 1, | ||
| "createdAt": "2025-12-31T10:20:30", | ||
| "status": "PENDING" | ||
| } | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 1.2 제안 목록 조회 | ||
| ### `GET /api/proposals` | ||
|
|
||
| ### Query Parameters | ||
| - `status` (optional: `PENDING`, `APPROVED`, `REJECTED`) | ||
| - `page` | ||
| - `size` | ||
|
|
||
| ### Response | ||
| ```json | ||
| { | ||
| "content": [ | ||
| { | ||
| "id": 1, | ||
| "title": "상품명", | ||
| "reason": "이유 설명", | ||
| "createdAt": "2025-12-31", | ||
| "status": "APPROVED", | ||
| "likes": 999 | ||
| } | ||
| ], | ||
| "page": 0, | ||
| "size": 10, | ||
| "totalElements": 42 | ||
| } | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 1.3 제안 상세 조회 | ||
| ### `GET /api/proposals/{proposalId}` | ||
|
|
||
| ### Response | ||
| ```json | ||
| { | ||
| "id": 1, | ||
| "title": "상품명", | ||
| "reason": "이유 설명", | ||
| "writerId": 1, | ||
| "createdAt": "2025-12-31T00:00:00", | ||
| "status": "APPROVED", | ||
| "likes": 999 | ||
| } | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 1.4 제안 상태 변경 (관리자) | ||
| ### `PATCH /api/proposals/{proposalId}/status` | ||
|
|
||
| ### Request Body | ||
| ```json | ||
| { | ||
| "status": "APPROVED" | ||
| } | ||
| ``` | ||
|
|
||
| ### Response | ||
| ```json | ||
| { | ||
| "id": 1, | ||
| "status": "APPROVED" | ||
| } | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 1.5 제안 삭제 | ||
| ### `DELETE /api/proposals/{proposalId}` | ||
|
|
||
| ### Response | ||
| 204 No Content | ||
|
|
||
| --- | ||
|
|
||
| # 2. 좋아요(Like) API | ||
|
|
||
| ## 2.1 좋아요 등록 | ||
| ### `POST /api/proposals/{proposalId}/like` | ||
|
|
||
| ### Response | ||
| ```json | ||
| { | ||
| "proposalId": 1, | ||
| "liked": true, | ||
| "likeCount": 1000 | ||
| } | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 2.2 좋아요 취소 | ||
| ### `DELETE /api/proposals/{proposalId}/like` | ||
|
|
||
| ### Response | ||
| ```json | ||
| { | ||
| "proposalId": 1, | ||
| "liked": false, | ||
| "likeCount": 999 | ||
| } | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| # 3. 통계(옵션) | ||
|
|
||
| ## 3.1 제안 통계 조회 | ||
| ### `GET /api/proposals/stats` | ||
|
|
||
| ### Response | ||
| ```json | ||
| { | ||
| "totalProposals": 120, | ||
| "approved": 45, | ||
| "pending": 65, | ||
| "rejected": 10 | ||
| } | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| # 4. API 요약표 | ||
|
|
||
| | 기능 | 메서드 | URL | | ||
| |------|--------|-------------| | ||
| | 제안 등록 | POST | `/api/proposals` | | ||
| | 제안 목록 조회 | GET | `/api/proposals` | | ||
| | 제안 상세 조회 | GET | `/api/proposals/{id}` | | ||
| | 제안 상태 변경 | PATCH | `/api/proposals/{id}/status` | | ||
| | 제안 삭제 | DELETE | `/api/proposals/{id}` | | ||
| | 좋아요 등록 | POST | `/api/proposals/{id}/like` | | ||
| | 좋아요 취소 | DELETE | `/api/proposals/{id}/like` | | ||
| | 통계 조회 | GET | `/api/proposals/stats` | |
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.