mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 21:56:24 +00:00
- 총 21개 PlantUML 파일 생성 (Meeting 10개, AI 6개, STT 2개, Notification 3개) - 서브 에이전트를 활용한 병렬 설계로 효율성 극대화 - 모든 시나리오는 유저스토리 및 외부 시퀀스와 1:1 매칭 - Controller → Service → Repository 계층 구조 명확히 표현 - Redis Cache, Azure Event Hubs 등 인프라 컴포넌트 표시 - 동기(→)/비동기(-->) 구분 명확 - 외부 참여자 <<E>> 표시 적용 - PlantUML 문법 검사 및 오류 수정 완료 (13개 파일 수정) - par/and 블록 문법 오류 수정 - return 형식 적용으로 참여자 없는 화살표 오류 해결 설계 특징: - 캐시 전략: Cache-Aside 패턴, TTL 관리, 즉시 무효화 - 비동기 처리: Azure Event Hubs 기반 이벤트 구독 - 실시간 협업: WebSocket 기반 동기화, 변경 델타 전송 - 데이터 일관성: 버전 관리, 양방향 연결, 트랜잭션 처리 추가 파일: - claude/sequence-inner-design.md: 내부시퀀스설계 가이드 - tools/check-plantuml.ps1: PlantUML 문법 검사 스크립트 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
192 lines
5.9 KiB
Plaintext
192 lines
5.9 KiB
Plaintext
@startuml meeting-회의록수정
|
|
!theme mono
|
|
|
|
title Meeting Service - 회의록수정 내부 시퀀스
|
|
|
|
participant "MinutesController" as Controller
|
|
participant "MinutesService" as Service
|
|
participant "MinutesRepository" as MinutesRepo
|
|
participant "SectionRepository" as SectionRepo
|
|
participant "VersionService" as VersionService
|
|
participant "CollaborationService" as CollabService
|
|
database "Meeting DB<<E>>" as DB
|
|
database "Redis Cache<<E>>" as Cache
|
|
participant "WebSocket<<E>>" as WebSocket
|
|
|
|
[-> Controller: PATCH /minutes/{minutesId}
|
|
activate Controller
|
|
|
|
note over Controller
|
|
경로 변수: minutesId
|
|
요청 데이터:
|
|
{
|
|
"title": "수정된 제목",
|
|
"sections": [
|
|
{
|
|
"sectionId": "uuid",
|
|
"content": "수정된 내용",
|
|
"aiSummary": "수정된 요약"
|
|
}
|
|
]
|
|
}
|
|
사용자 정보: userId, userName, email
|
|
end note
|
|
|
|
Controller -> Controller: 입력 검증
|
|
|
|
Controller -> Service: updateMinutes(minutesId, request, userId)
|
|
activate Service
|
|
|
|
' 회의록 정보 조회
|
|
Service -> MinutesRepo: findById(minutesId)
|
|
activate MinutesRepo
|
|
MinutesRepo -> DB: SELECT * FROM minutes WHERE id = ?
|
|
activate DB
|
|
DB --> MinutesRepo: 회의록 정보
|
|
deactivate DB
|
|
MinutesRepo --> Service: Minutes
|
|
deactivate MinutesRepo
|
|
|
|
note over Service
|
|
비즈니스 규칙 검증:
|
|
- 회의록 존재 확인
|
|
- 수정 권한 확인 (생성자만)
|
|
- 잠긴 섹션 수정 시도 검증
|
|
- 확정된 회의록은 DRAFT로 상태 변경
|
|
end note
|
|
|
|
Service -> Service: 회의록 존재 확인
|
|
|
|
Service -> Service: 수정 권한 검증\n(생성자만 가능)
|
|
|
|
alt 권한 없음
|
|
Service --> Controller: 403 Forbidden\n수정 권한 없음
|
|
return 403 Forbidden
|
|
else 권한 있음
|
|
' 잠긴 섹션 확인
|
|
Service -> SectionRepo: findLockedSections(minutesId)
|
|
activate SectionRepo
|
|
SectionRepo -> DB: SELECT * FROM minutes_sections\nWHERE minutesId = ?\nAND isLocked = true
|
|
activate DB
|
|
DB --> SectionRepo: 잠긴 섹션 목록
|
|
deactivate DB
|
|
SectionRepo --> Service: List<Section>
|
|
deactivate SectionRepo
|
|
|
|
Service -> Service: 잠긴 섹션 수정 여부 검증
|
|
|
|
alt 잠긴 섹션 수정 시도
|
|
Service --> Controller: 400 Bad Request\n잠긴 섹션은 수정 불가
|
|
return 400 Bad Request
|
|
else 수정 가능
|
|
' 수정 이력 저장 (버전 관리)
|
|
Service -> VersionService: createModificationHistory(minutesId, userId, changes)
|
|
activate VersionService
|
|
VersionService -> DB: INSERT INTO modification_history\n(minutesId, modifiedBy, modifiedAt,\nchangeType, oldValue, newValue)
|
|
activate DB
|
|
DB --> VersionService: 이력 저장 완료
|
|
deactivate DB
|
|
VersionService --> Service: 저장 성공
|
|
deactivate VersionService
|
|
|
|
' 회의록 제목 수정
|
|
alt 제목 변경됨
|
|
Service -> MinutesRepo: updateTitle(minutesId, newTitle)
|
|
activate MinutesRepo
|
|
MinutesRepo -> DB: UPDATE minutes\nSET title = ?,\n updatedAt = NOW(),\n updatedBy = ?\nWHERE id = ?
|
|
activate DB
|
|
DB --> MinutesRepo: 업데이트 완료
|
|
deactivate DB
|
|
MinutesRepo --> Service: 업데이트 성공
|
|
deactivate MinutesRepo
|
|
end
|
|
|
|
' 섹션별 내용 수정
|
|
loop 각 섹션마다
|
|
Service -> SectionRepo: updateSection(sectionId, content, aiSummary)
|
|
activate SectionRepo
|
|
SectionRepo -> DB: UPDATE minutes_sections\nSET content = ?,\n aiSummary = ?,\n updatedAt = NOW(),\n updatedBy = ?\nWHERE id = ?
|
|
activate DB
|
|
DB --> SectionRepo: 업데이트 완료
|
|
deactivate DB
|
|
SectionRepo --> Service: 업데이트 성공
|
|
deactivate SectionRepo
|
|
end
|
|
|
|
' 회의록 상태 변경 (확정 → 작성중)
|
|
alt 확정된 회의록 수정
|
|
Service -> MinutesRepo: updateStatus(minutesId, "DRAFT")
|
|
activate MinutesRepo
|
|
MinutesRepo -> DB: UPDATE minutes\nSET status = 'DRAFT'\nWHERE id = ?\nAND status = 'FINALIZED'
|
|
activate DB
|
|
DB --> MinutesRepo: 업데이트 완료
|
|
deactivate DB
|
|
MinutesRepo --> Service: 상태 변경 완료
|
|
deactivate MinutesRepo
|
|
end
|
|
|
|
' 캐시 무효화
|
|
Service -> Cache: DELETE minutes:detail:{minutesId}
|
|
activate Cache
|
|
Cache --> Service: 삭제 완료
|
|
deactivate Cache
|
|
|
|
Service -> Cache: DELETE minutes:info:{minutesId}
|
|
activate Cache
|
|
Cache --> Service: 삭제 완료
|
|
deactivate Cache
|
|
|
|
note over Service
|
|
실시간 협업:
|
|
- WebSocket을 통해 참석자에게 수정 사항 전송
|
|
- 수정 델타만 전송 (전체 내용 아님)
|
|
- 수정자 정보 포함
|
|
end note
|
|
|
|
' 실시간 동기화
|
|
Service -> CollabService: broadcastUpdate(minutesId, changes, userId)
|
|
activate CollabService
|
|
|
|
note over CollabService
|
|
WebSocket 메시지 형식:
|
|
{
|
|
"type": "MINUTES_UPDATED",
|
|
"minutesId": "uuid",
|
|
"changes": [...],
|
|
"modifiedBy": {
|
|
"userId": "...",
|
|
"userName": "..."
|
|
},
|
|
"timestamp": "..."
|
|
}
|
|
end note
|
|
|
|
CollabService -> WebSocket: broadcast to room:{minutesId}
|
|
activate WebSocket
|
|
WebSocket --> CollabService: 전송 완료
|
|
deactivate WebSocket
|
|
CollabService --> Service: 동기화 완료
|
|
deactivate CollabService
|
|
|
|
Service --> Controller: MinutesUpdateResponse
|
|
deactivate Service
|
|
|
|
note over Controller
|
|
응답 데이터:
|
|
{
|
|
"minutesId": "uuid",
|
|
"status": "DRAFT",
|
|
"updatedAt": "2025-01-23T16:00:00",
|
|
"updatedBy": "userId",
|
|
"version": "v1.1"
|
|
}
|
|
end note
|
|
|
|
return 200 OK\nMinutesUpdateResponse
|
|
end
|
|
end
|
|
|
|
deactivate Controller
|
|
|
|
@enduml
|