/
drresist
/
geekmagic-api
Обзор
Документация
Войти
/
drresist
/
geekmagic-api
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
app/models.py
13 строк
388 B
MFesenko
feat: rewrite to modules
14 май 2026, 21:27
14 май 2026, 21:27
45efc4f
Код
Авторство
О чём код?
from pydantic import BaseModel, Field class NotifyRequest(BaseModel): title: str = Field(..., max_length=40) text: str = Field(..., max_length=300) level: str = Field("info", pattern="^(info|warning|error)$") duration_seconds: int = Field(15, ge=3, le=300) cleanup_after_show: bool = True class ThemeRequest(BaseModel): theme_id: int = Field(..., ge=0, le=99)