diff options
| author | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-04-04 00:03:04 +0300 |
|---|---|---|
| committer | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-04-04 00:03:04 +0300 |
| commit | 63e87a3ed84ee9e9e4a4ff329a40d2b7ce5e5d0d (patch) | |
| tree | c24731c200df3b5854a5abc14f7a5481a33d838a /app/schemas/profile.py | |
| parent | d835d79eb24c730ec8148415113e846a01cefd19 (diff) | |
add profile
Diffstat (limited to 'app/schemas/profile.py')
| -rw-r--r-- | app/schemas/profile.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/schemas/profile.py b/app/schemas/profile.py new file mode 100644 index 0000000..ab54425 --- /dev/null +++ b/app/schemas/profile.py @@ -0,0 +1,21 @@ +from typing import Optional + +from pydantic import BaseModel + + +class ProfileRead(BaseModel): + id: int + user_id: int + avatar_file: Optional[str] = None + banner_file: Optional[str] = None + description: Optional[str] = None + + publications_count: int = 0 + collections_count: int = 0 + subscriptions_count: int = 0 + followers_count: int = 0 + following_count: int = 0 + + model_config = { + "from_attributes": True, + } |
