-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: lecture, timetableLecture API v3 #1156
Merged
Merged
Changes from 52 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
4fdcc71
feat: ์ ๊ท ๊ฐ์ ์์ฑ API
Soundbar91 ad0331f
chore: ์ปจํธ๋กค๋ฌ ๋ค์ด๋ฐ ๋ณ๊ฒฝ
Soundbar91 0585662
chore: ์ค์จ๊ฑฐ ์ค๋ช
๋ณ๊ฒฝ
Soundbar91 41f3a25
chore: ์ค์จ๊ฑฐ ์๋ฌ ์ฝ๋ ์ถ๊ฐ
Soundbar91 f004f20
chore: ์๋น์ค ๋ค์ด๋ฐ ๋ณ๊ฒฝ
Soundbar91 0264545
chore: ์๋น์ค ๋ค์ด๋ฐ ๋ณ๊ฒฝ
Soundbar91 a1c4959
feat: ์ปค์คํ
๊ฐ์ ์์ฑ API
Soundbar91 a0b4c6c
chore: ๋ฏธ์ฌ์ฉ import ์ญ์
Soundbar91 8149e60
fix: ์กฐํ ๋ฒ๊ทธ ์์
Soundbar91 19f407f
chore: api implements
Soundbar91 a9c29b6
docs: TODO ์์ฑ
Soundbar91 598668a
feat: ์ปค์คํ
๊ฐ์ ์์ API ๊ธฐ๋ณธ ํ ์ถ๊ฐ
Soundbar91 8c593ef
feat: ์ ๊ท ๊ฐ์ ์์ API ๊ธฐ๋ณธ ํ ์ถ๊ฐ
Soundbar91 76d6fc6
feat: ์ปค์คํ
๊ฐ์ ์์ API dto ์์
Soundbar91 17fe0be
feat: timetableLectureV3 ์กฐํ API ๊ธฐ๋ณธ ํ
Soundbar91 d440a4b
chore: ๋ฏธ์ฌ์ฉ import ์ญ์
Soundbar91 d3fa81a
chore: ๋ฏธ์ฌ์ฉ import ์ญ์
Soundbar91 871b4b1
feat: Lecture V3
Soundbar91 5548bce
feat: lecture ์ ๊ทํ
Soundbar91 42aa767
chore: lecture - LectureInformation ์ฐ๊ฐ๊ด๊ณ ์ค์
Soundbar91 c387b98
chore: ๋ฉ์๋ ๋ช
๋ณ๊ฒฝ ๋ฐ ๋ฏธ์ฌ์ฉ import ์ญ์
Soundbar91 91b3fde
feat: ์ปค์คํ
๊ฐ์ ์
๋ฐ์ดํธ ๋ก์ง ๊ตฌํ
Soundbar91 ffe61c0
feat: ์ ๊ท ๊ฐ์ ์์ ์์ ์ปค๋ฐ
Soundbar91 ffc5ba0
feat: ์ ๊ท ๊ฐ์ ์์ ๊ธฐ๋ฅ ๊ตฌํ
Soundbar91 d2aab0f
fix: ์๋ต ๋ฒ๊ทธ ์์
Soundbar91 acd6ce5
docs: TODO ์์ฑ
Soundbar91 77b6fef
feat: ์๊ฐํ ์กฐํ API ๊ตฌํ
Soundbar91 87ae033
Merge branch 'develop' of https://github.com/BCSDLab/KOIN_API_V2 intoโฆ
Soundbar91 a1c0885
feat: timetableV3 ์ค์จ๊ฑฐ ๊ทธ๋ฃนํ
Soundbar91 e7db2f5
feat: TimetableLectureInformation ์ถ๊ฐ ๋ฐ flyway ์์
Soundbar91 719ca37
fix: TimetableLEctureInformation์ผ๋ก ์ฝ๋ ๋ณ๊ฒฝ
Soundbar91 0c1e5cb
chore: ์ด์ ์ฝ๋ ์ญ์
Soundbar91 e862005
chore: ์ด์ ์ฝ๋ ์ญ์ ๋ฐ flyway ์์
Soundbar91 c119aa3
feat: ๊ฐ์ ์ค๋ณต ์ฒดํฌ ์ถ๊ฐ
Soundbar91 8c545c0
feat: ํ๋ก์์ ์ถ๊ฐ
Soundbar91 4aa1656
chore: ์ ๊ท ๊ฐ์ API ์ ๊ทํ ๋กค๋ฐฑ
Soundbar91 0dd3afd
chore: ์ปค์คํ
๊ฐ์ API ์ ๊ทํ ๋กค๋ฐฑ
Soundbar91 21e2237
chore: ์๋ต๊ฐ ์ค์
Soundbar91 ac8a792
chore: ํจํค์ง ์ด๋
Soundbar91 cff3f1c
chore: ์ฝ๋ ์์น ๋ณ๊ฒฝ
Soundbar91 32600f0
feat: ๋กค๋ฐฑ API
Soundbar91 bd98406
chore: ๋ฏธ์ฌ์ฉ import ์ญ์
Soundbar91 f577b73
test: ํ
์คํธ ์ฝ๋ ์์ฑ
Soundbar91 bdda0b3
test: ํ
์คํธ ์ฝ๋ ์์ฑ
Soundbar91 55c9b48
chore: ์ฃผ์ ์์ฑ
Soundbar91 cdd6f64
chore: flyway ์ญ์
Soundbar91 c650c6e
chore: ์ฃผ์ ์์
Soundbar91 fb84bc3
chore: ์ฃผ์ ์์
Soundbar91 7200c3e
fix: dto ์์กด์ฑ ๋๊ธฐ
Soundbar91 86a70ad
test: ํ
์คํธ ์คํจ ์์
Soundbar91 cf8fbf4
fix: ์ ๊ท ๊ฐ์ ์์ ๊ธฐ๋ฅ ๋ฒ๊ทธ ์์
Soundbar91 dcc5632
docs: ์ค์จ๊ฑฐ ์๋ต ์ฝ๋ ๋ณ๊ฒฝ
Soundbar91 47d93b1
์ถฉ๋ ํด๊ฒฐ
Soundbar91 fe17cc8
chore: lecture API ํ๋ผ๋ฏธํฐ ๋ณ๊ฒฝ
Soundbar91 e999543
test: ํ
์คํธ ์์
Soundbar91 70d4a30
chore: ๋ฆฌ๋ทฐ ๋ฐ์
Soundbar91 3ba3955
chore: ์ปค์คํ
์ ๊ทํ ๋ฉ์๋ ์์
Soundbar91 7ee4e2c
chore: ๋ฆฌ๋ทฐ ๋ฐ์
Soundbar91 1556bbe
chore: lecture v3 ํ๋ผ๋ฏธํฐ ๋ณ๊ฒฝ
Soundbar91 7f293c7
chore: frame ๋ณต๊ตฌ api ์ญ์
Soundbar91 1100595
Revert "chore: frame ๋ณต๊ตฌ api ์ญ์ "
Soundbar91 9fb5822
chore: ๋ฆฌ๋ทฐ ๋ฐ์
Soundbar91 09431a2
chore: ๋ฆฌ๋ทฐ ๋ฐ์
Soundbar91 b43521a
Merge branch 'develop' of https://github.com/BCSDLab/KOIN_API_V2 intoโฆ
Soundbar91 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 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
32 changes: 32 additions & 0 deletions
32
src/main/java/in/koreatech/koin/domain/timetableV3/controller/LectureApiV3.java
This file contains 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,32 @@ | ||
package in.koreatech.koin.domain.timetableV3.controller; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
|
||
import in.koreatech.koin.domain.timetableV3.dto.response.LectureResponseV3; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
|
||
@Tag(name = "(Normal) Lecture: V3-์ ๊ท ๊ฐ์", description = "์ ๊ท ๊ฐ์ ์ ๋ณด๋ฅผ ๊ด๋ฆฌํ๋ค") | ||
public interface LectureApiV3 { | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))), | ||
} | ||
) | ||
@Operation(summary = "์ ๊ท ๊ฐ์ ๋ชฉ๋ก ์กฐํ") | ||
@GetMapping("/v3/lectures") | ||
ResponseEntity<List<LectureResponseV3>> getLectures( | ||
String semesterDate | ||
); | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/in/koreatech/koin/domain/timetableV3/controller/LectureControllerV3.java
This file contains 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,28 @@ | ||
package in.koreatech.koin.domain.timetableV3.controller; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import in.koreatech.koin.domain.timetableV3.dto.response.LectureResponseV3; | ||
import in.koreatech.koin.domain.timetableV3.service.LectureServiceV3; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
public class LectureControllerV3 implements LectureApiV3 { | ||
|
||
private final LectureServiceV3 lectureServiceV3; | ||
|
||
// TODO. Semester v3 ์ฌ๋ผ๊ฐ๋ฉด ํ๋ผ๋ฏธํฐ ๋ณ๊ฒฝํ๊ธฐ | ||
@GetMapping("/v3/lectures") | ||
public ResponseEntity<List<LectureResponseV3>> getLectures( | ||
@RequestParam(name = "semester_date") String semester | ||
) { | ||
List<LectureResponseV3> response = lectureServiceV3.getLectures(semester); | ||
return ResponseEntity.ok(response); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
...ain/java/in/koreatech/koin/domain/timetableV3/controller/TimetableCustomLectureApiV3.java
This file contains 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,59 @@ | ||
package in.koreatech.koin.domain.timetableV3.controller; | ||
|
||
import static in.koreatech.koin.domain.user.model.UserType.STUDENT; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.PutMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import in.koreatech.koin.domain.timetableV3.dto.request.TimetableCustomLectureCreateRequest; | ||
import in.koreatech.koin.domain.timetableV3.dto.request.TimetableCustomLectureUpdateRequest; | ||
import in.koreatech.koin.domain.timetableV3.dto.response.TimetableLectureResponseV3; | ||
import in.koreatech.koin.global.auth.Auth; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
|
||
@Tag(name = "(Normal) Timetable: V3-์๊ฐํ", description = "์๊ฐํ ์ปค์คํ ๊ฐ์ ์ ๋ณด๋ฅผ ๊ด๋ฆฌํ๋ค") | ||
public interface TimetableCustomLectureApiV3 { | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "400", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))) | ||
} | ||
) | ||
@Operation(summary = "์ปค์คํ ๊ฐ์ ์์ฑ") | ||
@SecurityRequirement(name = "Jwt Authentication") | ||
@PostMapping("/v3/timetables/lecture/custom") | ||
ResponseEntity<TimetableLectureResponseV3> createTimetablesCustomLecture( | ||
@Valid @RequestBody TimetableCustomLectureCreateRequest request, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
); | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "400", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))) | ||
} | ||
) | ||
@Operation(summary = "์ปค์คํ ๊ฐ์ ์์ ") | ||
@SecurityRequirement(name = "Jwt Authentication") | ||
@PutMapping("/v3/timetables/lecture/custom") | ||
ResponseEntity<TimetableLectureResponseV3> updateTimetablesCustomLecture( | ||
@Valid @RequestBody TimetableCustomLectureUpdateRequest request, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
); | ||
} |
42 changes: 42 additions & 0 deletions
42
...a/in/koreatech/koin/domain/timetableV3/controller/TimetableCustomLectureControllerV3.java
This file contains 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,42 @@ | ||
package in.koreatech.koin.domain.timetableV3.controller; | ||
|
||
import static in.koreatech.koin.domain.user.model.UserType.STUDENT; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.PutMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import in.koreatech.koin.domain.timetableV3.dto.request.TimetableCustomLectureCreateRequest; | ||
import in.koreatech.koin.domain.timetableV3.dto.request.TimetableCustomLectureUpdateRequest; | ||
import in.koreatech.koin.domain.timetableV3.dto.response.TimetableLectureResponseV3; | ||
import in.koreatech.koin.domain.timetableV3.service.TimetableCustomLectureServiceV3; | ||
import in.koreatech.koin.global.auth.Auth; | ||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
public class TimetableCustomLectureControllerV3 implements TimetableCustomLectureApiV3 { | ||
|
||
private final TimetableCustomLectureServiceV3 customLectureServiceV3; | ||
|
||
@PostMapping("/v3/timetables/lecture/custom") | ||
public ResponseEntity<TimetableLectureResponseV3> createTimetablesCustomLecture( | ||
@Valid @RequestBody TimetableCustomLectureCreateRequest request, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
) { | ||
TimetableLectureResponseV3 response = customLectureServiceV3.createTimetablesCustomLecture(request, userId); | ||
return ResponseEntity.ok(response); | ||
} | ||
|
||
@PutMapping("/v3/timetables/lecture/custom") | ||
public ResponseEntity<TimetableLectureResponseV3> updateTimetablesCustomLecture( | ||
@Valid @RequestBody TimetableCustomLectureUpdateRequest request, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
) { | ||
TimetableLectureResponseV3 response = customLectureServiceV3.updateTimetablesCustomLecture(request, userId); | ||
return ResponseEntity.ok(response); | ||
} | ||
} |
76 changes: 76 additions & 0 deletions
76
src/main/java/in/koreatech/koin/domain/timetableV3/controller/TimetableLectureApiV3.java
This file contains 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,76 @@ | ||
package in.koreatech.koin.domain.timetableV3.controller; | ||
|
||
import static in.koreatech.koin.domain.user.model.UserType.STUDENT; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import in.koreatech.koin.domain.timetableV3.dto.response.TimetableLectureResponseV3; | ||
import in.koreatech.koin.global.auth.Auth; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
|
||
@Tag(name = "(Normal) Timetable: V3-์๊ฐํ", description = "์๊ฐํ๋ฅผ ๊ด๋ฆฌํ๋ค") | ||
public interface TimetableLectureApiV3 { | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))) | ||
} | ||
) | ||
@Operation(summary = "์๊ฐํ ๊ฐ์ ์ ๋ณด ์กฐํ") | ||
@SecurityRequirement(name = "Jwt Authentication") | ||
@GetMapping("/v3/timetables/lecture") | ||
ResponseEntity<TimetableLectureResponseV3> getTimetableLecture( | ||
@RequestParam(value = "timetable_frame_id") Integer timetableFrameId, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
); | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))) | ||
} | ||
) | ||
@Operation(summary = "์ญ์ ํ ์๊ฐํ ๊ฐ์ ๋ณต๊ตฌ") | ||
@SecurityRequirement(name = "Jwt Authentication") | ||
@PostMapping("/v3/timetables/lecture/rollback") | ||
ResponseEntity<TimetableLectureResponseV3> rollbackTimetableLecture( | ||
@RequestParam(name = "timetable_lectures_id") List<Integer> timetableLecturesId, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
); | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))) | ||
} | ||
) | ||
@Operation(summary = "์ญ์ ํ ์๊ฐํ ํ๋ ์๊ณผ ๊ฐ์ ๋ณต๊ตฌ", | ||
description = """ | ||
1. ์ญ์ ๋ ์๊ฐํ ํ๋ ์: ์ญ์ ๋ ์๊ฐํ ํ๋ ์๊ณผ ๊ทธ์ ์ํ ๊ฐ์ ์ ๋ณด๋ฅผ ๋ณต๊ตฌํฉ๋๋ค. \n | ||
2. ์ญ์ ๋์ง ์์ ์๊ฐํ ํ๋ ์: ์๊ฐํ ํ๋ ์์ ์ํ ๊ฐ์ ์ ๋ณด๋ฅผ ๋ณต๊ตฌํฉ๋๋ค. | ||
""") | ||
@SecurityRequirement(name = "Jwt Authentication") | ||
@PostMapping("/v3/timetables/frame/rollback") | ||
ResponseEntity<TimetableLectureResponseV3> rollbackTimetableFrame( | ||
@RequestParam(name = "timetable_frame_id") Integer timetableFrameId, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
); | ||
} |
50 changes: 50 additions & 0 deletions
50
...in/java/in/koreatech/koin/domain/timetableV3/controller/TimetableLectureControllerV3.java
This file contains 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,50 @@ | ||
package in.koreatech.koin.domain.timetableV3.controller; | ||
|
||
import static in.koreatech.koin.domain.user.model.UserType.STUDENT; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import in.koreatech.koin.domain.timetableV3.dto.response.TimetableLectureResponseV3; | ||
import in.koreatech.koin.domain.timetableV3.service.TimetableLectureServiceV3; | ||
import in.koreatech.koin.global.auth.Auth; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
public class TimetableLectureControllerV3 implements TimetableLectureApiV3 { | ||
|
||
private final TimetableLectureServiceV3 lectureServiceV3; | ||
|
||
@GetMapping("/v3/timetables/lecture") | ||
public ResponseEntity<TimetableLectureResponseV3> getTimetableLecture( | ||
@RequestParam(value = "timetable_frame_id") Integer timetableFrameId, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
) { | ||
TimetableLectureResponseV3 response = lectureServiceV3.getTimetableLecture(timetableFrameId, userId); | ||
return ResponseEntity.ok(response); | ||
} | ||
|
||
@PostMapping("/v3/timetables/lecture/rollback") | ||
public ResponseEntity<TimetableLectureResponseV3> rollbackTimetableLecture( | ||
@RequestParam(name = "timetable_lectures_id") List<Integer> timetableLecturesId, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
) { | ||
TimetableLectureResponseV3 response = lectureServiceV3.rollbackTimetableLecture(timetableLecturesId, userId); | ||
return ResponseEntity.ok(response); | ||
} | ||
|
||
@PostMapping("/v3/timetables/frame/rollback") | ||
public ResponseEntity<TimetableLectureResponseV3> rollbackTimetableFrame( | ||
@RequestParam(name = "timetable_frame_id") Integer timetableFrameId, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
) { | ||
TimetableLectureResponseV3 response = lectureServiceV3.rollbackTimetableFrame(timetableFrameId, userId); | ||
return ResponseEntity.ok(response); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
...in/java/in/koreatech/koin/domain/timetableV3/controller/TimetableRegularLectureApiV3.java
This file contains 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,59 @@ | ||
package in.koreatech.koin.domain.timetableV3.controller; | ||
|
||
import static in.koreatech.koin.domain.user.model.UserType.STUDENT; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.PutMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import in.koreatech.koin.domain.timetableV3.dto.request.TimetableRegularLectureCreateRequest; | ||
import in.koreatech.koin.domain.timetableV3.dto.request.TimetableRegularLectureUpdateRequest; | ||
import in.koreatech.koin.domain.timetableV3.dto.response.TimetableLectureResponseV3; | ||
import in.koreatech.koin.global.auth.Auth; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
|
||
@Tag(name = "(Normal) Timetable: V3-์๊ฐํ", description = "์๊ฐํ ์ ๊ท ๊ฐ์ ์ ๋ณด๋ฅผ ๊ด๋ฆฌํ๋ค") | ||
public interface TimetableRegularLectureApiV3 { | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "400", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))) | ||
} | ||
) | ||
@Operation(summary = "์ ๊ท ๊ฐ์ ์์ฑ") | ||
@SecurityRequirement(name = "Jwt Authentication") | ||
@PostMapping("/v3/timetables/lecture/regular") | ||
ResponseEntity<TimetableLectureResponseV3> createTimetablesRegularLecture( | ||
@Valid @RequestBody TimetableRegularLectureCreateRequest request, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
); | ||
|
||
@ApiResponses( | ||
value = { | ||
@ApiResponse(responseCode = "200"), | ||
@ApiResponse(responseCode = "400", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))), | ||
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))) | ||
} | ||
) | ||
@Operation(summary = "์ ๊ท ๊ฐ์ ์์ ") | ||
@SecurityRequirement(name = "Jwt Authentication") | ||
@PutMapping("/v3/timetables/lecture/regular") | ||
ResponseEntity<TimetableLectureResponseV3> updateTimetablesRegularLecture( | ||
@Valid @RequestBody TimetableRegularLectureUpdateRequest request, | ||
@Auth(permit = {STUDENT}) Integer userId | ||
); | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C
๋ฉ์๋๋ช ์ updateCustiomLecture๋ก ํ๋ ๊ฑด ์ด๋จ๊น์? "๋์ฌ + ๋ช ์ฌ" ํํ๋ฅผ ๋ ๋ง์ด ์ฌ์ฉํด์์!
-> ์๋ updateRegularLecture๋ ๋์ผํด์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฐ์ํ๊ฒ ์ต๋๋ค !! ๊ฐ์ฌํฉ๋๋ค