from datetime import datetime from typing import Optional from sqlalchemy import Boolean, DateTime, String, Text from sqlalchemy.orm import Mapped, mapped_column from .base import Base class Plugin(Base): """Registry of known action plugins with enable/disable control.""" __tablename__ = "plugins" name: Mapped[str] = mapped_column(String(100), primary_key=True) display_name: Mapped[str] = mapped_column(String(255), nullable=False) description: Mapped[Optional[str]] = mapped_column(Text(), nullable=True) enabled: Mapped[bool] = mapped_column(Boolean(), nullable=False, default=True) registered_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False)