결제 전환 목표 아키텍처 정의 #2
1 changed files with 42 additions and 0 deletions
42
docs/architecture/transaction-sequence.md
Normal file
42
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant User
|
||||
participant Controller
|
||||
participant Service
|
||||
participant Repository
|
||||
participant DB
|
||||
|
||||
User->>Controller: 결제 요청
|
||||
Controller->>Service: 결제 처리 요청
|
||||
Service->>Repository: 결제 정보 저장
|
||||
Repository->>DB: DB에 결제 정보 저장
|
||||
DB-->>Repository: 저장 성공
|
||||
Repository-->>Service: 저장 성공
|
||||
Service-->>Controller: 처리 성공
|
||||
Controller-->>User: 결제 완료
|
||||
|
||||
Note over User, Controller: 외부 실패 처리
|
||||
User->>Controller: 결제 요청
|
||||
Controller->>Service: 결제 처리 요청
|
||||
Service->>Repository: 결제 정보 저장
|
||||
Repository->>DB: DB에 결제 정보 저장
|
||||
DB-->>Repository: 저장 실패
|
||||
Repository-->>Service: 저장 실패
|
||||
Service-->>Controller: 처리 실패
|
||||
Controller-->>User: 결제 실패
|
||||
|
||||
Note over User, Controller: DB 실패 처리
|
||||
User->>Controller: 결제 요청
|
||||
Controller->>Service: 결제 처리 요청
|
||||
Service->>Repository: 결제 정보 저장
|
||||
Repository->>DB: DB에 결제 정보 저장
|
||||
DB-->>Repository: DB 연결 실패
|
||||
Repository-->>Service: DB 연결 실패
|
||||
Service-->>Controller: 처리 실패
|
||||
Controller-->>User: 결제 실패
|
||||
|
||||
Note over Service: Commit 경계
|
||||
Service->>Repository: Commit
|
||||
Note over Service: Rollback 경계
|
||||
Service->>Repository: Rollback
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue