- 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.
27 lines
792 B
Python
27 lines
792 B
Python
from datetime import datetime
|
|
from typing import Optional
|
|
import uuid
|
|
|
|
from sqlalchemy import Column, DateTime
|
|
from sqlmodel import Field, SQLModel
|
|
|
|
from utils.datetime_utils import get_current_utc_datetime
|
|
|
|
|
|
class TemplateModel(SQLModel, table=True):
|
|
__tablename__ = "templates"
|
|
|
|
id: uuid.UUID = Field(
|
|
default_factory=uuid.uuid4,
|
|
primary_key=True,
|
|
description="UUID for the template (matches presentation_id)",
|
|
)
|
|
name: str = Field(description="Human friendly template name")
|
|
description: Optional[str] = Field(
|
|
default=None, description="Optional template description"
|
|
)
|
|
created_at: datetime = Field(
|
|
sa_column=Column(
|
|
DateTime(timezone=True), nullable=False, default=get_current_utc_datetime
|
|
),
|
|
)
|