mirror of
https://github.com/pocketpaw/pocketpaw.git
synced 2026-05-21 01:04:57 +00:00
- Auto-fix 155 errors (import sorting, annotations, deprecated imports) - Format 87 files with ruff format for line length compliance - Fix 15 F401 unused imports (add __all__ for re-exports, remove truly unused) - Fix 7 F841 unused variables (prefix with _) - Fix 2 F821 undefined names (add missing imports) - Fix 3 E402 module-level imports not at top - Fix 2 UP042 str+Enum → StrEnum - Fix 1 E712 == False comparison - Fix remaining 51 E501 line-too-long in string literals and expressions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 lines
906 B
Python
32 lines
906 B
Python
"""Workspace document — one per deployment/org."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import datetime
|
|
|
|
from beanie import Indexed
|
|
from pydantic import BaseModel, Field
|
|
|
|
from ee.cloud.models.base import TimestampedDocument
|
|
|
|
|
|
class WorkspaceSettings(BaseModel):
|
|
default_agent: str | None = None # Agent ID
|
|
allow_invites: bool = True
|
|
retention_days: int | None = None # None = keep forever
|
|
|
|
|
|
class Workspace(TimestampedDocument):
|
|
"""Organization workspace — one per enterprise deployment."""
|
|
|
|
name: str
|
|
slug: Indexed(str, unique=True) # type: ignore[valid-type]
|
|
owner: str # User ID (admin who created it)
|
|
plan: str = "team" # from license: team | business | enterprise
|
|
seats: int = 5
|
|
settings: WorkspaceSettings = Field(default_factory=WorkspaceSettings)
|
|
deleted_at: datetime | None = None
|
|
|
|
class Settings:
|
|
name = "workspaces"
|