添加Github登录,优化数据库模型
This commit is contained in:
17
models/request.py
Normal file
17
models/request.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
请求模型定义
|
||||
"""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Literal, Union, Optional
|
||||
from datetime import datetime, timezone
|
||||
from uuid import uuid4
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
"""
|
||||
登录请求模型
|
||||
"""
|
||||
username: str = Field(..., description="用户名或邮箱")
|
||||
password: str = Field(..., description="用户密码")
|
||||
captcha: Optional[str] = Field(None, description="验证码")
|
||||
twoFaCode: Optional[str] = Field(None, description="两步验证代码")
|
||||
Reference in New Issue
Block a user