-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FEAT] 커뮤니티 Entity생성 #247
[FEAT] 커뮤니티 Entity생성 #247
Conversation
Hi there 👋 Using this App for a private organization repository requires a paid subscription. You can click If you are a non-profit organization or otherwise can not pay for such a plan, contact me by creating an issue |
@Getter | ||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE) | ||
|
||
public enum Career { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드를 보니 해당 enum타입은 직업 카테고리의 하위 카테고리로 보이는데 혹시 다른 enum명을 사용하는 것에 대해서 어떻게 생각하시나요! 바로 든 생각으로는 CareerSubCategory 이런 느낌입니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋은의견입니다!
@Column | ||
private String title; | ||
|
||
@Column | ||
private String content; | ||
|
||
@Column | ||
private Integer hits; | ||
|
||
@Type(type = "string-array") | ||
@Column(name = "images", columnDefinition = "text[]") | ||
private String[] images; | ||
|
||
@Column(name = "is_question") | ||
private Boolean isQuestion; | ||
|
||
@Column(name = "is_blind_writer") | ||
private Boolean isBlindWriter; | ||
|
||
@Column(name = "is_reported") | ||
private Boolean isReported; | ||
|
||
@Column(name = "created_at") | ||
private LocalDateTime createdAt; | ||
|
||
@Column(name = "updated_at") | ||
private LocalDateTime updatedAt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 알기로 @column 어노테이션에서 nullable값의 default가 true인 것으로 아는데 nullable = true 옵션을 사용하지 않은 이유가 궁금합니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기본적으로 JPA는 DDL을 진행할 때 Entity이름과 해당 필드들을 lower_under_score 방식을 이용하는 것으로 아는데 name을 따로 lower_under_score로 명시해준 이유가 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헉 그러게요! nullable = false 옵션을 왜 사용하시지 않았는지 여쭤보시는게 맞을까요? 이부분 완전 놓쳤습니다! 노티감사해요 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 맞습니당!
public String getKey() { | ||
return name(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enum 마다 보이는 같은 코드가 반복되는 것 같아서 코드를 분리하는것은 어떻게 생각하시나요?
No description provided.