doc-forge-reds/backend/app/models/template.py

15 lines
531 B
Python

import uuid
from sqlalchemy import String, Text
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
from app.models.base import TimestampMixin, UUIDMixin
class Template(Base, UUIDMixin, TimestampMixin):
__tablename__ = "templates"
name: Mapped[str] = mapped_column(String(200), nullable=False)
file_path: Mapped[str] = mapped_column(String(500), nullable=False)
html_content: Mapped[str | None] = mapped_column(Text, nullable=True)