from typing import Any from sqlalchemy import String from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.orm import Mapped, mapped_column from app.models.base import Base, TimestampMixin, UUIDPrimaryKeyMixin class Template(UUIDPrimaryKeyMixin, TimestampMixin, Base): __tablename__ = "templates" # Every row here belongs to the customer and is editable. Blueprints # shipped with the product stay on disk in templates/ until an admin # adds one (app/template_catalog.py) — there is no read-only template. name: Mapped[str] = mapped_column(String(200)) version: Mapped[str] = mapped_column(String(20)) config: Mapped[dict[str, Any]] = mapped_column(JSONB)