Open
Conversation
jjunhub
reviewed
Oct 19, 2024
Comment on lines
+14
to
+18
| @Id | ||
| @GeneratedValue(strategy = GenerationType.AUTO) | ||
|
|
||
| @Column(name = "n주차") | ||
| private int id; |
Member
There was a problem hiding this comment.
우선 자동으로 할당해주신 점 좋습니다!
n주차라고 작성해주신 것 보니, 아마 1주차에 해당하는 출석들을 모아서 설정하시려는 것 같은데 맞을까요?
맞다면 요 로직보다는 다음과 같이 작성해주시는 편이 좋을 것 같습니다
Suggested change
| @Id | |
| @GeneratedValue(strategy = GenerationType.AUTO) | |
| @Column(name = "n주차") | |
| private int id; | |
| @Id | |
| @GeneratedValue(strategy = GenerationType.AUTO) | |
| @Column(name = "attendant_id") | |
| private int id; | |
| @Column(name = "attendant_week_number") | |
| private int weekNumber; |
pk에는 의미가 없는 인공적인 값을 넣어주시는 것이 DB 구조 상 로직 작성하기에 편하실 것 같습니다! 참고하시면 될 것 같아요
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
수업 출석 관련 Table을 만들어봤습니다.