-
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
[6] 일반 회원, 파트너 생성 #7
Conversation
import org.example.commerce_site.attribute.PartnerStatus; | ||
import org.example.commerce_site.domain.Partner; | ||
|
||
public class PartnerRequestDTO { |
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.
클래스 이름 파스칼 표현식으로 써주세요~
private final UserService userService; | ||
|
||
public UserResponseDTO.Create create(UserRequestDTO.Create dto) { | ||
return userService.create(dto); |
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.
Facade는 필요할 때만 쓰셔도 됩니다
지금처럼 by-pass 할 떄는 굳이 안쓰셔도 되요
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 abstract class BaseTimeEntity extends IdKeyEntity { | ||
@CreatedDate | ||
@Column(name = "created_at") | ||
protected Instant createdAt; |
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.
LocalDateTime으로 저장해야 사람이 이해하기 쉽지 않을까요?
|
||
@Getter | ||
@MappedSuperclass | ||
@SuperBuilder |
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.
createdAt, 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.
언제 생성, 수정되었는지 보여줘야 할 필요가 있을것같아서 엔티티 마다 created_at updated_at 을 넣었습니다
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.
SuperBuilder를 안 써도 created_at updated_at를 만들 수 있어서 SuperBuilder가 필요 없으면 제거하셔도 된다는 말씀이였어요!
- DTO -> Dto - Instant -> LocalDateTime - Facade 제거
|
||
@Getter | ||
@MappedSuperclass | ||
@SuperBuilder |
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.
SuperBuilder를 안 써도 created_at updated_at를 만들 수 있어서 SuperBuilder가 필요 없으면 제거하셔도 된다는 말씀이였어요!
No description provided.