Skip to content
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 64 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
4fdcc71
feat: ์ •๊ทœ ๊ฐ•์˜ ์ƒ์„ฑ API
Soundbar91 Dec 21, 2024
ad0331f
chore: ์ปจํŠธ๋กค๋Ÿฌ ๋„ค์ด๋ฐ ๋ณ€๊ฒฝ
Soundbar91 Dec 21, 2024
0585662
chore: ์Šค์›จ๊ฑฐ ์„ค๋ช… ๋ณ€๊ฒฝ
Soundbar91 Dec 21, 2024
41f3a25
chore: ์Šค์›จ๊ฑฐ ์—๋Ÿฌ ์ฝ”๋“œ ์ถ”๊ฐ€
Soundbar91 Dec 21, 2024
f004f20
chore: ์„œ๋น„์Šค ๋„ค์ด๋ฐ ๋ณ€๊ฒฝ
Soundbar91 Dec 21, 2024
0264545
chore: ์„œ๋น„์Šค ๋„ค์ด๋ฐ ๋ณ€๊ฒฝ
Soundbar91 Dec 21, 2024
a1c4959
feat: ์ปค์Šคํ…€ ๊ฐ•์˜ ์ƒ์„ฑ API
Soundbar91 Dec 21, 2024
a0b4c6c
chore: ๋ฏธ์‚ฌ์šฉ import ์‚ญ์ œ
Soundbar91 Dec 21, 2024
8149e60
fix: ์กฐํšŒ ๋ฒ„๊ทธ ์ˆ˜์ •
Soundbar91 Dec 21, 2024
19f407f
chore: api implements
Soundbar91 Dec 22, 2024
a9c29b6
docs: TODO ์ž‘์„ฑ
Soundbar91 Dec 22, 2024
598668a
feat: ์ปค์Šคํ…€ ๊ฐ•์˜ ์ˆ˜์ • API ๊ธฐ๋ณธ ํ‹€ ์ถ”๊ฐ€
Soundbar91 Dec 22, 2024
8c593ef
feat: ์ •๊ทœ ๊ฐ•์˜ ์ˆ˜์ • API ๊ธฐ๋ณธ ํ‹€ ์ถ”๊ฐ€
Soundbar91 Dec 22, 2024
76d6fc6
feat: ์ปค์Šคํ…€ ๊ฐ•์˜ ์ˆ˜์ • API dto ์ˆ˜์ •
Soundbar91 Dec 22, 2024
17fe0be
feat: timetableLectureV3 ์กฐํšŒ API ๊ธฐ๋ณธ ํ‹€
Soundbar91 Dec 22, 2024
d440a4b
chore: ๋ฏธ์‚ฌ์šฉ import ์‚ญ์ œ
Soundbar91 Dec 22, 2024
d3fa81a
chore: ๋ฏธ์‚ฌ์šฉ import ์‚ญ์ œ
Soundbar91 Dec 28, 2024
871b4b1
feat: Lecture V3
Soundbar91 Dec 28, 2024
5548bce
feat: lecture ์ •๊ทœํ™”
Soundbar91 Dec 28, 2024
42aa767
chore: lecture - LectureInformation ์—ฐ๊ฐ„๊ด€๊ณ„ ์„ค์ •
Soundbar91 Dec 28, 2024
c387b98
chore: ๋ฉ”์†Œ๋“œ ๋ช… ๋ณ€๊ฒฝ ๋ฐ ๋ฏธ์‚ฌ์šฉ import ์‚ญ์ œ
Soundbar91 Dec 29, 2024
91b3fde
feat: ์ปค์Šคํ…€ ๊ฐ•์˜ ์—…๋ฐ์ดํŠธ ๋กœ์ง ๊ตฌํ˜„
Soundbar91 Dec 29, 2024
ffe61c0
feat: ์ •๊ทœ ๊ฐ•์˜ ์ˆ˜์ • ์ž„์‹œ ์ปค๋ฐ‹
Soundbar91 Dec 29, 2024
ffc5ba0
feat: ์ •๊ทœ ๊ฐ•์˜ ์ˆ˜์ • ๊ธฐ๋Šฅ ๊ตฌํ˜„
Soundbar91 Dec 31, 2024
d2aab0f
fix: ์‘๋‹ต ๋ฒ„๊ทธ ์ˆ˜์ •
Soundbar91 Dec 31, 2024
acd6ce5
docs: TODO ์ž‘์„ฑ
Soundbar91 Dec 31, 2024
77b6fef
feat: ์‹œ๊ฐ„ํ‘œ ์กฐํšŒ API ๊ตฌํ˜„
Soundbar91 Dec 31, 2024
87ae033
Merge branch 'develop' of https://github.com/BCSDLab/KOIN_API_V2 intoโ€ฆ
Soundbar91 Dec 31, 2024
a1c0885
feat: timetableV3 ์Šค์›จ๊ฑฐ ๊ทธ๋ฃนํ™”
Soundbar91 Dec 31, 2024
e7db2f5
feat: TimetableLectureInformation ์ถ”๊ฐ€ ๋ฐ flyway ์ˆ˜์ •
Soundbar91 Jan 2, 2025
719ca37
fix: TimetableLEctureInformation์œผ๋กœ ์ฝ”๋“œ ๋ณ€๊ฒฝ
Soundbar91 Jan 2, 2025
0c1e5cb
chore: ์ด์ „ ์ฝ”๋“œ ์‚ญ์ œ
Soundbar91 Jan 2, 2025
e862005
chore: ์ด์ „ ์ฝ”๋“œ ์‚ญ์ œ ๋ฐ flyway ์ˆ˜์ •
Soundbar91 Jan 2, 2025
c119aa3
feat: ๊ฐ•์˜ ์ค‘๋ณต ์ฒดํฌ ์ถ”๊ฐ€
Soundbar91 Jan 2, 2025
8c545c0
feat: ํ”„๋กœ์‹œ์ € ์ถ”๊ฐ€
Soundbar91 Jan 2, 2025
4aa1656
chore: ์ •๊ทœ ๊ฐ•์˜ API ์ •๊ทœํ™” ๋กค๋ฐฑ
Soundbar91 Jan 2, 2025
0dd3afd
chore: ์ปค์Šคํ…€ ๊ฐ•์˜ API ์ •๊ทœํ™” ๋กค๋ฐฑ
Soundbar91 Jan 3, 2025
21e2237
chore: ์‘๋‹ต๊ฐ’ ์„ค์ •
Soundbar91 Jan 3, 2025
ac8a792
chore: ํŒจํ‚ค์ง€ ์ด๋™
Soundbar91 Jan 3, 2025
cff3f1c
chore: ์ฝ”๋“œ ์œ„์น˜ ๋ณ€๊ฒฝ
Soundbar91 Jan 3, 2025
32600f0
feat: ๋กค๋ฐฑ API
Soundbar91 Jan 3, 2025
bd98406
chore: ๋ฏธ์‚ฌ์šฉ import ์‚ญ์ œ
Soundbar91 Jan 3, 2025
f577b73
test: ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘์„ฑ
Soundbar91 Jan 3, 2025
bdda0b3
test: ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘์„ฑ
Soundbar91 Jan 3, 2025
55c9b48
chore: ์ฃผ์„ ์ž‘์„ฑ
Soundbar91 Jan 3, 2025
cdd6f64
chore: flyway ์‚ญ์ œ
Soundbar91 Jan 3, 2025
c650c6e
chore: ์ฃผ์„ ์ˆ˜์ •
Soundbar91 Jan 3, 2025
fb84bc3
chore: ์ฃผ์„ ์ˆ˜์ •
Soundbar91 Jan 3, 2025
7200c3e
fix: dto ์˜์กด์„ฑ ๋Š๊ธฐ
Soundbar91 Jan 3, 2025
86a70ad
test: ํ…Œ์ŠคํŠธ ์‹คํŒจ ์ˆ˜์ •
Soundbar91 Jan 4, 2025
cf8fbf4
fix: ์ •๊ทœ ๊ฐ•์˜ ์ˆ˜์ •๊ธฐ๋Šฅ ๋ฒ„๊ทธ ์ˆ˜์ •
Soundbar91 Jan 4, 2025
dcc5632
docs: ์Šค์›จ๊ฑฐ ์‘๋‹ต ์ฝ”๋“œ ๋ณ€๊ฒฝ
Soundbar91 Jan 4, 2025
47d93b1
์ถฉ๋Œ ํ•ด๊ฒฐ
Soundbar91 Jan 4, 2025
fe17cc8
chore: lecture API ํŒŒ๋ผ๋ฏธํ„ฐ ๋ณ€๊ฒฝ
Soundbar91 Jan 4, 2025
e999543
test: ํ…Œ์ŠคํŠธ ์ˆ˜์ •
Soundbar91 Jan 4, 2025
70d4a30
chore: ๋ฆฌ๋ทฐ ๋ฐ˜์˜
Soundbar91 Jan 4, 2025
3ba3955
chore: ์ปค์Šคํ…€ ์ •๊ทœํ™” ๋ฉ”์†Œ๋“œ ์ˆ˜์ •
Soundbar91 Jan 4, 2025
7ee4e2c
chore: ๋ฆฌ๋ทฐ ๋ฐ˜์˜
Soundbar91 Jan 4, 2025
1556bbe
chore: lecture v3 ํŒŒ๋ผ๋ฏธํ„ฐ ๋ณ€๊ฒฝ
Soundbar91 Jan 4, 2025
7f293c7
chore: frame ๋ณต๊ตฌ api ์‚ญ์ œ
Soundbar91 Jan 4, 2025
1100595
Revert "chore: frame ๋ณต๊ตฌ api ์‚ญ์ œ"
Soundbar91 Jan 5, 2025
9fb5822
chore: ๋ฆฌ๋ทฐ ๋ฐ˜์˜
Soundbar91 Jan 5, 2025
09431a2
chore: ๋ฆฌ๋ทฐ ๋ฐ˜์˜
Soundbar91 Jan 5, 2025
b43521a
Merge branch 'develop' of https://github.com/BCSDLab/KOIN_API_V2 intoโ€ฆ
Soundbar91 Jan 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,18 @@ public void delete() {
public void undelete() {
this.isDeleted = false;
}

public void customLectureUpdate(String classTitle, String professor, String classTime, String classPlace) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C

๋ฉ”์†Œ๋“œ๋ช…์„ updateCustiomLecture๋กœ ํ•˜๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”? "๋™์‚ฌ + ๋ช…์‚ฌ" ํ˜•ํƒœ๋ฅผ ๋” ๋งŽ์ด ์‚ฌ์šฉํ•ด์„œ์š”!
-> ์•„๋ž˜ updateRegularLecture๋„ ๋™์ผํ•ด์š”!

Suggested change
public void customLectureUpdate(String classTitle, String professor, String classTime, String classPlace) {
public void updateCustomLecture(String classTitle, String professor, String classTime, String classPlace) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฐ˜์˜ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค !! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

this.classTitle = classTitle;
this.professor = professor;
this.classTime = classTime;
this.classPlace = classPlace;
}

public void regularLectureUpdate(String classTitle, String classPlace) {
if (!lecture.getName().equals(classTitle)) {
this.classTitle = classTitle;
}
this.classPlace = classPlace;
}
}
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
);
}
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);
}
}
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
);
}
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);
}
}
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
);
}
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);
}
}
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
);
}
Loading
Loading