init commit

This commit is contained in:
2025-08-17 11:44:54 +09:00
commit 5592014530
59 changed files with 3175 additions and 0 deletions

View File

0
app/api/schemas/base.py Normal file
View File

View File

0
app/api/schemas/post.py Normal file
View File

View File

@@ -0,0 +1,17 @@
from __future__ import annotations
from typing import Optional, Literal
from pydantic import BaseModel, Field, ConfigDict
class TemplateIn(BaseModel):
name: str = Field(min_length=1, max_length=64)
title: Optional[str] = None
type: Literal["text","photo","video","animation"] = "text"
content: str
keyboard_tpl: Optional[list[dict]] = None
parse_mode: Optional[str] = "HTML"
visibility: Literal["private","org","public"] = "private"
class TemplateOut(TemplateIn):
id: int
is_archived: bool
model_config = ConfigDict(from_attributes=True)