| 123456789101112131415161718192021 |
- from datetime import datetime
- from sqlalchemy import DateTime, String
- 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 SkillInstallation(TenantMixin, AuditMixin, VersionMixin, Base):
- __tablename__ = "skill_installation"
- skill_id: Mapped[str] = mapped_column(String(36), index=True)
- skill_version_id: Mapped[str] = mapped_column(String(36), index=True)
- install_scope: Mapped[str] = mapped_column(String(32), default="tenant", index=True)
- scope_id: Mapped[str] = mapped_column(String(64), index=True)
- status: Mapped[str] = mapped_column(String(32), default="installed", index=True)
- config_json: Mapped[dict[str, JSONValue]] = mapped_column(JSON, default=dict)
- installed_by: Mapped[str | None] = mapped_column(String(36), nullable=True)
- installed_time: Mapped[datetime | None] = mapped_column(DateTime, nullable=True)
|