-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
🧩 Fluxo de Criação de Serviço (API Send Service)
O diagrama abaixo representa o fluxo de requisição para o endpoint /api/send/service,
desde o envio dos dados pelo cliente até a inserção do documento no MongoDB Atlas.
sequenceDiagram
participant Cliente
participant API as /api/send/service
participant Zod as zodMiddleware
participant Controller as UserServiceController
participant Service as UserService
participant Repo as UseServiceRepository
participant Prisma as PrismaClient
participant Mongo as MongoDB Atlas
Cliente->>API: POST (dados do serviço)
API->>Zod: Valida req.body
Zod->>Controller: startSendEmailService()
Controller->>Service: sendServiceEmail()
Service->>Repo: sendEmailService() [1º]
Service->>Repo: createService() [2º]
Repo->>Prisma: prisma.service.create()
Prisma->>Mongo: INSERT documento
Mongo-->>Prisma: Documento criado
Prisma-->>Repo: void
Repo-->>Service: void
Service-->>Controller: void
Controller-->>Zod: void
Zod-->>API: 200 OK
API-->>Cliente: 200 OK
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels