added: base for backend on fastapi

This commit is contained in:
Arduinum
2025-12-28 15:25:51 +03:00
committed by Arduinum628
parent 8a0e2e0121
commit 91ab38efc7
13 changed files with 111 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ from kawai_focus_v2.core.messages.errors import ErrorMessage
class TimerModel(BaseModel):
"""Модель схемы данных таймера"""
id: int | None = None
id: int
title: str
pomodoro_time: int
break_time: int
@@ -13,6 +13,26 @@ class TimerModel(BaseModel):
count_pomodoro: int
class NewTimerModel(BaseModel):
"""Модель схемы нового таймера"""
title: str
pomodoro_time: int
break_time: int
break_long_time: int
count_pomodoro: int
class UpdateTimerModel(BaseModel):
"""Модель схемы обновления данных таймера"""
title: str | None = None
pomodoro_time: int | None = None
break_time: int | None = None
break_long_time: int | None = None
count_pomodoro: int | None = None
class TimerListModel(BaseModel):
"""Модель схемы данных таймера для списка"""