|
| 1 | +package kr.dgucaps.caps.domain.report.controller; |
| 2 | + |
| 3 | +import io.swagger.v3.oas.annotations.Operation; |
| 4 | +import io.swagger.v3.oas.annotations.media.Content; |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | +import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 8 | +import jakarta.validation.Valid; |
| 9 | +import kr.dgucaps.caps.domain.report.dto.request.CreateReportRequest; |
| 10 | +import kr.dgucaps.caps.domain.report.dto.response.ReportResponse; |
| 11 | +import kr.dgucaps.caps.global.annotation.Auth; |
| 12 | +import kr.dgucaps.caps.global.common.SuccessResponse; |
| 13 | +import org.springframework.http.ResponseEntity; |
| 14 | +import org.springframework.security.access.prepost.PreAuthorize; |
| 15 | +import org.springframework.web.bind.annotation.RequestBody; |
| 16 | + |
| 17 | +@Tag(name = "Report", description = "문의 신고 API") |
| 18 | +public interface ReportApi { |
| 19 | + @Operation( |
| 20 | + summary = "문의 및 신고 작성", |
| 21 | + description = "문의 및 신고 내용을 서버에 제출합니다" |
| 22 | + ) |
| 23 | + @ApiResponse(responseCode = "200", description = "문의 및 신고 성공", |
| 24 | + content = @Content(mediaType = "application/json", |
| 25 | + schema = @Schema(implementation = ReportResponse.class)) |
| 26 | + ) |
| 27 | + @PreAuthorize("hasAnyRole('MEMBER', 'GRADUATE', 'COUNCIL', 'PRESIDENT', 'ADMIN')") |
| 28 | + ResponseEntity<SuccessResponse<?>> createReport( |
| 29 | + @Auth Long memberId, |
| 30 | + @RequestBody @Valid CreateReportRequest request |
| 31 | + ); |
| 32 | +} |
0 commit comments