refactor: replace DefaultLimitOffsetPage with LimitOffsetPage in multiple files and update timezone handling to use UTC
This commit is contained in:
@@ -16,7 +16,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class ActivityEvent(QueryModel, table=True):
|
||||
"""Discrete activity event tied to tasks and agents."""
|
||||
|
||||
__tablename__ = "activity_events"
|
||||
__tablename__ = "activity_events" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
event_type: str = Field(index=True)
|
||||
|
||||
@@ -18,7 +18,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class Agent(QueryModel, table=True):
|
||||
"""Agent configuration and lifecycle state persisted in the database."""
|
||||
|
||||
__tablename__ = "agents"
|
||||
__tablename__ = "agents" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
board_id: UUID | None = Field(default=None, foreign_key="boards.id", index=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class Approval(QueryModel, table=True):
|
||||
"""Approval request and decision metadata for gated operations."""
|
||||
|
||||
__tablename__ = "approvals"
|
||||
__tablename__ = "approvals" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
board_id: UUID = Field(foreign_key="boards.id", index=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class BoardGroupMemory(QueryModel, table=True):
|
||||
"""Persisted memory items associated with a board group."""
|
||||
|
||||
__tablename__ = "board_group_memory"
|
||||
__tablename__ = "board_group_memory" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
board_group_id: UUID = Field(foreign_key="board_groups.id", index=True)
|
||||
|
||||
@@ -16,7 +16,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class BoardGroup(TenantScoped, table=True):
|
||||
"""Logical grouping container for boards within an organization."""
|
||||
|
||||
__tablename__ = "board_groups"
|
||||
__tablename__ = "board_groups" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
organization_id: UUID = Field(foreign_key="organizations.id", index=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class BoardMemory(QueryModel, table=True):
|
||||
"""Persisted memory item attached directly to a board."""
|
||||
|
||||
__tablename__ = "board_memory"
|
||||
__tablename__ = "board_memory" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
board_id: UUID = Field(foreign_key="boards.id", index=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class BoardOnboardingSession(QueryModel, table=True):
|
||||
"""Persisted onboarding conversation and draft goal data for a board."""
|
||||
|
||||
__tablename__ = "board_onboarding_sessions"
|
||||
__tablename__ = "board_onboarding_sessions" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
board_id: UUID = Field(foreign_key="boards.id", index=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class Board(TenantScoped, table=True):
|
||||
"""Primary board entity grouping tasks, agents, and goal metadata."""
|
||||
|
||||
__tablename__ = "boards"
|
||||
__tablename__ = "boards" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
organization_id: UUID = Field(foreign_key="organizations.id", index=True)
|
||||
|
||||
@@ -16,7 +16,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class Gateway(QueryModel, table=True):
|
||||
"""Configured external gateway endpoint and authentication settings."""
|
||||
|
||||
__tablename__ = "gateways"
|
||||
__tablename__ = "gateways" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
organization_id: UUID = Field(foreign_key="organizations.id", index=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class OrganizationBoardAccess(QueryModel, table=True):
|
||||
"""Member-specific board permissions within an organization."""
|
||||
|
||||
__tablename__ = "organization_board_access"
|
||||
__tablename__ = "organization_board_access" # pyright: ignore[reportAssignmentType]
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"organization_member_id",
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class OrganizationInviteBoardAccess(QueryModel, table=True):
|
||||
"""Invite-specific board permissions applied after invite acceptance."""
|
||||
|
||||
__tablename__ = "organization_invite_board_access"
|
||||
__tablename__ = "organization_invite_board_access" # pyright: ignore[reportAssignmentType]
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"organization_invite_id",
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class OrganizationInvite(QueryModel, table=True):
|
||||
"""Invitation record granting prospective organization access."""
|
||||
|
||||
__tablename__ = "organization_invites"
|
||||
__tablename__ = "organization_invites" # pyright: ignore[reportAssignmentType]
|
||||
__table_args__ = (UniqueConstraint("token", name="uq_org_invites_token"),)
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class OrganizationMember(QueryModel, table=True):
|
||||
"""Membership row linking a user to an organization and permissions."""
|
||||
|
||||
__tablename__ = "organization_members"
|
||||
__tablename__ = "organization_members" # pyright: ignore[reportAssignmentType]
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"organization_id",
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class Organization(QueryModel, table=True):
|
||||
"""Top-level organization tenant record."""
|
||||
|
||||
__tablename__ = "organizations"
|
||||
__tablename__ = "organizations" # pyright: ignore[reportAssignmentType]
|
||||
__table_args__ = (UniqueConstraint("name", name="uq_organizations_name"),)
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
|
||||
@@ -17,7 +17,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class TaskDependency(TenantScoped, table=True):
|
||||
"""Directed dependency edge between two tasks in the same board."""
|
||||
|
||||
__tablename__ = "task_dependencies"
|
||||
__tablename__ = "task_dependencies" # pyright: ignore[reportAssignmentType]
|
||||
__table_args__ = (
|
||||
UniqueConstraint(
|
||||
"task_id",
|
||||
|
||||
@@ -16,7 +16,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class TaskFingerprint(QueryModel, table=True):
|
||||
"""Hashed task-content fingerprint associated with a board and task."""
|
||||
|
||||
__tablename__ = "task_fingerprints"
|
||||
__tablename__ = "task_fingerprints" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
board_id: UUID = Field(foreign_key="boards.id", index=True)
|
||||
|
||||
@@ -16,7 +16,7 @@ RUNTIME_ANNOTATION_TYPES = (datetime,)
|
||||
class Task(TenantScoped, table=True):
|
||||
"""Board-scoped task entity with ownership, status, and timing fields."""
|
||||
|
||||
__tablename__ = "tasks"
|
||||
__tablename__ = "tasks" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
board_id: UUID | None = Field(default=None, foreign_key="boards.id", index=True)
|
||||
|
||||
@@ -12,7 +12,7 @@ from app.models.base import QueryModel
|
||||
class User(QueryModel, table=True):
|
||||
"""Application user account and profile attributes."""
|
||||
|
||||
__tablename__ = "users"
|
||||
__tablename__ = "users" # pyright: ignore[reportAssignmentType]
|
||||
|
||||
id: UUID = Field(default_factory=uuid4, primary_key=True)
|
||||
clerk_user_id: str = Field(index=True, unique=True)
|
||||
|
||||
Reference in New Issue
Block a user