initial commit

This commit is contained in:
smueller
2026-07-03 11:35:25 +02:00
commit 146d398ecb
24 changed files with 1040 additions and 0 deletions

19
app/schemas/user.py Normal file
View File

@@ -0,0 +1,19 @@
from pydantic import BaseModel, EmailStr, Field
class UserCreate(BaseModel):
email: EmailStr
full_name: str = Field(min_length=2, max_length=255)
password: str = Field(min_length=10, max_length=255)
role: str = Field(default="reader", pattern="^(admin|editor|reader)$")
class UserOut(BaseModel):
id: int
email: EmailStr
full_name: str
role: str
is_active: bool
class Config:
from_attributes = True