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

fix: AssignmentResponse 잘못된 값 매핑 수정 #764

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
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 @@ -5,7 +5,6 @@
import com.gdschongik.gdsc.domain.study.domain.vo.Assignment;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import java.time.LocalTime;

public record AssignmentResponse(
Long studyDetailId,
Expand All @@ -15,7 +14,7 @@ public record AssignmentResponse(
@Schema(description = "주차") Long week,
@Schema(description = "과제 명세 링크") String descriptionLink,
@Schema(description = "과제 상태") StudyStatus assignmentStatus,
@Schema(description = "커리큘럼 시작일") LocalTime curriculumStartAt) {
@Schema(description = "주차 시작일") LocalDateTime studyDetailStartDate) {
public static AssignmentResponse from(StudyDetail studyDetail) {
Assignment assignment = studyDetail.getAssignment();
return new AssignmentResponse(
Expand All @@ -26,6 +25,6 @@ public static AssignmentResponse from(StudyDetail studyDetail) {
studyDetail.getWeek(),
assignment.getDescriptionLink(),
assignment.getStatus(),
studyDetail.getCurriculum().getStartAt());
studyDetail.getPeriod().getStartDate());
}
}