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

[6] 일반 회원, 파트너 생성 #7

Merged
merged 4 commits into from
Aug 30, 2024
Merged

Conversation

ohsuha
Copy link
Collaborator

@ohsuha ohsuha commented Aug 27, 2024

No description provided.

@ohsuha ohsuha linked an issue Aug 27, 2024 that may be closed by this pull request
@ohsuha ohsuha requested a review from mason136 August 27, 2024 16:47
import org.example.commerce_site.attribute.PartnerStatus;
import org.example.commerce_site.domain.Partner;

public class PartnerRequestDTO {

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);

Choose a reason for hiding this comment

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

Facade는 필요할 때만 쓰셔도 됩니다
지금처럼 by-pass 할 떄는 굳이 안쓰셔도 되요

Copy link
Collaborator Author

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;

Choose a reason for hiding this comment

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

LocalDateTime으로 저장해야 사람이 이해하기 쉽지 않을까요?


@Getter
@MappedSuperclass
@SuperBuilder

Choose a reason for hiding this comment

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

createdAt, updatedAt를 하위 클래스 생성할 때 쓸일이 있을까요? 없으면 굳이 기본으로 안넣으셔도 됩니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

언제 생성, 수정되었는지 보여줘야 할 필요가 있을것같아서 엔티티 마다 created_at updated_at 을 넣었습니다

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 제거
@ohsuha ohsuha self-assigned this Aug 29, 2024

@Getter
@MappedSuperclass
@SuperBuilder

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가 필요 없으면 제거하셔도 된다는 말씀이였어요!

@ohsuha ohsuha merged commit 15fcde0 into main Aug 30, 2024
1 check passed
@ohsuha ohsuha deleted the 6-create-user-and-partner branch September 3, 2024 00:29
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