feat: add user model and registration endpoint

This commit is contained in:
Indiana
2026-07-20 15:14:31 +00:00
parent 9e69c622c9
commit cfffc7ff59
9 changed files with 147 additions and 7 deletions

17
backend/app/schemas.py Normal file
View File

@@ -0,0 +1,17 @@
import uuid
from pydantic import BaseModel, Field
class RegisterRequest(BaseModel):
username: str = Field(min_length=3, max_length=32)
password: str = Field(min_length=8, max_length=128)
email: str | None = None
class UserOut(BaseModel):
id: uuid.UUID
username: str
class Config:
from_attributes = True