OrganizationRead (organizations.py)

openclaw-mission-control · auth

Schemas for organization, membership, and invite API payloads.

"""Schemas for organization, membership, and invite API payloads."""

from __future__ import annotations

from datetime import datetime
from uuid import UUID

from sqlmodel import Field, SQLModel

RUNTIME_ANNOTATION_TYPES = (datetime, UUID)


class OrganizationRead(SQLModel):
    """Organization payload returned by read endpoints."""

    id: UUID
    name: str
    created_at: datetime
    updated_at: datetime


class OrganizationCreate(SQLModel):
    """Payload for creating a new organization."""

    name: str


class OrganizationActiveUpdate(SQLModel):
    """Payload for switching the active organization context."""

    organization_id: UUID


class OrganizationListItem(SQLModel):
    """Organization list row for current user memberships."""

    id: UUID
    name: str
    role: str
  

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key