tool_connection.py 820 B

12345678910111213141516
  1. from core_db import AuditMixin, Base, EntityMixin
  2. from core_shared import JSONValue
  3. from sqlalchemy import Integer, String
  4. from sqlalchemy import JSON
  5. from sqlalchemy.orm import Mapped, mapped_column
  6. class ToolConnection(EntityMixin, AuditMixin, Base):
  7. __tablename__ = "tool_connection"
  8. tool_id: Mapped[str] = mapped_column(String(36), index=True)
  9. input_schema_json: Mapped[dict[str, JSONValue] | None] = mapped_column(JSON, nullable=True)
  10. output_schema_json: Mapped[dict[str, JSONValue] | None] = mapped_column(JSON, nullable=True)
  11. invoke_config_json: Mapped[dict[str, JSONValue] | None] = mapped_column(JSON, nullable=True)
  12. timeout_ms: Mapped[int | None] = mapped_column(Integer, nullable=True)
  13. retry_policy_json: Mapped[dict[str, JSONValue] | None] = mapped_column(JSON, nullable=True)