32 lines
674 B
Python
32 lines
674 B
Python
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
|