"""Pydantic schemas for organization settings API."""

from typing import Optional, Literal
from pydantic import BaseModel, Field


class OrganizationSettingsResponse(BaseModel):
    """Response model for organization settings."""
    organization_id: str
    enforcement_enabled: bool
    enforcement_mode: Literal["blocking", "monitoring"]
    default_policy_id: Optional[str] = None
    created_at: Optional[str] = None
    updated_at: Optional[str] = None

    model_config = {"from_attributes": True}


class OrganizationSettingsUpdate(BaseModel):
    """Request model for updating organization settings."""
    enforcement_enabled: Optional[bool] = None
    enforcement_mode: Optional[Literal["blocking", "monitoring"]] = None


class InitializeEnforcementResponse(BaseModel):
    """Response after initializing enforcement for an org."""
    organization_id: str
    enforcement_enabled: bool
    enforcement_mode: str
    default_policy_id: str
    default_policy_name: str
    message: str
