Skip to content

[Feat]: 도메인 이벤트 로그 기록 (EVT-001) #18

@ohhalim

Description

@ohhalim

Branch Keyword

domain-events

구현할 기능

개요

주문 생성, 체결, 정산, 취소 등 핵심 도메인 이벤트를 domain_events 테이블에 기록한다.
향후 Kafka, outbox pattern, replay, recovery 확장을 위한 경계를 남긴다.

기록 대상 이벤트

이벤트 타입 발생 시점 페이로드
ORDER_CREATED 주문 생성 orderId, userId, market, side, price, quantity
ORDER_FILLED 주문 전량 체결 orderId, tradeId
ORDER_PARTIALLY_FILLED 주문 부분 체결 orderId, tradeId, filledQty, remainingQty
ORDER_CANCELED 주문 취소 orderId, releasedAsset, releasedAmount
TRADE_SETTLED 체결 정산 완료 tradeId, buyOrderId, sellOrderId, price, quantity, quoteAmount

구현 범위

  • DomainEvent 엔티티 (이미 테이블은 V3 마이그레이션에 존재)
  • DomainEventRepository
  • OrderService에서 각 이벤트 시점에 저장
  • 페이로드는 JSON 문자열로 저장

API 명세

No response

테스트 계획

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions