refactor: update module docstrings for clarity and consistency
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
"""User API schemas for create, update, and read operations."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from uuid import UUID
|
||||
from uuid import UUID # noqa: TCH003
|
||||
|
||||
from sqlmodel import SQLModel
|
||||
|
||||
|
||||
class UserBase(SQLModel):
|
||||
"""Common user profile fields shared across user payload schemas."""
|
||||
|
||||
clerk_user_id: str
|
||||
email: str | None = None
|
||||
name: str | None = None
|
||||
@@ -17,10 +21,12 @@ class UserBase(SQLModel):
|
||||
|
||||
|
||||
class UserCreate(UserBase):
|
||||
pass
|
||||
"""Payload used to create a user record."""
|
||||
|
||||
|
||||
class UserUpdate(SQLModel):
|
||||
"""Payload for partial user profile updates."""
|
||||
|
||||
name: str | None = None
|
||||
preferred_name: str | None = None
|
||||
pronouns: str | None = None
|
||||
@@ -30,5 +36,7 @@ class UserUpdate(SQLModel):
|
||||
|
||||
|
||||
class UserRead(UserBase):
|
||||
"""Full user payload returned by API responses."""
|
||||
|
||||
id: UUID
|
||||
is_super_admin: bool
|
||||
|
||||
Reference in New Issue
Block a user