| 123456789101112131415161718192021 |
- from sqlalchemy import Integer, String, Text
- from sqlalchemy.dialects.sqlite import JSON
- from sqlalchemy.orm import Mapped, mapped_column
- from core_db import AuditMixin, Base, TenantMixin, VersionMixin
- from core_shared import JSONValue
- class NodeArtifact(TenantMixin, AuditMixin, VersionMixin, Base):
- __tablename__ = "node_artifact"
- run_id: Mapped[str] = mapped_column(String(36), index=True)
- node_run_id: Mapped[str] = mapped_column(String(36), index=True)
- node_id: Mapped[str] = mapped_column(String(128), index=True)
- artifact_type: Mapped[str] = mapped_column(String(64), index=True)
- name: Mapped[str] = mapped_column(String(128))
- mime_type: Mapped[str | None] = mapped_column(String(128), nullable=True)
- content_text: Mapped[str | None] = mapped_column(Text, nullable=True)
- content_json: Mapped[dict[str, JSONValue] | None] = mapped_column(JSON, nullable=True)
- storage_uri: Mapped[str | None] = mapped_column(String(512), nullable=True)
- size_bytes: Mapped[int | None] = mapped_column(Integer, nullable=True)
|