tomatophobia / allowance-chart

다수의 증권 계좌로 구성된 포트폴리오 관리 서비스
1 stars 0 forks source link

고객은 주식을 매수할 수 있다 (도메인 계층) #15

Closed tomatophobia closed 2 years ago

tomatophobia commented 2 years ago

주식을 매매할 때 매매가 일어난 시각 표시할 때 Instant, LocalDateTime 고민하다 차이점 정리한 글

tomatophobia commented 2 years ago

AccountEvent에 Instant 필드 추가 되어서 Picker[Instant] 없어서 컴파일 안되던 부분 해결 방법

https://gist.github.com/vpavkin/6c4bef79cc54688befdaeb82af427636

implicit val instantPickler: boopickle.Pickler[Instant] = boopickle.DefaultBasic.longPickler.xmap(Instant.ofEpochMilli)(_.toEpochMilli)
tomatophobia commented 2 years ago

import 는 항상 필요한 곳보다 상단에 있어야 한다. implicit value여서 아래쪽에 놓을까 하고 아래로 내렸다가 컴파일 안되어서 섬뜩했음

tomatophobia commented 2 years ago

테스트 하면서 /를 *로 잘못 쓰는 엄청 멍청한 문제 발견... 테스트 열심히 하자

tomatophobia commented 2 years ago

새로운 이슈