Skip to content

[✨feat] Banner 구현 #41

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 7 commits into from
May 25, 2025
Merged

[✨feat] Banner 구현 #41

merged 7 commits into from
May 25, 2025

Conversation

leeeyubin
Copy link
Member

@leeeyubin leeeyubin commented May 17, 2025

📄 Work Description

  • Banner 엔티티를 구현했습니다.
  • BaseRootEntity를 상속받아 공통 엔티티의 기능을 유지했습니다.

💭 Thoughts

  • Banner의 경우 다른 테이블과의 연관관계도 없고, 별다른 로직도 없는 것 같아 구현을 하지 않았는데 괜찮은지 확인 부탁드립니다..!!

✅ Testing Result

  • 별도의 테스트는 작성하지 않았습니다.

🗂 Related Issue

Copy link
Member

@jsoonworld jsoonworld left a comment

Choose a reason for hiding this comment

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

전체적으로 불필요한 복잡함 없이 깔끔하게 잘 정리해주셔서 인상 깊었어요!
특히 연관관계 없이 단순한 구조라도 책임을 명확히 표현하려는 의도가 느껴져서 좋았습니다 🙌

작은 부분들이긴 하지만, 몇 가지 궁금한 점이나 확장 가능성에 대해 함께 생각해볼 수 있어서 저에게도 의미 있는 리뷰였어요.
구현하시느라 고생 많으셨고, 좋은 코드 공유해주셔서 감사합니다! 😊

Comment on lines 17 to 20
@Column(length = 255)
private var imageUrl: String,
@Column(length = 255)
private var link: String,
Copy link
Member

Choose a reason for hiding this comment

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

imageUrllink 둘 다 외부 리소스를 참조하는 값으로 보여서 한 번 여쭤보고 싶었어요!

현재는 각각 private var로 선언되어 있는데, 혹시 외부에서 해당 값을 직접 읽거나 사용하는 케이스는 없다고 판단하신 걸까요?
또는 추후에 URL 포맷 검증이나, 접근 제한 같은 로직이 붙게 된다면
ImageUrl, Link와 같은 VO로 분리하는 것도 고려해볼 수 있을 것 같아서요 🙂

지금 구조도 충분히 깔끔하지만, 혹시 어떤 방향성을 가지고 계셨는지 궁금했습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

Banner 엔티티의 특징에 대해 더 고민해봤어야 했던 것 같네요😅

말씀해 주신 imageUrl과 link는 public 하게 두고 VO로 분리해 두겠습니다! 상세 로직은 추후 개발하면서 더 작성하도록 할게요!

Comment on lines +21 to +27
@Column
private var priority: Int,
) : BaseRootEntity()
Copy link
Member

Choose a reason for hiding this comment

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

priority는 배너 노출 순서 같은 역할을 하게 될 값으로 보이는데요!

혹시 기본값을 별도로 두지 않으신 건, 반드시 명시적으로 설정되어야 한다고 판단하신 걸까요?
아니면 추후 비즈니스 로직에서 정렬 기준 등을 따로 분리해서 다루실 계획이 있으셨을지 궁금했어요.

우선순위 관련 값은 은근히 서비스 흐름에 영향을 주는 경우가 많아서, 혹시 고려하신 방향이 있을까 궁금해졌습니다 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

예리한 조언 감사합니다!
아직 배너가 어떤 점을 기준으로 정렬되고 있는지 제대로 파악이 되지 않아 별도로 두지 않고 있었습니다!
해당 부분은 조금 더 알아보고 적용해보도록 하겠습니다..!

@leeeyubin leeeyubin linked an issue May 21, 2025 that may be closed by this pull request
1 task
@pull-request-size pull-request-size bot added size/M and removed size/S labels May 21, 2025
@jsoonworld jsoonworld requested a review from Copilot May 23, 2025 13:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a new Banner entity as well as its associated Link and ImageUrl value objects, all built using JPA annotations to map the entity properties.

  • Introduces the Banner entity inheriting from BaseRootEntity
  • Adds Link and ImageUrl data classes with a length constraint on their string values
  • Maps embedded fields with attribute override annotations in Banner

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/main/kotlin/com/terning/server/kotlin/domain/banner/Link.kt New Link data class for encapsulating URL values.
src/main/kotlin/com/terning/server/kotlin/domain/banner/ImageUrl.kt New ImageUrl data class for encapsulating image URL values.
src/main/kotlin/com/terning/server/kotlin/domain/banner/Banner.kt New Banner entity incorporating embedded Link and ImageUrl.
Comments suppressed due to low confidence (1)

src/main/kotlin/com/terning/server/kotlin/domain/banner/Banner.kt:25

  • The Banner entity currently lacks tests to verify its JPA mappings and behavior. Consider adding unit or integration tests to ensure the entity functions as expected in production.
    @Column
    private var priority: Int,

@leeeyubin leeeyubin changed the base branch from feat/#37 to develop May 25, 2025 05:02
@leeeyubin leeeyubin merged commit 0d7cef4 into develop May 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[✨feat] Banner 구현
2 participants