aboutsummaryrefslogtreecommitdiff
path: root/api/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'api/schemas')
-rw-r--r--api/schemas/auth_schemas.py15
-rw-r--r--api/schemas/links_schemas.py5
-rw-r--r--api/schemas/user_schemas.py11
3 files changed, 31 insertions, 0 deletions
diff --git a/api/schemas/auth_schemas.py b/api/schemas/auth_schemas.py
new file mode 100644
index 0000000..48745ee
--- /dev/null
+++ b/api/schemas/auth_schemas.py
@@ -0,0 +1,15 @@
+from pydantic import BaseModel
+
+
+class Token(BaseModel):
+ access_token: str
+ token_type: str
+
+
+class User(BaseModel):
+ username: str
+ id: int
+
+
+class UserInDB(User):
+ hashed_password: str
diff --git a/api/schemas/links_schemas.py b/api/schemas/links_schemas.py
new file mode 100644
index 0000000..e2812fb
--- /dev/null
+++ b/api/schemas/links_schemas.py
@@ -0,0 +1,5 @@
+from pydantic import BaseModel
+
+
+class URLSchema(BaseModel):
+ url: str
diff --git a/api/schemas/user_schemas.py b/api/schemas/user_schemas.py
new file mode 100644
index 0000000..949b9a5
--- /dev/null
+++ b/api/schemas/user_schemas.py
@@ -0,0 +1,11 @@
+from pydantic import BaseModel
+
+
+class LoginDataSchema(BaseModel):
+ username: str
+ password: str
+
+
+class UpdatePasswordSchema(BaseModel):
+ current_password: str
+ new_password: str