feat: CRUD process schema
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user