-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix : flyway 116번, 117번 수정 * feat : Repository 정리 및 작성 * feat : Response 추가 * feat : exception 추가 * chore : Repo 정리 * feat : Service 및 Controller 작성 * feat : graduation 도메인 swagger 추가 * feat : 리뷰 반영 * chore : 리뷰 반영
- Loading branch information
Showing
14 changed files
with
176 additions
and
19 deletions.
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
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
21 changes: 21 additions & 0 deletions
21
src/main/java/in/koreatech/koin/domain/graduation/dto/CourseTypeLectureResponse.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,21 @@ | ||
package in.koreatech.koin.domain.graduation.dto; | ||
|
||
import java.util.List; | ||
|
||
import in.koreatech.koin.domain.timetable.model.Lecture; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record CourseTypeLectureResponse( | ||
@Schema(description = "학기", example = "20192") | ||
String semester, | ||
|
||
@Schema(description = "이수구분 충족강의") | ||
List<LecturePortionResponse> lectures | ||
) { | ||
public static CourseTypeLectureResponse of(String semester, List<Lecture> lectures) { | ||
List<LecturePortionResponse> lectureList = lectures.stream() | ||
.map(LecturePortionResponse::from) | ||
.toList(); | ||
return new CourseTypeLectureResponse(semester, lectureList); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/in/koreatech/koin/domain/graduation/dto/LecturePortionResponse.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,31 @@ | ||
package in.koreatech.koin.domain.graduation.dto; | ||
|
||
import in.koreatech.koin.domain.timetable.model.Lecture; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record LecturePortionResponse( | ||
@Schema(description = "강의 ID", example = "1") | ||
Integer id, | ||
|
||
@Schema(description = "강의 코드", example = "ABC123") | ||
String code, | ||
|
||
@Schema(description = "강의 이름", example = "컴퓨터구조") | ||
String name, | ||
|
||
@Schema(description = "학점", example = "3") | ||
String grades, | ||
|
||
@Schema(description = "학과", example = "컴퓨터공학부") | ||
String department | ||
) { | ||
public static LecturePortionResponse from(Lecture lecture) { | ||
return new LecturePortionResponse( | ||
lecture.getId(), | ||
lecture.getCode(), | ||
lecture.getName(), | ||
lecture.getGrades(), | ||
lecture.getDepartment() | ||
); | ||
} | ||
} |
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
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
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
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
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
19 changes: 19 additions & 0 deletions
19
...n/koreatech/koin/domain/timetableV2/exception/NotFoundSemesterAndCourseTypeException.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,19 @@ | ||
package in.koreatech.koin.domain.timetableV2.exception; | ||
|
||
import in.koreatech.koin.global.exception.DataNotFoundException; | ||
|
||
public class NotFoundSemesterAndCourseTypeException extends DataNotFoundException { | ||
private static final String DEFAULT_MESSAGE = "학기나 이수구분을 찾을 수 없습니다."; | ||
|
||
public NotFoundSemesterAndCourseTypeException(String message) { | ||
super(message); | ||
} | ||
|
||
public NotFoundSemesterAndCourseTypeException(String message, String detail) { | ||
super(message, detail); | ||
} | ||
|
||
public static NotFoundSemesterAndCourseTypeException withDetail(String detail) { | ||
return new NotFoundSemesterAndCourseTypeException(DEFAULT_MESSAGE, detail); | ||
} | ||
} |
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
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
Oops, something went wrong.