feat: CRUD process schema

This commit is contained in:
TheNoxium
2025-10-13 11:50:57 +05:00
parent 59d2d57ee1
commit 3dfae3235d
21 changed files with 1892 additions and 880 deletions

View File

@@ -1,10 +1,11 @@
from datetime import datetime
from typing import Any, Dict
from typing import Any, Dict, Optional, List
from orm.tables.process import ProcessStatus
from orm.tables.process import ProcessStatus, NodeType
from pydantic import Field
from api.schemas.base import Base
from api.schemas.process.ps_node import Ps_NodeFrontResponse
class ProcessSchema(Base):
@@ -16,3 +17,24 @@ class ProcessSchema(Base):
created_at: datetime
settings: Dict[str, Any]
status: ProcessStatus
class ProcessSchemaSettingsNodeLink(Base):
id: int
link_name: str
parent_port_number: int
from_id: int
to_id: int
class ProcessSchemaSettingsNode(Base):
id: int
node_type: NodeType
from_node: Optional[Dict[str, Any]] = None
data: Dict[str, Any] # Переименовано с 'from' на 'from_node'
links: Optional[List[Dict[str, Any]]] = None
class ProcessSchemaResponse(Base):
process_schema: ProcessSchema
node_listen: Ps_NodeFrontResponse