Skip to content

Conversation

@baekteun
Copy link
Member

💡 배경 및 개요

Local DB 추가

Resolves: #16

📃 작업내용

Local DB 추가

#  OnmirModel V1

## Entities

### BookEntity
- author: String
- coverImageURL: URI
- isbn: String
- isbn13: String
- originalBookID: String
- source: BookSourceTypeKind
- pageCount: Int64
- publishedDate: Date
- publisher: String
- rating: Double
- status: BookStatusTypeKind
- title: String

Relationships:
- logs: [ReadingLogEntity]
- quotes: [QuoteEntity]

### QuoteEntity
- content: String
- page: Int

Relationships:
- book: BookEntity

### ReadingLogEntity
- startPage: Int64
- endPage: Int64
- note: String
- readingSeconds: Double

Relationships:
- book: BookEntity

🙋‍♂️ 리뷰노트

  • DB 테이블 리뷰해주세요
  • enum의 경우 ValueTransformer 사용했어요
    • enum을 직접 쓸 수는 없다보니(NSManaged에서 사용 불가) book.status.status 이렇게 해야돼요 (objc에서 사용할 수 있는 AnyObject로 wrapping한 타입으로 지정)
  • iCloud는 지금은 toggle없이 항상 활성화 되게 해놨어요, 토글 기능 제공하면 그때 추가하죠
  • 번들이.. com.msg.onmir이었다가.. already exist라 unavailable이다보니 com.msg.booktracker로 지정해놨어요.
  • 아 모듈화 마려워요

✅ PR 체크리스트

템플릿 체크리스트 말고도 추가적으로 필요한 체크리스트는 추가해주세요!

  • 이 작업으로 인해 변경이 필요한 문서가 변경되었나요? (e.g. .env, 노션, README)
  • 이 작업을 하고나서 공유해야할 팀원들에게 공유되었나요? (e.g. "API 개발 완료됐어요", "환경값 추가되었어요")
  • 작업한 코드가 정상적으로 동작하나요?
  • Merge 대상 브랜치가 올바른가요?
  • PR과 관련 없는 작업이 있지는 않나요?

🎸 기타

@baekteun baekteun requested a review from uuuunseo as a code owner July 22, 2025 15:34
@baekteun baekteun linked an issue Jul 22, 2025 that may be closed by this pull request
@github-actions
Copy link

✅ PR의 Assign 자동 지정을 성공했어요!

@baekteun

Copy link
Contributor

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

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 a local database using Core Data with iCloud sync. The overall structure is well-designed, especially the protocol-oriented CoreDataStack and the use of ValueTransformers for handling enums.

I've identified a few critical issues that need attention. Most importantly, some Core Data entities are incorrectly marked as abstract, which will cause the application to crash at runtime. I've also pointed out several areas where error handling can be made more robust to prevent the app from entering an unstable state. Additionally, there are suggestions for improving logging consistency and ensuring the documentation accurately reflects the implementation.

Addressing these points will significantly improve the stability and maintainability of the new data layer. Great work on setting up this foundation!

baekteun and others added 4 commits July 24, 2025 22:24
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@baekteun baekteun added 0️⃣ Priority: Critical 우선순위 - 긴급!!!!! ✨ Feature 신규 기능 labels Jul 24, 2025
@baekteun baekteun merged commit 3d876c0 into master Jul 31, 2025
@baekteun baekteun deleted the feature/add-local-db branch July 31, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0️⃣ Priority: Critical 우선순위 - 긴급!!!!! ✨ Feature 신규 기능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local DB 추가

3 participants