Files
JARVIS/backend/app/schemas/auth.py
caoxiaozhu a3aa15d339 feat(auth): add admin bootstrap and username login
Initialize admin bootstrap settings during startup, persist username support in auth flows, and align frontend auth requests with local API behavior.
2026-03-24 15:07:19 +08:00

29 lines
474 B
Python

from pydantic import BaseModel, EmailStr
class UserCreate(BaseModel):
username: str
email: EmailStr
password: str
full_name: str | None = None
class UserOut(BaseModel):
id: str
username: str
email: str
full_name: str | None
is_active: bool
is_superuser: bool
model_config = {"from_attributes": True}
class Token(BaseModel):
access_token: str
token_type: str = "bearer"
class TokenPayload(BaseModel):
sub: str