kt-event-marketing/design/backend/class/participation-service-simple.puml
jhbkjh 3075a5d49f 물리아키텍처 설계 완료
 주요 기능
- Azure 기반 물리아키텍처 설계 (개발환경/운영환경)
- 7개 마이크로서비스 물리 구조 설계
- 네트워크 아키텍처 다이어그램 작성 (Mermaid)
- 환경별 비교 분석 및 마스터 인덱스 문서

📁 생성 파일
- design/backend/physical/physical-architecture.md (마스터)
- design/backend/physical/physical-architecture-dev.md (개발환경)
- design/backend/physical/physical-architecture-prod.md (운영환경)
- design/backend/physical/*.mmd (4개 Mermaid 다이어그램)

🎯 핵심 성과
- 비용 최적화: 개발환경 월 $143, 운영환경 월 $2,860
- 확장성: 개발환경 100명 → 운영환경 10,000명 (100배)
- 가용성: 개발환경 95% → 운영환경 99.9%
- 보안: 다층 보안 아키텍처 (L1~L4)

🛠️ 기술 스택
- Azure Kubernetes Service (AKS)
- Azure Database for PostgreSQL Flexible
- Azure Cache for Redis Premium
- Azure Service Bus Premium
- Application Gateway + WAF

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 15:13:01 +09:00

151 lines
3.8 KiB
Plaintext

@startuml
!theme mono
title Participation Service 클래스 다이어그램 (요약)
package "com.kt.event.participation" {
package "presentation.controller" {
class ParticipationController
class WinnerController
class DebugController
}
package "application" {
package "service" {
class ParticipationService
class WinnerDrawService
}
package "dto" {
class ParticipationRequest
class ParticipationResponse
class DrawWinnersRequest
class DrawWinnersResponse
}
}
package "domain" {
package "participant" {
class Participant
interface ParticipantRepository
}
package "draw" {
class DrawLog
interface DrawLogRepository
}
}
package "exception" {
class ParticipationException
class DuplicateParticipationException
class EventNotFoundException
class EventNotActiveException
class ParticipantNotFoundException
class AlreadyDrawnException
class InsufficientParticipantsException
class NoWinnersYetException
}
package "infrastructure" {
package "kafka" {
class KafkaProducerService
class ParticipantRegisteredEvent
}
package "config" {
class SecurityConfig
}
}
}
package "com.kt.event.common" {
abstract class BaseTimeEntity
class "ApiResponse<T>"
class "PageResponse<T>"
interface ErrorCode
class BusinessException
}
' Presentation → Application
ParticipationController --> ParticipationService
WinnerController --> WinnerDrawService
' Application → Domain
ParticipationService --> ParticipantRepository
ParticipationService --> KafkaProducerService
WinnerDrawService --> ParticipantRepository
WinnerDrawService --> DrawLogRepository
' Domain
Participant --|> BaseTimeEntity
DrawLog --|> BaseTimeEntity
ParticipantRepository --> Participant
DrawLogRepository --> DrawLog
' Exception
ParticipationException --|> BusinessException
DuplicateParticipationException --|> ParticipationException
EventNotFoundException --|> ParticipationException
EventNotActiveException --|> ParticipationException
ParticipantNotFoundException --|> ParticipationException
AlreadyDrawnException --|> ParticipationException
InsufficientParticipantsException --|> ParticipationException
NoWinnersYetException --|> ParticipationException
' Infrastructure
KafkaProducerService --> ParticipantRegisteredEvent
note right of ParticipationController
**API 매핑**
participate: POST /events/{eventId}/participate 이벤트 참여
getParticipants: GET /events/{eventId}/participants 참여자 목록 조회
getParticipant: GET /events/{eventId}/participants/{participantId} 참여자 상세 조회
end note
note right of WinnerController
**API 매핑**
drawWinners: POST /events/{eventId}/draw-winners 당첨자 추첨
getWinners: GET /events/{eventId}/winners 당첨자 목록 조회
end note
note right of DebugController
**API 매핑**
health: GET /health 헬스체크
end note
note bottom of ParticipationService
**핵심 비즈니스 로직**
- 이벤트 참여 처리
- 중복 참여 체크
- 참여자 ID 생성
- Kafka 이벤트 발행
- 참여자 목록/상세 조회
end note
note bottom of WinnerDrawService
**핵심 비즈니스 로직**
- 당첨자 추첨 실행
- 가중치 추첨 풀 생성
- 추첨 로그 저장
- 당첨자 목록 조회
end note
note bottom of Participant
**도메인 엔티티**
- 참여자 정보 관리
- 중복 방지 (eventId + phoneNumber)
- 매장 방문 보너스 (5배 응모권)
- 당첨자 상태 관리
end note
note bottom of DrawLog
**도메인 엔티티**
- 추첨 이력 관리
- 재추첨 방지
- 추첨 알고리즘 기록
end note
@enduml