aboutsummaryrefslogtreecommitdiff
path: root/api/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'api/schemas')
-rw-r--r--api/schemas/auth_schemas.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/api/schemas/auth_schemas.py b/api/schemas/auth_schemas.py
new file mode 100644
index 0000000..d5b9a88
--- /dev/null
+++ b/api/schemas/auth_schemas.py
@@ -0,0 +1,19 @@
+from pydantic import BaseModel
+
+
+class Token(BaseModel):
+ access_token: str
+ token_type: str
+
+
+class TokenData(BaseModel):
+ username: str | None = None
+
+
+class User(BaseModel):
+ username: str
+ id: int
+
+
+class UserInDB(User):
+ hashed_password: str