Skip to content

Conversation

@chanrhan
Copy link
Collaborator

@chanrhan chanrhan commented Nov 19, 2025

📌 ISSUE 번호

📄 작업 내용 요약

  • 앨범 도메인 추가
  • 앨범 CRUD 추가
  • 지도 사진 조회 API 검색 조건 변경
  • 앨범 기준 사진 조회 API 추가

🏗️ 앨범 테이블 설계

image - 앨범 테이블 추가 - 앨범 내 저장된 사진 데이터를 의미하는 앨범-사진 관계 테이블 추가

📦 앨범-사진 관계 도메인

  • 앨범-사진 관계 테이블에 대한 별도의 도메인 클래스 AlbumPhoto 정의

🕹️ 앨범 CRUD 추가

🔍 지도 사진 조회 API 검색 조건 변경

  • 검색 조건 변경
    • 이전 : 시작 날짜(from)와 끝 날짜(to) 범위 내의 사진을 PhotoMarker로 변환
    • 변경 : 클라이언트로부터 요청받은 albumId에 해당하는 사진을 PhotoMarker로 변환

📢 참고 사항

✅ 체크리스트

  • ISSUE 번호 연결 했나요?
  • Reviewers 지정 했나요?
  • Assignees 지정 했나요?
  • Labels 지정 했나요?

@chanrhan chanrhan requested a review from kih1015 November 19, 2025 13:57
@chanrhan chanrhan self-assigned this Nov 19, 2025
@chanrhan chanrhan added the enhancement New feature or request label Nov 19, 2025
Comment on lines +32 to +34
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "photo_id", nullable = false)
private Photo photo;
Copy link
Contributor

Choose a reason for hiding this comment

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

C

앨범 애그리거트에서 사진 애그리거트를 직접 참조하는 것에 대해 어떻게 생각하시나요?
다른 애그리거트는 id 형태로 간접 참조해도 괜찮지 않을까 생각합니다.

Comment on lines +28 to +30
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "album_id", nullable = false)
private Album album;
Copy link
Contributor

Choose a reason for hiding this comment

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

C

루트 애그리거트를 Album 이라고 생각하는데 어떤가요?
Album에서 리스트형태로 AlbumPhoto를 관리하고
AlbumPhoto는 Embeddable로 보는 것도 괜찮다고 생각합니다.

더불어 앨범이 삭제될경우 AlbumPhoto도 같이 삭제될 수 있도록 Cascade 설정도 할 필요가 있어 보여요.

Comment on lines +11 to +17
create table if not exists albums_photos
(
id bigint unsigned auto_increment
primary key,
album_id bigint,
photo_id bigint
)
Copy link
Contributor

Choose a reason for hiding this comment

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

C

참조키 제약조건을 걸 수도 있을 것 같은데 어떻게 생각하시나요? 고민이 되는 부분입니다.

@chanrhan chanrhan merged commit 8803b60 into develop Nov 20, 2025
2 checks passed
@chanrhan chanrhan deleted the feature/36-add-album-domain branch November 20, 2025 01:14
@github-project-automation github-project-automation bot moved this from Backlog to Done in PhotoLinerAPI Nov 20, 2025
@chanrhan chanrhan changed the title feature: 사진 앨범 도메인 추가 feat: 사진 앨범 도메인 추가 Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature] 사진 앨범 도메인 및 CRUD 추가

3 participants