"""Example projection for read models."""

from datetime import datetime
from typing import Annotated

from pydantic import Field

from {{ package_name }}.domain import {{ domain_name }}


@{{ domain_name }}.projection
class ExampleSummary:
    """Read-optimized projection of Example aggregates."""

    example_id: str
    name: Annotated[str, Field(max_length=100)]
    status: str
    created_at: datetime
    updated_at: datetime

    # Computed/denormalized fields for fast querying
    days_since_creation: int | None = None
    is_active: int | None = None  # 1 or 0 for efficient filtering

    class Meta:
        # Customize projection behavior
        stream_name = "example"
