Files
connect/api/api/schemas/process/process_schema.py
2025-09-12 22:35:46 +05:00

41 lines
978 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from datetime import datetime
from typing import Any, Dict, Optional
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):
id: int
title: str = Field(..., max_length=100)
description: str
owner_id: int
creator_id: int
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[ProcessSchemaSettingsNodeLink] = None
class ProcessSchemaResponse(Base):
process_schema: ProcessSchema
node_start: Ps_NodeFrontResponse