feat(fase4): add FlowTemplate model and API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
31
services/api-gateway/app/schemas/flow_template.py
Normal file
31
services/api-gateway/app/schemas/flow_template.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List
|
||||
from uuid import UUID
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class FlowTemplateCreate(BaseModel):
|
||||
name: str
|
||||
description: Optional[str] = None
|
||||
category: str = "general"
|
||||
nodes: List[dict] = []
|
||||
edges: List[dict] = []
|
||||
variables: dict = {}
|
||||
is_public: bool = True
|
||||
|
||||
|
||||
class FlowTemplateResponse(BaseModel):
|
||||
id: UUID
|
||||
name: str
|
||||
description: Optional[str]
|
||||
category: str
|
||||
nodes: List[dict]
|
||||
edges: List[dict]
|
||||
variables: dict
|
||||
preview_image: Optional[str]
|
||||
is_public: bool
|
||||
created_by: UUID
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
Reference in New Issue
Block a user