-
Notifications
You must be signed in to change notification settings - Fork 0
Description
이슈 배경
- 사용자가 오류 및 불만에 대해 제보할 수 있는 API 개발
이슈 내용
1. API 명세 구현
- Endpoint:
Post /v1/report - Request
{ "content": "오류 및 불만에 대해 제보합니다" } - Response: 제보 성공 여부
{ "success": true, "status": "OK", "message": "제보가 성공적으로 접수되었습니다.", "data": true } - Validation:
ReportApi인터페이스에@Valid,@NotBlank등을 적용하여 내용 누락을 방지함.
2. 비즈니스 로직 (ReportService)
- 계층 구조:
ReportService: 비즈니스 흐름 제어 (Facade 역할).ReportCommandService: 실제 DB 저장 로직 수행 (reportRepository.save).
- 기능:
- 사용자 요청 데이터를 기반으로
Report엔티티를 생성하고 저장함.
- 사용자 요청 데이터를 기반으로
3. 테스트 작성
- Integration Test: 제보 API 호출 시 DB에 정상적으로 적재되는지 검증.
- Unit Test: 필수 값 누락 시 유효성 검사 실패 여부 확인.
참고 자료
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels