diff --git a/backend/app/schemas/auth.py b/backend/app/schemas/auth.py new file mode 100644 index 0000000..c40384b --- /dev/null +++ b/backend/app/schemas/auth.py @@ -0,0 +1,17 @@ +"""Authentication schemas.""" +from pydantic import BaseModel, EmailStr, Field + + +class LoginRequest(BaseModel): + email: EmailStr + password: str + + +class RegisterRequest(BaseModel): + email: EmailStr + username: str = Field(..., min_length=2, max_length=100) + password: str = Field(..., min_length=6) + role: str = "worker" + tenant_slug: str = "default" # for first user in a new tenant + tenant_name: str = "" # if creating a new tenant + invite_code: str = "" # for joining existing tenant (MVP: not enforced)