개선(domain): #80 Draft DDD 마이그레이션 — MarketEngine BC#87
Merged
Conversation
d8ab547 to
db573c0
Compare
Role VO 도입 (CAPTAIN/PLAYER), captains: Character[]로 통일. Auction/SandboxBoard 두 aggregate 일관 적용. Category VO 제거.
Draft AggregateRoot, Pick Entity, draft-factory/service/controller, draft-api-repository 추가. Auction/SandboxBoard 4계층 패턴 동일 적용.
db573c0 to
5c78ce9
Compare
shared/character.ts에 CaptainId = CharacterId 별칭 도입. presentation/character-dto.ts로 세 controller의 DTO 통합.
Draft에 rosters 필드 추가 (Auction/SandboxBoard와 동일). DraftError에 DRAFT_ALREADY_COMPLETED 추가, SandboxBoardError dead code 제거. buildPickOrder export 제거.
Captain Entity 부재와 정합 맞춤. captainId 변수명은 의미 유지.
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.
변경 사항
Draft DDD 마이그레이션 (4계층)
domain/draft/— Draft AggregateRoot, Pick Entity, errors, repository-interfacedomain/services/draft-factory.ts— Template → Draft (buildPickOrder 포함)application/draft-service.ts— create / pick / autoPick (pickId 외부 주입)infrastructure/draft-api-repository.ts— apiGet/apiPostpresentation/draft-controller.ts— DTO 변환Captain Entity 제거 + 모델 통합 (sandbox/auction 포함)
CaptainEntity 삭제 →Character로 통합. Character가 "경매/드래프트에 등장하는 주체+객체" 모두 표현RoleVO ('CAPTAIN' | 'PLAYER') — Character.role로 식별CategoryVO 제거 — 도메인 로직에서 미사용. plan.md 등급(S+~D)은 향후 필요 시 재도입captains: Character[],Pick.captainId: CharacterId,Bid.captainId: CharacterId로 통일미완료 (TODO)
domain/rule-engine/draft.ts제거 (UI 전환 완료 후)테스트
bun test전체 — 183 pass / 0 failCloses #80