refactor: update module docstrings for clarity and consistency
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
"""Schemas for board memory create/read API payloads."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from uuid import UUID
|
||||
from datetime import datetime # noqa: TCH003
|
||||
from uuid import UUID # noqa: TCH003
|
||||
|
||||
from sqlmodel import SQLModel
|
||||
|
||||
from app.schemas.common import NonEmptyStr
|
||||
from app.schemas.common import NonEmptyStr # noqa: TCH001
|
||||
|
||||
|
||||
class BoardMemoryCreate(SQLModel):
|
||||
"""Payload for creating a board memory entry."""
|
||||
|
||||
# For writes, reject blank/whitespace-only content.
|
||||
content: NonEmptyStr
|
||||
tags: list[str] | None = None
|
||||
@@ -16,9 +20,12 @@ class BoardMemoryCreate(SQLModel):
|
||||
|
||||
|
||||
class BoardMemoryRead(SQLModel):
|
||||
"""Serialized board memory entry returned from read endpoints."""
|
||||
|
||||
id: UUID
|
||||
board_id: UUID
|
||||
# For reads, allow legacy rows that may have empty content (avoid response validation 500s).
|
||||
# For reads, allow legacy rows that may have empty content
|
||||
# (avoid response validation 500s).
|
||||
content: str
|
||||
tags: list[str] | None = None
|
||||
source: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user