15 lines
456 B
Python
15 lines
456 B
Python
"""User schemas."""
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class UserUpdate(BaseModel):
|
|
"""Schema for updating a user."""
|
|
|
|
name: str | None = Field(
|
|
None, min_length=1, max_length=100, description="User full name",
|
|
)
|
|
plan_id: int | None = Field(None, description="User plan ID")
|
|
credits: int | None = Field(None, ge=0, description="User credits")
|
|
is_active: bool | None = Field(None, description="Whether user is active")
|