Skip to content

feat(core-jpa): BaseEntity 추상 클래스 분리 #57

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

Merged
merged 4 commits into from
Feb 18, 2025
Merged

Conversation

Ropung
Copy link
Contributor

@Ropung Ropung commented Feb 17, 2025

  • UuidBaseEntity 클래스 추가
  • BaseEntity -> LongBaseEntity 클래스명 변경

Refs #28

Pull Request

Issues

Resolves #28

Description

  • UuidBaseEntity 클래스 추가
  • BaseEntity -> LongBaseEntity 클래스명 변경

How Has This Been Tested?

  • core 레벨에서 작업이라 테스트 가 없습니다.

Additional Notes

  • LongBaseEntity(타입베이스엔티티) 보다는 BaseLongEntity(베이스타입엔티티)가 더 나을것같습니다. 인텔리제이 자동완성에서 잡아줄때 Base를 쳤을때 직관적일것같습니다.

- UuidBaseEntity 클래스 추가
- BaseEntity -> LongBaseEntity 클래스명 변경

Refs #28
@Ropung Ropung self-assigned this Feb 17, 2025
@Ropung Ropung added the type: feature 새로운 기능 또는 기능적 개선 A new feature or enhancement label Feb 17, 2025
Copy link
Contributor

@silberbullet silberbullet left a comment

Choose a reason for hiding this comment

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

@Ropung 님 작업하시느라 고생하셨습니다.

다만 UuidBaseEntity.java에 수정 사항이 있습니다!

Copy link
Member

@merge-simpson merge-simpson left a comment

Choose a reason for hiding this comment

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

👍 빠른 작업 감사합니다.

바쁘신 중에도 빠르게 게시해 주셔서 검토가 수월했습니다.

사소하게 발견된 작업 사항은,
바쁘시다 보면 누락되기 쉬운 항목들인 만큼
이렇게 서로 검토하는 시간이 더 유익할 수 있는 것 같습니다.

@Ropung 님께서 앞으로도 참여 가능하신 작업들에는 즉석에서 하나씩 참여해 주시면 든든할 것 같습니다!

저는 이대로 병합을 진행해 주셔도 좋아 보입니다.
(다른 리뷰자가 수정을 요청한 부분 및 관련 부분만 수정해 주세요!)

🚀 🏅 Approve!

@merge-simpson merge-simpson added in: board Issues in the board module review: ing Reviews are in progress and taking time labels Feb 17, 2025
Copy link
Contributor

@silberbullet silberbullet left a comment

Choose a reason for hiding this comment

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

🎐 바쁘실거 같아 전체적으로 제가 수정하였습니다!

고생하셨습니다~~

@MappedSuperclass
public abstract class UuidBaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
Copy link
Contributor

Choose a reason for hiding this comment

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

UUID 타입을 적용 후, UUID 자동 채번 설정을 하였습니다!

import java.time.Instant;

@Getter
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class BaseTimeEntity extends BaseEntity {
public abstract class BaseTimeEntity implements Serializable {
Copy link
Contributor

@silberbullet silberbullet Feb 18, 2025

Choose a reason for hiding this comment

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

BaseTimeEntity는 개발자가 직접 인스턴스를 생성을 방지하도록 추상 클래스로 바꾸었습니다.

@silberbullet silberbullet merged commit b4e3b5a into main Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: board Issues in the board module review: ing Reviews are in progress and taking time type: feature 새로운 기능 또는 기능적 개선 A new feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Core: JPA BaseEntity류 추상 클래스 관리
3 participants