# Auto-generated by DjangoCFG - see CLAUDE.md

from __future__ import annotations
from typing import Any

from pydantic import BaseModel, ConfigDict, Field


class BackupCodesStatus(BaseModel):
    """
    Serializer for backup codes status.

    Response model (includes read-only fields).
    """

    model_config = ConfigDict(
        validate_assignment=True,
        extra="allow",
        frozen=False,
    )

    remaining_count: int = Field(description='Number of unused backup codes')
    total_generated: int = Field(description='Total number of codes generated')
    warning: str | None = Field(None, description='Warning if running low on codes')



class BackupCodesRegenerateRequest(BaseModel):
    """
    Serializer for regenerating backup codes.

    Request model (no read-only fields).
    """

    model_config = ConfigDict(
        validate_assignment=True,
        extra="allow",
        frozen=False,
    )

    code: str = Field(description='TOTP code for verification', min_length=6, max_length=6)



class BackupCodesRegenerateResponse(BaseModel):
    """
    Response serializer for backup codes regeneration.

    Response model (includes read-only fields).
    """

    model_config = ConfigDict(
        validate_assignment=True,
        extra="allow",
        frozen=False,
    )

    backup_codes: list[str] = Field(description='List of new backup codes (save t...')
    warning: str = Field(description='Warning about previous codes bei...')



