aboutsummaryrefslogtreecommitdiff
path: root/app/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'app/schemas')
-rw-r--r--app/schemas/auth_schemas.py20
-rw-r--r--app/schemas/links_schemas.py5
2 files changed, 25 insertions, 0 deletions
diff --git a/app/schemas/auth_schemas.py b/app/schemas/auth_schemas.py
new file mode 100644
index 0000000..006a7c8
--- /dev/null
+++ b/app/schemas/auth_schemas.py
@@ -0,0 +1,20 @@
+from pydantic import BaseModel
+
+
+class Token(BaseModel):
+ access_token: str
+ refresh_token: str | None = None
+ token_type: str
+
+
+class TokenData(BaseModel):
+ username: str | None = None
+
+
+class User(BaseModel):
+ username: str
+ id: int
+
+
+class UserInDB(User):
+ hashed_password: str
diff --git a/app/schemas/links_schemas.py b/app/schemas/links_schemas.py
new file mode 100644
index 0000000..e2812fb
--- /dev/null
+++ b/app/schemas/links_schemas.py
@@ -0,0 +1,5 @@
+from pydantic import BaseModel
+
+
+class URLSchema(BaseModel):
+ url: str