-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature/48] 카테고리 validation 검증 로직 및 비기능 개발 #52
Conversation
<body> - CategoryService.java - 유저의 카테고리인지 확인하는 로직 추가 <footer> - 관련: #48
<body> <footer> - 관련: #48
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 boolean isNotCreatedByUser(Long userId) { | ||
return this.user.getId() == userId; | ||
} |
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.
❗ method 명은 isNotCreatedByUser
인데 메서드의 로직은 해당 유저에 의해 생성된 것을 확인하는 것으로 보입니다. 때문에 isCreatedByUser
로 메서드 명을 변경해야하는 것 아닌가 라는 생각이 드는데 어떤가요?
<body> - Category.java, CategoryKind.java - 정책 변경에 따라 CategoryKind.java 생성 - Category 에 기본 일정들을 구분 가능한 Kind 생성 - CategoryRequest.java, CategoryName.java, CategoryValidator.java - 기존 검증 로직 변경 및 삭제 - 정책 변경에 따른 이름을 통한 구분 필요 없어짐 CategoryService.java - 정책에 맞게 검증 수준을 변경 <footer> - 관련: #48
<body> - Category.java, CategoryConverter.java - kind 를 Category에 넣게끔 추가 - SocialUtils.java - 네이버 로그인 시에는 nickname이 null 값으로 받아집니다. - 공통 로직 toUser 를 냅두는 방향으로 변경했습니다. - 좀 더 좋은 구조를 고민해 보면 좋을 것 같아요. - CategoryKind.java, UserFacade.java - Enum 타입의 활용을 위한 변수명 추가 - Enum 타입을 활용하기 위한 Facade 변경 <footer> - 관련: #48
<body> - querydsl 을 이용해서 kind 를 기반으로 스케줄을 입력 받게 변경 <footer> - 관련: #48
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.
👍 수고하셨습니다! 질문이 몇가지가 있어서 해당 부분만 한번만 봐주시면, Approve 가능할 것 같아요!
@@ -46,13 +46,17 @@ public class Category extends BaseTimeEntity { | |||
@Enumerated(EnumType.STRING) | |||
private CategoryStatus status; | |||
|
|||
@Enumerated(EnumType.STRING) | |||
private CategoryKind kind; |
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.
❓ 해당 데이터 DB 스키마에도 적용이 되어있나요?
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.
만약 안되어있다면 merge 하기 전에 스키마 수정 부탁드릴게요!
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.
혹시 스키마에 적용해달라고 하시는게 그 저희 운영 서버에 적용해야하는 건가요?
@@ -226,16 +227,18 @@ private User saveOrNot(User user) { | |||
|
|||
private void makeBaseCategory(User save) { | |||
Category baseCategory = CategoryConverter.toCategory( | |||
"일정", | |||
CategoryKind.SCHEDULE.getCategoryName(), |
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을 통해서 관리해 주니까 더 보기 좋네요!
Type of change
PR Desciption
유저 카테고리 수정
CategoryService.java
소셜로그인 관련 부분에 기본 카테고리 들어가게 수정
Requirements for Reviewer
PR Log
새롭게 배운 것
고민 중인 사항
첨부 자료
관련 이슈