Scaffold V2 backend foundation
This commit is contained in:
22
ai_knowledge_base_v2/apps/backend/app/schemas/auth.py
Normal file
22
ai_knowledge_base_v2/apps/backend/app/schemas/auth.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.schemas.user import UserProfile
|
||||
|
||||
|
||||
class SendSmsRequest(BaseModel):
|
||||
phone: str = Field(min_length=11, max_length=20)
|
||||
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
phone: str = Field(min_length=11, max_length=20)
|
||||
code: str = Field(min_length=4, max_length=8)
|
||||
|
||||
|
||||
class LoginResponse(BaseModel):
|
||||
token: str
|
||||
expiredAt: datetime
|
||||
user: UserProfile
|
||||
Reference in New Issue
Block a user