| 1234567891011121314151617 |
- from sqlalchemy import 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 ToolCredential(TenantMixin, AuditMixin, VersionMixin, Base):
- __tablename__ = "tool_credential"
- name: Mapped[str] = mapped_column(String(128))
- credential_type: Mapped[str] = mapped_column(String(64), default="generic")
- encrypted_payload_text: Mapped[str] = mapped_column(Text)
- secret_fingerprint: Mapped[str] = mapped_column(String(64), index=True)
- encryption_algorithm: Mapped[str] = mapped_column(String(64))
- metadata_json: Mapped[dict[str, JSONValue]] = mapped_column(JSON, default=dict)
|