11package DGU_AI_LAB .admin_be .domain .dashboard .controller .docs ;
22
33import DGU_AI_LAB .admin_be .domain .requests .dto .response .UserServerResponseDTO ;
4- import DGU_AI_LAB .admin_be .domain .requests .entity .Status ;
4+ import DGU_AI_LAB .admin_be .domain .requests .entity .StatusFilter ;
55import DGU_AI_LAB .admin_be .error .dto .ErrorResponse ;
66import DGU_AI_LAB .admin_be .global .auth .CustomUserDetails ;
77import DGU_AI_LAB .admin_be .global .common .SuccessResponse ;
1818import org .springframework .web .bind .annotation .RequestParam ;
1919
2020
21- @ Tag (name = "2. 사용자 대시보드 API " , description = "대시보드용 API" )
21+ @ Tag (name = "2. 사용자 대시보드" , description = "사용자 신청 현황 대시보드 API" )
2222@ RequestMapping ("/api/dashboard" )
2323public interface DashBoardApi {
2424
25- @ Operation (
26- summary = "사용자 서버 신청 목록 조회" ,
27- description = "현재 로그인한 사용자의 서버 신청 목록을 상태별로 필터링하여 조회합니다.<br>" +
28- "JWT를 통해 사용자 ID를 식별합니다." ,
29- responses = {
30- @ ApiResponse (
31- responseCode = "200" ,
32- description = "성공적으로 서버 신청 목록을 조회했습니다." ,
33- content = @ Content (schema = @ Schema (implementation = UserServerResponseDTO .class ))
34- ),
35- @ ApiResponse (
36- responseCode = "401" ,
37- description = "인증되지 않은 사용자입니다." ,
38- content = @ Content (schema = @ Schema (implementation = ErrorResponse .class ))
39- ),
40- @ ApiResponse (
41- responseCode = "404" ,
42- description = "사용자를 찾을 수 없거나 해당 사용자의 신청 내역이 없습니다. (USER_NOT_FOUND)" ,
43- content = @ Content (schema = @ Schema (implementation = ErrorResponse .class ))
44- ),
45- @ ApiResponse (
46- responseCode = "500" ,
47- description = "서버 내부 오류 발생." ,
48- content = @ Content (schema = @ Schema (implementation = ErrorResponse .class ))
49- )
50- }
51- )
25+ @ Operation (summary = "내 서버 신청 목록 조회" , description = "상태(status)로 필터링하여 로그인된 사용자의 서버 신청 목록을 조회합니다." )
26+ @ ApiResponse (responseCode = "200" , description = "성공" ,
27+ content = @ Content (schema = @ Schema (implementation = UserServerResponseDTO .class )))
28+ @ ApiResponse (responseCode = "401" , description = "인증되지 않은 사용자" ,
29+ content = @ Content (schema = @ Schema (implementation = ErrorResponse .class )))
5230 @ GetMapping ("/me/servers" )
5331 ResponseEntity <SuccessResponse <?>> getUserServers (
5432 @ Parameter (hidden = true )
5533 @ AuthenticationPrincipal CustomUserDetails principal ,
56- @ Parameter (description = "조회할 서버 신청 상태 (PENDING, FULFILLED, DENIED 등 )" , required = true , example = "FULFILLED" )
57- @ RequestParam (name = "status" ) Status status
34+ @ Parameter (description = "조회할 서버 신청 상태 필터 (PENDING, FULFILLED, DENIED, DELETED, ALL )" , required = true , example = "FULFILLED" )
35+ @ RequestParam (name = "status" ) StatusFilter statusFilter
5836 );
5937}
0 commit comments