first commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class CredentialsSchema(BaseModel):
|
||||
username: str = Field(..., description="用户名称", example="admin")
|
||||
password: str = Field(..., description="密码", example="123456")
|
||||
|
||||
|
||||
class JWTOut(BaseModel):
|
||||
access_token: str
|
||||
username: str
|
||||
|
||||
|
||||
class JWTPayload(BaseModel):
|
||||
user_id: int
|
||||
username: str
|
||||
is_superuser: bool
|
||||
exp: datetime
|
||||
Reference in New Issue
Block a user