Open italopessoa opened 1 month ago
graph LR
subgraph Presentation Layer
A[API Controller]
end
subgraph Application Layer
B[Payment Status Use Case]
end
subgraph Domain Layer
C[Payment Repository]
D[Payment Entity]
end
subgraph Infrastructure Layer
E[Payment Gateway]
end
A --> B
B --> C
C --> D
C --> E
D -.-> C
E -.-> C
Explanation:
Flow:
Benefits of Clean Architecture:
This is a basic example, and you can adapt it to your specific needs by adding more layers or components. The key is to follow the principles of clean architecture to create a maintainable and scalable system.
@coderabbitai create mermaid sequenceDiagram graph
[!TIP] For best results, initiate chat on the files or code changes.
@italopessoa Here's the Mermaid sequence diagram based on the architecture and flow you described:
sequenceDiagram
participant AC as API Controller
participant PSC as Payment Status Use Case
participant PR as Payment Repository
participant PE as Payment Entity
participant PG as Payment Gateway
participant Client
AC->>PSC: Receives request with payment ID
PSC->>PR: Calls with payment ID
PR->>PE: Fetches payment details
PR->>PG: Requests payment status
PG-->>PR: Returns payment status
PR-->>PSC: Returns payment details and status
PSC-->>AC: Returns payment status
AC-->>Client: Returns payment status
This diagram illustrates the sequence of interactions between the different components in your system, following the principles of clean architecture. You can adjust or expand this diagram to include more details or additional components as needed.
Create an endpoint that returns Order Payment status based on Order Id
it doesn't need to call MercadoPago gateway