Skip to content
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

[BE] ItemHistory에 amount 컬럼 추가 #1695

Open
saewoo1 opened this issue Oct 22, 2024 · 0 comments · May be fixed by #1696
Open

[BE] ItemHistory에 amount 컬럼 추가 #1695

saewoo1 opened this issue Oct 22, 2024 · 0 comments · May be fixed by #1696

Comments

@saewoo1
Copy link
Collaborator

saewoo1 commented Oct 22, 2024

작업 설명

  • 관리자 계정에서 원하는 만큼 코인 지급 시 지급량 추적
  • 아이템 가격 변동에 상관없이 구매 당시의 가격을 기록하여 일관성 유지

접근 방법

  • ItemHistory에 amount 컬럼 추가
  • 조회 시 item이 아닌 ItemHistory의 amount 사용
  • Item 테이블에 ADMIN_REWARD_COIN 아이템 데이터 추가
  • 기존에 Sku에 있는 코인 지급(100, 200 ~) 이부분 모두 통합
  • 아직 코인 지급 기능만 넣어두고, 기존에 작성한 아이템 조회 및 사용 로직은 수정하지 않았습니다

대체 방안 (선택 사항)

  • 기존 테이블에 amount 컬럼이 추가됨에 따라 조회 및 수정 로직을 바꿔야하는데, 이 방향이 맞는지 저도 잘 모르겠어서ㅎㅎ..;
  • 일단은 기존 코드를 최대한 손대지 않기 위해 ItemHistory 생성자를 따로 만드는 방식을 적용했습니다. 다른 분들의 의견을 듣고 amount 컬럼이 추가되는게 맞는 방향이라면 합치려고 하는데 많은 의견 부탁드림다..
    No response
@saewoo1 saewoo1 linked a pull request Oct 22, 2024 that will close this issue
9 tasks
@saewoo1 saewoo1 linked a pull request Oct 22, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant