refactor: 저장한 후보 스타일을 카탈로그 참조로 확장 - #148
Merged
Merged
Conversation
추천·저장한 후보·AR 이 모두 color_id 를 들고 있는데 가리킬 표가 없어 아무도 값을 채우지 못했다. hairstyle_assets 와 짝을 이루는 공용 카탈로그를 만들고, 값이 전부 비어 있는 지금 recommendation_items 의 참조 무결성도 함께 연결한다.
image_url 과 reason 이 NOT NULL 이라 AR 에서 저장하는 후보를 넣을 수 없었다. AR 후보에는 추천 이유가 없고 이미지도 files 를 가리키는 capture_id 로 다룬다. 값이 전부 비어 있는 color_id 에는 지금 카탈로그 참조를 건다.
테이블에는 hairstyle_id·color_id·capture_id·memo 가 있는데 엔티티가 레거시 5개 컬럼만 매핑해, 카탈로그를 가리키는 후보를 만들 수도 읽을 수도 없었다.
저장된 image_url 이 없는 카탈로그 기반 후보는 공유 화면에서 이미지 자리가 비어 버린다. 사진과 같은 규칙으로 READY 인 캡처 파일에만 URL 을 발급한다.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
변경 내용
saved_styles.image_url·reason의NOT NULL해제,color_id에 카탈로그 참조 연결hairstyle_idcolor_idcapture_idmemo매핑SavedStyle.fromCatalog추가작업 목적
테이블에는 카탈로그 참조 컬럼이 있는데 엔티티가 레거시 5개만 매핑해 카탈로그를 가리키는 후보를 만들 수도 읽을 수도 없었다.
image_url과reason의NOT NULL도 막힘이었다 — AR 후보에는 추천 이유가 없고 이미지도files를 가리키는capture_id로 다룬다.테스트 방법
체크리스트
기타 사항
hair_colors가 먼저 머지돼야 한다SavedStyle.create)는 그대로 두고image_url·reason을 여전히 요구한다. 레거시 행의 의미가 흐려지지 않게 하기 위해서다style_name은 계속 필수다. 공유가 이 행을 가리키므로 카탈로그에서 스타일이 내려가도 저장 당시 이름을 보여야 한다