Skip to content

타임캡슐 도메인 엔티티 및 리포지토리 구성#11

Merged
hej090224 merged 3 commits into
developfrom
feat/10-time-capsule-domain-entities
Jul 8, 2026
Merged

타임캡슐 도메인 엔티티 및 리포지토리 구성#11
hej090224 merged 3 commits into
developfrom
feat/10-time-capsule-domain-entities

Conversation

@hej090224

Copy link
Copy Markdown
Member

✨ 작업 내용

타임캡슐 서비스 ERD 기준으로 도메인 Entity, Enum, Repository 기본 구성을 추가했습니다.

  • Member, TimeCapsule, Media, CapsuleRecipient, CapsuleOpen, CapsuleHistory, Guestbook, Friend, Notification, Report, Block 엔티티를 추가했습니
    다.
  • ERD 기준 enum 타입을 추가했습니다.
  • 각 엔티티별 Spring Data JPA Repository를 추가했습니다.
  • ManyToOne(fetch = FetchType.LAZY) 단방향 연관관계를 매핑했습니다.
  • 중복 방지를 위한 unique constraint와 nullable, length 등 기본 제약조건을 반영했습니다.
  • 위치 컬럼은 Hibernate Spatial/JTS 기반 Point 타입으로 매핑했습니다.
  • Flyway V2__create_time_capsule_domain_tables.sql 마이그레이션을 추가했습니다.

🔍 리뷰 시 참고사항

  • Controller, Service, DTO, API 계층은 이번 PR 범위에서 제외했습니다.
  • public_status, friend_request_type, media_target_type 컬럼은 생성하지 않았습니다.
  • 평문 password, answer 컬럼은 생성하지 않고 password_hash, answer_hash만 반영했습니다.
  • latitude, longitude로 임의 대체하지 않고 PostGIS GEOMETRY(Point, 4326) 기준으로 구성했습니다.
  • 검증은 JDK 23 환경에서 진행했습니다. 기본 JDK 25에서는 Kotlin Gradle DSL 파싱 문제가 있습니다.

✅ 체크리스트

  • 문서(README, .env.example 등) 변경이 필요한 경우 작성 또는 수정했나요?
  • 작업한 코드가 정상적으로 동작하는 것을 직접 확인했나요?
  • 필요한 경우 테스트 코드를 작성하거나 수정했나요?
  • Merge 대상 브랜치를 올바르게 설정했나요?
  • PR과 관련 없는 작업을 포함하지 않았나요?
  • 적절한 라벨과 리뷰어를 설정했나요?

검증:

  • git diff --check
  • ./gradlew test
  • ./gradlew build

📎 관련 이슈(선택)

@hej090224 hej090224 requested a review from cfcromn July 8, 2026 01:31
@hej090224 hej090224 self-assigned this Jul 8, 2026
@hej090224 hej090224 added the ✨ Feature 신규 기능 label Jul 8, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the core domain entities, repositories, and database migration scripts for the time capsule service, including Member, TimeCapsule, Friend, Media, Notification, Report, and Block. The reviewer provided valuable feedback on improving the JPA entity design and database indexing. Key recommendations include: changing immutable properties (val) to mutable (var) where state updates are required for JPA dirty checking; explicitly setting the SRID to 4326 in GeometryFactory to prevent PostGIS insertion errors; utilizing the kotlin-jpa compiler plugin to eliminate boilerplate protected constructors and dummy companion objects; adopting Spring Data JPA Auditing to handle audit timestamps; and removing redundant database indexes that are already covered by composite unique constraints.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/main/kotlin/team/cklob/mudda/domain/member/domain/entity/Member.kt Outdated
Comment thread src/main/kotlin/team/cklob/mudda/domain/timecapsule/domain/entity/TimeCapsule.kt Outdated
Comment thread src/main/kotlin/team/cklob/mudda/domain/block/domain/entity/Block.kt Outdated
Comment thread src/main/kotlin/team/cklob/mudda/domain/member/domain/entity/Member.kt Outdated
Comment thread src/main/resources/db/migration/V2__create_time_capsule_domain_tables.sql Outdated
@hej090224 hej090224 changed the base branch from main to develop July 8, 2026 01:53
@hej090224 hej090224 merged commit 1063326 into develop Jul 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 신규 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entity 및 Repository 구성

2 participants