summaryrefslogtreecommitdiff
path: root/app/schemas/profile.py
diff options
context:
space:
mode:
authorl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-04-04 00:03:04 +0300
committerl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-04-04 00:03:04 +0300
commit63e87a3ed84ee9e9e4a4ff329a40d2b7ce5e5d0d (patch)
treec24731c200df3b5854a5abc14f7a5481a33d838a /app/schemas/profile.py
parentd835d79eb24c730ec8148415113e846a01cefd19 (diff)
add profile
Diffstat (limited to 'app/schemas/profile.py')
-rw-r--r--app/schemas/profile.py21
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,
+ }