first commit

This commit is contained in:
2026-03-07 21:31:38 +03:00
commit a879ba7b50
68 changed files with 2487 additions and 0 deletions

27
app/users/schemas.py Normal file
View File

@@ -0,0 +1,27 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, EmailStr, Field
class UserBase(BaseModel):
username: str = Field(min_length=3, max_length=50)
email: EmailStr
class UserCreate(UserBase):
password: str = Field(min_length=8, max_length=128)
class UserRead(UserBase):
model_config = ConfigDict(from_attributes=True)
id: int
avatar_url: str | None = None
email_verified: bool
created_at: datetime
updated_at: datetime
class UserProfileUpdate(BaseModel):
username: str | None = Field(default=None, min_length=3, max_length=50)
avatar_url: str | None = Field(default=None, max_length=512)