from __future__ import annotations
from sqlalchemy import String, Text
from sqlalchemy.orm import Mapped, mapped_column
from src.database.base import BaseModel


class CmsPage(BaseModel):
    __tablename__ = "cms_pages"

    name: Mapped[str] = mapped_column(String(100), nullable=False)
    path: Mapped[str] = mapped_column(String(255), nullable=False, unique=True, index=True)
    headline: Mapped[str] = mapped_column(String(500), nullable=False)
    subheading: Mapped[str] = mapped_column(String(500), nullable=False, default="")
    subhead: Mapped[str] = mapped_column(String(500), nullable=False, default="")
    content: Mapped[str | None] = mapped_column(Text, nullable=True)
    status: Mapped[str] = mapped_column(String(20), nullable=False, default="Draft")
