-
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.
* feat: 멘토 스터디 커리큘럼 조회 * feat: format변환해서 응답 반환해주기 * feat: 네이밍 단수-> 복수로 변경 * feat: 노션 링크 삭제
- Loading branch information
1 parent
78a85bb
commit b76dcc0
Showing
3 changed files
with
35 additions
and
0 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
19 changes: 19 additions & 0 deletions
19
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/StudySessionResponse.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 com.gdschongik.gdsc.domain.study.dto.response; | ||
|
||
import com.gdschongik.gdsc.domain.recruitment.domain.vo.Period; | ||
import com.gdschongik.gdsc.domain.study.domain.Difficulty; | ||
import com.gdschongik.gdsc.domain.study.domain.StudyDetail; | ||
import com.gdschongik.gdsc.domain.study.domain.vo.Session; | ||
|
||
public record StudySessionResponse(Long studyDetailId, Period period, Long week, String title, Difficulty difficulty) { | ||
|
||
public static StudySessionResponse from(StudyDetail studyDetail) { | ||
Session session = studyDetail.getSession(); | ||
return new StudySessionResponse( | ||
studyDetail.getId(), | ||
studyDetail.getPeriod(), | ||
studyDetail.getWeek(), | ||
session.getTitle(), | ||
session.getDifficulty()); | ||
} | ||
} |