1
1
package com.backgu.amaker.api.event.controller
2
2
3
3
import com.backgu.amaker.api.event.dto.query.ReplyQueryRequest
4
+ import com.backgu.amaker.api.event.dto.query.TaskQueryRequest
4
5
import com.backgu.amaker.api.event.dto.request.ReactionCommentCreateRequest
5
6
import com.backgu.amaker.api.event.dto.request.ReplyCommentCreateRequest
7
+ import com.backgu.amaker.api.event.dto.request.TaskCommentCreateRequest
8
+ import com.backgu.amaker.api.event.dto.response.ReactionOptionWithCommentResponse
6
9
import com.backgu.amaker.api.event.dto.response.ReplyCommentWithUserResponse
10
+ import com.backgu.amaker.api.event.dto.response.TaskCommentWithUserResponse
7
11
import com.backgu.amaker.common.http.response.ApiResult
8
12
import com.backgu.amaker.common.http.response.PageResponse
9
13
import com.backgu.amaker.common.security.jwt.authentication.JwtAuthentication
@@ -12,6 +16,9 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse
12
16
import io.swagger.v3.oas.annotations.responses.ApiResponses
13
17
import io.swagger.v3.oas.annotations.tags.Tag
14
18
import org.springframework.http.ResponseEntity
19
+ import org.springframework.security.core.annotation.AuthenticationPrincipal
20
+ import org.springframework.web.bind.annotation.ModelAttribute
21
+ import org.springframework.web.bind.annotation.PathVariable
15
22
16
23
@Tag(name = " eventComment" , description = " 이벤트 응답 API" )
17
24
interface EventCommentSwagger {
@@ -30,6 +37,35 @@ interface EventCommentSwagger {
30
37
replyQueryRequest : ReplyQueryRequest ,
31
38
): ResponseEntity <ApiResult <PageResponse <ReplyCommentWithUserResponse >>>
32
39
40
+ @Operation(summary = " task 이벤트 응답 조회" , description = " task 이벤트 응답 조회합니다." )
41
+ @ApiResponses(
42
+ value = [
43
+ ApiResponse (
44
+ responseCode = " 200" ,
45
+ description = " task 이벤트 응답 조회 성공" ,
46
+ ),
47
+ ],
48
+ )
49
+ fun findTaskComments (
50
+ @AuthenticationPrincipal token : JwtAuthentication ,
51
+ @PathVariable(" event-id" ) eventId : Long ,
52
+ @ModelAttribute taskQueryRequest : TaskQueryRequest ,
53
+ ): ResponseEntity <ApiResult <PageResponse <TaskCommentWithUserResponse >>>
54
+
55
+ @Operation(summary = " reaction 이벤트 응답 조회" , description = " reaction 이벤트 응답 조회합니다." )
56
+ @ApiResponses(
57
+ value = [
58
+ ApiResponse (
59
+ responseCode = " 200" ,
60
+ description = " reaction 이벤트 응답 조회 성공" ,
61
+ ),
62
+ ],
63
+ )
64
+ fun findReactionComments (
65
+ @AuthenticationPrincipal token : JwtAuthentication ,
66
+ @PathVariable(" event-id" ) eventId : Long ,
67
+ ): ResponseEntity <ApiResult <List <ReactionOptionWithCommentResponse >>>
68
+
33
69
@Operation(summary = " reply 이벤트 응답 생성" , description = " reply 이벤트 응답 생성합니다." )
34
70
@ApiResponses(
35
71
value = [
@@ -45,6 +81,21 @@ interface EventCommentSwagger {
45
81
replyCommentCreateRequest : ReplyCommentCreateRequest ,
46
82
): ResponseEntity <Unit >
47
83
84
+ @Operation(summary = " task 이벤트 응답 생성" , description = " task 이벤트 응답 생성합니다." )
85
+ @ApiResponses(
86
+ value = [
87
+ ApiResponse (
88
+ responseCode = " 201" ,
89
+ description = " task 이벤트 응답 생성 성공" ,
90
+ ),
91
+ ],
92
+ )
93
+ fun createTaskComment (
94
+ token : JwtAuthentication ,
95
+ eventId : Long ,
96
+ taskCommentCreateRequest : TaskCommentCreateRequest ,
97
+ ): ResponseEntity <Unit >
98
+
48
99
@Operation(summary = " reaction 이벤트 응답 생성" , description = " reaction 이벤트 응답 생성합니다." )
49
100
@ApiResponses(
50
101
value = [
0 commit comments