- Updated docker-compose.yml to allow disabling embedded Ollama via environment variable. - Refactored Dockerfile and Dockerfile.dev for improved dependency management and installation process. - Enhanced FastAPI migration scripts to handle orphaned Alembic revisions and added new database migration logic. - Improved error handling in background tasks and Codex authentication endpoints. - Added support for font file uploads with better validation and extraction of font names. - Introduced new image search functionality with support for Pexels and Pixabay APIs.
25 lines
838 B
Python
25 lines
838 B
Python
from datetime import datetime
|
|
import uuid
|
|
|
|
from sqlalchemy import JSON, Column, DateTime
|
|
from sqlmodel import Field, SQLModel
|
|
|
|
from utils.datetime_utils import get_current_utc_datetime
|
|
|
|
|
|
class TemplateCreateInfoModel(SQLModel, table=True):
|
|
__tablename__ = "template_create_infos"
|
|
|
|
id: uuid.UUID = Field(default_factory=uuid.uuid4, primary_key=True)
|
|
fonts: dict[str, str] | None = Field(
|
|
default=None,
|
|
sa_column=Column(JSON, nullable=True),
|
|
)
|
|
pptx_url: str | None = Field(default=None)
|
|
slide_htmls: list[str] = Field(sa_column=Column(JSON, nullable=False))
|
|
slide_image_urls: list[str] = Field(sa_column=Column(JSON, nullable=False))
|
|
created_at: datetime = Field(
|
|
sa_column=Column(
|
|
DateTime(timezone=True), nullable=False, default=get_current_utc_datetime
|
|
)
|
|
)
|