@startuml event-상세조회 !theme mono title Event Service - 이벤트 상세 조회 (UFR-EVENT-060) participant "EventController" as Controller <> participant "EventService" as Service <> participant "EventRepository" as Repo <> participant "Redis Cache" as Cache <> database "Event DB" as DB <> note over Controller: GET /api/events/{id} Controller -> Service: getEventDetail(eventId, userId) activate Service Service -> Cache: get("event:" + eventId) activate Cache alt 캐시 히트 Cache --> Service: Event data Service -> Service: validateAccess(userId, event) note right: 사용자 권한 검증 Service --> Controller: EventDetailResponse else 캐시 미스 Cache --> Service: null deactivate Cache Service -> Repo: findById(eventId) activate Repo Repo -> DB: SELECT e.*, p.*, d.*\nFROM events e\nLEFT JOIN event_prizes p ON e.id = p.event_id\nLEFT JOIN distribution_logs d ON e.id = d.event_id\nWHERE e.id = ? activate DB note right: JOIN으로\n경품 정보 및\n배포 이력 조회 DB --> Repo: Event with prizes and distributions deactivate DB Repo --> Service: Event entity (with relations) deactivate Repo Service -> Service: validateAccess(userId, event) Service -> Cache: set("event:" + eventId, event, TTL=5분) activate Cache Cache --> Service: OK deactivate Cache end Service --> Controller: EventDetailResponse\n{eventId, title, objective,\nprizes, period, status,\nchannels, distributionStatus,\ncreatedAt, publishedAt} deactivate Service Controller --> Client: 200 OK\n{event: {...},\nprizes: [...],\ndistributionStatus: {...}} note over Controller, DB: 상세 정보 포함:\n- 기본 정보 (제목, 목적, 기간, 상태)\n- 경품 정보\n- 참여 방법\n- 배포 채널 현황\n- 실시간 통계 (Analytics Service)\n\nAnalytics 통계는\n별도 API 호출 @enduml