Combines shared, blog, market, cart, events, federation, and account into a single repository. Eliminates submodule sync, sibling model copying at build time, and per-app CI orchestration. Changes: - Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs - Remove stale sibling model copies from each app - Update all 6 Dockerfiles for monorepo build context (root = .) - Add build directives to docker-compose.yml - Add single .gitea/workflows/ci.yml with change detection - Add .dockerignore for monorepo build context - Create __init__.py for federation and account (cross-app imports)
40 lines
1.4 KiB
Python
40 lines
1.4 KiB
Python
from __future__ import annotations
|
|
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from sqlalchemy import Integer, String, Text, DateTime, func, JSON, text
|
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
|
|
from shared.db.base import Base
|
|
|
|
|
|
class PageConfig(Base):
|
|
__tablename__ = "page_configs"
|
|
|
|
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
|
|
|
container_type: Mapped[str] = mapped_column(
|
|
String(32), nullable=False, server_default=text("'page'"),
|
|
)
|
|
container_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
|
|
|
features: Mapped[dict] = mapped_column(
|
|
JSON, nullable=False, server_default="{}"
|
|
)
|
|
|
|
# Per-page SumUp credentials (NULL until configured)
|
|
sumup_merchant_code: Mapped[Optional[str]] = mapped_column(String(64), nullable=True)
|
|
sumup_api_key: Mapped[Optional[str]] = mapped_column(Text(), nullable=True)
|
|
sumup_checkout_prefix: Mapped[Optional[str]] = mapped_column(String(64), nullable=True)
|
|
|
|
created_at: Mapped[datetime] = mapped_column(
|
|
DateTime(timezone=True), nullable=False, server_default=func.now()
|
|
)
|
|
updated_at: Mapped[datetime] = mapped_column(
|
|
DateTime(timezone=True), nullable=False, server_default=func.now()
|
|
)
|
|
deleted_at: Mapped[Optional[datetime]] = mapped_column(
|
|
DateTime(timezone=True), nullable=True
|
|
)
|