1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
Files
AdministrationItDepartmens/backend/app/schemas/auth.py
MoonTestUse1 bdf4ae9d70 Fix database
2025-01-07 05:26:33 +06:00

18 lines
452 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Authentication schemas"""
from pydantic import BaseModel
from typing import Optional
class Token(BaseModel):
"""Token schema"""
access_token: str
token_type: str
class TokenData(BaseModel):
"""Token data schema"""
employee_id: Optional[int] = None
is_admin: bool = False
class LoginCredentials(BaseModel):
"""Login credentials schema"""
username: str # В формате "Имя Фамилия"
password: str