Files
DIKER0K c8d8c65251
All checks were successful
Build and Deploy / deploy (push) Successful in 41s
add: verify code in telegram
2025-07-21 08:07:21 +05:00

38 lines
983 B
Python

from pydantic import BaseModel
from datetime import datetime
from typing import Optional
class UserCreate(BaseModel):
username: str
password: str
class UserLogin(BaseModel):
username: str
password: str
class UserInDB(BaseModel):
username: str
hashed_password: str
uuid: str
skin_url: Optional[str] = None
skin_model: Optional[str] = "classic"
cloak_url: Optional[str] = None
coins: int = 0 # Новое поле для монет
total_time_played: int = 0 # Общее время игры в секундах
is_active: bool = True
created_at: datetime = datetime.utcnow()
code: Optional[str] = None
telegram_id: Optional[str] = None
is_verified: bool = False
code_expires_at: Optional[datetime] = None
class Session(BaseModel):
access_token: str
client_token: str
user_uuid: str
expires_at: datetime
class VerifyCode(BaseModel):
username: str
code: str
telegram_chat_id: int