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

[SL-11 CHORE] part에 generation 속성 추가 #33

Merged
merged 6 commits into from
Dec 8, 2023
Merged

Conversation

bykbyk0401
Copy link
Collaborator

티켓

SL-11

변경사항

part에 generation 속성을 추가했습니다.


부가설명


고려사항


스크린샷

Copy link
Collaborator

@jinyoungpark00 jinyoungpark00 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

private String imageUrl;

@Column(nullable = false)
private Long curriculumGeneration;
Copy link
Collaborator

Choose a reason for hiding this comment

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

다른 필드도 그냥 generation으로 쓰고 있어서 generation으로 하는 것도 좋을 것 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵 수정했습니다!


if (partQuestions.isEmpty() && curriculums.isEmpty()) {
throw new NoSuchElementException("PartQuestion과 Curriculum이 모두 비어 있습니다.");
}

// 임시로 이렇게 구현했습니다. 후에 파트에 generation을 추가하거나 해야할 듯 합니다.
Long generation = partQuestions.isEmpty() ? curriculums.get(0).getGeneration() : partQuestions.get(0).getGeneration();
Copy link
Collaborator

Choose a reason for hiding this comment

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

part에 generation을 추가했으니 part의 generation을 가져오는 방법도 좋을 것 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

좋아요
반영했습니다!

@bykbyk0401 bykbyk0401 merged commit bf0b06a into develop Dec 8, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants