Merge pull request #4 from IgorVolochay/frontend

This commit is contained in:
IgorVolochay
2026-09-01 17:26:42 +03:00
parent 73d16e9111
commit 61a2eb8076
52 changed files with 3785 additions and 752 deletions
+7 -5
View File
@@ -2,13 +2,15 @@ import typing
from pydantic import BaseModel, NonNegativeInt
from typing import Optional
class BaseResponse(BaseModel):
result: typing.Any
error: bool = False
class AddUserBody(BaseModel):
user_id: NonNegativeInt
user_id: Optional[NonNegativeInt] = None
username: str
first_name: str
@@ -19,20 +21,20 @@ class AddCardBody(BaseModel):
choice_A: str
choice_B: str
author_id: NonNegativeInt
author_id: Optional[NonNegativeInt] = None
class SelectChoice(BaseModel):
user_id: NonNegativeInt
user_id: Optional[NonNegativeInt] = None
card_id: NonNegativeInt
choice: typing.Literal["A", "B"]
class ReactionCard(BaseModel):
user_id: NonNegativeInt
user_id: Optional[NonNegativeInt] = None
card_id: NonNegativeInt
class AddCommentBody(BaseModel):
author_id: NonNegativeInt
author_id: Optional[NonNegativeInt] = None
card_id: NonNegativeInt
comment_text: str
+1 -1
View File
@@ -43,6 +43,6 @@ class Comment(BaseModel):
author_id: int
card_id: int
commet_text: str
comment_text: str
creation_date: str