Adding data validation

This commit is contained in:
IgorVolochay
2025-02-15 16:24:00 +03:00
parent e977bf2c98
commit e5b336e8e4
6 changed files with 58 additions and 22 deletions
+17
View File
@@ -0,0 +1,17 @@
from pydantic import BaseModel
class User(BaseModel):
user_id: int
username: str
first_name: str
last_name: str
photo_path: str
activity: int = 0
liked_post_ids: list[int] = None
disliked_post_ids: list[int] = None
comments_ids: list[int] = None
registration_date: str