aboutsummaryrefslogtreecommitdiff
path: root/api/schemas
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-11-10 16:36:16 -0600
committerParker <contact@pkrm.dev>2024-11-10 16:36:16 -0600
commit691aa744a0398f185b3ca98a36fbd83806c7786c (patch)
tree7840f31c30bb6eda903abd6bbf4dbfb2ac590966 /api/schemas
parent8941213c8d94f3ad84e07e467e78105dc7fed734 (diff)
TOO MUCH STUFF
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