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

Review Domain 작성 #8

Merged
merged 14 commits into from
Sep 15, 2024
Merged

Review Domain 작성 #8

merged 14 commits into from
Sep 15, 2024

Conversation

KIMSEI1124
Copy link
Member

📑 개요

✅ PR 체크리스트


  • 🔀 PR 제목의 형식을 잘 작성했나요?
  • 💯 테스트는 잘 통과했나요?
  • 🏗️ 빌드는 성공했나요?
  • 🧹 불필요한 코드는 제거했나요?
  • 💭 이슈는 등록했나요?
  • 🏷️ 라벨은 등록했나요?

🚀 상세 작업 내용


Jpa Mongo Review Domain

  • 모듈 생성

해당 모듈에서는 JPA 및 Mongo 를 사용하므로 네이밍을 jpa-mongo-review-domain로 작성하였습니다.

  • JPA 도메인 작성
public class Review extends JpaBaseEntity {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "review_id")
	private Long reviewId;

	@Column(nullable = false, length = 50)
	private String title;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "member_id")
	private Member member;

	// TODO: 추후 schedule 와 `@ManyToOne` 관계가 필요
}

해당 엔티티는 추후 Schedule.java와 연관 관계가 필요하므로 주석으로 처리해두었습니다.

2024-09-09_19-03-11

  • Mongo 도메인 작성

📁 ETC


@KIMSEI1124 KIMSEI1124 self-assigned this Sep 9, 2024
@KIMSEI1124 KIMSEI1124 linked an issue Sep 9, 2024 that may be closed by this pull request
Copy link
Contributor

@sjhjack sjhjack left a comment

Choose a reason for hiding this comment

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

고생하셨어요!

Copy link
Member

@jiwon83 jiwon83 left a comment

Choose a reason for hiding this comment

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

몇가지 질문이 있어서 확인 부탁드립니다!


@Getter
public enum JpaErrorCode implements ServerErrorCode {
ALREADY_DELETED_ENTITY(400, "JPA_001", "이미 삭제된 요소는 삭제할 수 없습니다."),
Copy link
Member

Choose a reason for hiding this comment

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

에러 메시지에서 혹시 요소라고 표현하신 이유가 있을까요? 엔티티의 특정 필드 삭제보다는 엔티티 자체가 삭제된 경우에 대한 에러 메시지라고 생각이 들어서요..!

Copy link
Member Author

Choose a reason for hiding this comment

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

이제 해당 내용이 결국은 클라이언트(사용자)에게 보이는데 노출되어도 괜찮을 정도로 메시지를 작성하고 있었습니다.

혹시 다른 메시지가 있으면 추천해 주실 수 있을까요?

Copy link
Member

Choose a reason for hiding this comment

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

명시적인건 "이미 삭제된 엔티티입니다" 정도로 생각했는데, 사용자에게 보이는 것을 고려하면 "이미 삭제된 데이터입니다"라는 식도 괜찮을 것 같네요 : )

Copy link

📄 Image Server Jacoco Coverage Report

Overall Project 88.81% 🍏

There is no coverage information present for the Files changed

@KIMSEI1124 KIMSEI1124 merged commit 74cafd4 into main Sep 15, 2024
5 checks passed
Copy link

📄 Image Server Jacoco Coverage Report

Overall Project 88.81% 🍏

There is no coverage information present for the Files changed

@KIMSEI1124 KIMSEI1124 deleted the feat/#5 branch September 15, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Review Domain 작성한다.
3 participants