Files
Aislo/A06_Login/A06_Login_Schema.py
T

20 lines
507 B
Python

"""로그인·재인증 요청/응답 스키마."""
from pydantic import BaseModel, EmailStr, Field
class LoginRequest(BaseModel):
email: EmailStr
password: str = Field(min_length=8, max_length=128)
class OtpVerifyRequest(BaseModel):
email: EmailStr
otp_code: str = Field(pattern=r"^\d{6}$")
class PasswordChangeRequest(BaseModel):
current_password: str = Field(min_length=8, max_length=128)
new_password: str = Field(min_length=8, max_length=128)
logout_all: bool = True