Files
site/apps/api/app/modules/content/schemas.py
T
vlad 86cc3fa541 Update admin theme/layout and refresh README details.
Align the project baseline with the latest admin interface styling and layout structure while documenting setup and usage updates in README.
2026-07-14 17:12:28 +03:00

25 lines
574 B
Python

from typing import Literal
from pydantic import BaseModel, Field
class ContentPageIn(BaseModel):
slug: str = Field(min_length=2, max_length=120)
title: str = Field(min_length=2, max_length=200)
body: str
status: Literal["draft", "published"] = "draft"
class ContentPagePatchIn(BaseModel):
title: str | None = Field(default=None, min_length=2, max_length=200)
body: str | None = None
status: Literal["draft", "published"] | None = None
class ContentPageOut(BaseModel):
id: str
slug: str
title: str
body: str
status: str