# This file is auto-generated by PrototypeX filter generator.
# Do not edit manually - changes will be overwritten.
# Regenerate using: python -m scripts.gen_filters gen

from __future__ import annotations

import datetime
import typing as t

from audex.entity.session import Session
from audex.filters import FieldFilter
from audex.filters import Filter
from audex.filters import FilterBuilder
from audex.filters import StringBackedFieldFilter
from audex.filters import StringFieldFilter
from audex.valueobj.session import SessionStatus


class SessionFilterBuilder(FilterBuilder[Session]):
    """Session filter builder with full type hints and IDE support.

    This class is auto-generated. Do not edit manually.
    """

    class _IdField(StringFieldFilter):
        """Chainable id filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("id", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: str) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: str) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: str) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: str) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: str) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: str) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[str]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[str]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: str, value2: str) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    class _CreatedAtField(FieldFilter[datetime.datetime]):
        """Chainable created_at filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("created_at", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: datetime.datetime) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: datetime.datetime) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: datetime.datetime) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: datetime.datetime) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: datetime.datetime) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: datetime.datetime) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[datetime.datetime]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[datetime.datetime]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(
            self, value1: datetime.datetime, value2: datetime.datetime
        ) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

    class _UpdatedAtField(FieldFilter[datetime.datetime | None]):
        """Chainable updated_at filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("updated_at", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[datetime.datetime | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[datetime.datetime | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(
            self, value1: datetime.datetime | None, value2: datetime.datetime | None
        ) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

    class _DoctorIdField(StringFieldFilter):
        """Chainable doctor_id filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("doctor_id", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: str) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: str) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: str) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: str) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: str) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: str) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[str]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[str]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: str, value2: str) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    class _PatientNameField(StringFieldFilter):
        """Chainable patient_name filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("patient_name", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: str | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: str | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: str | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: str | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: str | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: str | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: str | None, value2: str | None) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    class _ClinicNumberField(StringFieldFilter):
        """Chainable clinic_number filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("clinic_number", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: str | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: str | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: str | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: str | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: str | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: str | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: str | None, value2: str | None) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    class _MedicalRecordNumberField(StringFieldFilter):
        """Chainable medical_record_number filter with type-safe
        operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("medical_record_number", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: str | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: str | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: str | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: str | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: str | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: str | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: str | None, value2: str | None) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    class _DiagnosisField(StringFieldFilter):
        """Chainable diagnosis filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("diagnosis", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: str | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: str | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: str | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: str | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: str | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: str | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: str | None, value2: str | None) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    class _StatusField(StringBackedFieldFilter[SessionStatus]):
        """Chainable status filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("status", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: SessionStatus) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: SessionStatus) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: SessionStatus) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: SessionStatus) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: SessionStatus) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: SessionStatus) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[SessionStatus]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[SessionStatus]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: SessionStatus, value2: SessionStatus) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    class _StartedAtField(FieldFilter[datetime.datetime | None]):
        """Chainable started_at filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("started_at", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[datetime.datetime | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[datetime.datetime | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(
            self, value1: datetime.datetime | None, value2: datetime.datetime | None
        ) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

    class _EndedAtField(FieldFilter[datetime.datetime | None]):
        """Chainable ended_at filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("ended_at", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: datetime.datetime | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[datetime.datetime | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[datetime.datetime | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(
            self, value1: datetime.datetime | None, value2: datetime.datetime | None
        ) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

    class _NotesField(StringFieldFilter):
        """Chainable notes filter with type-safe operations."""

        def __init__(self, builder: SessionFilterBuilder) -> None:
            super().__init__("notes", object.__getattribute__(builder, "_filter"))
            self._parent_builder = builder

        def eq(self, value: str | None) -> SessionFilterBuilder:
            super().eq(value)
            return self._parent_builder

        def ne(self, value: str | None) -> SessionFilterBuilder:
            super().ne(value)
            return self._parent_builder

        def gt(self, value: str | None) -> SessionFilterBuilder:
            super().gt(value)
            return self._parent_builder

        def lt(self, value: str | None) -> SessionFilterBuilder:
            super().lt(value)
            return self._parent_builder

        def gte(self, value: str | None) -> SessionFilterBuilder:
            super().gte(value)
            return self._parent_builder

        def lte(self, value: str | None) -> SessionFilterBuilder:
            super().lte(value)
            return self._parent_builder

        def in_(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().in_(values)
            return self._parent_builder

        def nin(self, values: t.Sequence[str | None]) -> SessionFilterBuilder:
            super().nin(values)
            return self._parent_builder

        def between(self, value1: str | None, value2: str | None) -> SessionFilterBuilder:
            super().between(value1, value2)
            return self._parent_builder

        def is_null(self) -> SessionFilterBuilder:
            super().is_null()
            return self._parent_builder

        def is_not_null(self) -> SessionFilterBuilder:
            super().is_not_null()
            return self._parent_builder

        def asc(self) -> SessionFilterBuilder:
            super().asc()
            return self._parent_builder

        def desc(self) -> SessionFilterBuilder:
            super().desc()
            return self._parent_builder

        def contains(self, value: str) -> SessionFilterBuilder:
            super().contains(value)
            return self._parent_builder

        def startswith(self, value: str) -> SessionFilterBuilder:
            super().startswith(value)
            return self._parent_builder

        def endswith(self, value: str) -> SessionFilterBuilder:
            super().endswith(value)
            return self._parent_builder

    def and_(self, *filters: Filter) -> Filter:
        """Combine with other filters using AND logic.

        Args:
            *filters: Other filters to combine with AND.

        Returns:
            Combined filter with AND logic.

        Example:
            ```python
            # username = 'john' AND email = 'john@ex.com'
            filter = (
                session_filter()
                .username.eq("john")
                .and_(session_filter().email.eq("john@ex.com"))
            )
            ```
        """
        return object.__getattribute__(self, "_filter").and_(*filters)

    def or_(self, *filters: Filter) -> Filter:
        """Combine with other filters using OR logic.

        Args:
            *filters: Other filters to combine with OR.

        Returns:
            Combined filter with OR logic.

        Example:
            ```python
            # username = 'john' OR email = 'john@ex.com'
            filter = (
                session_filter()
                .username.eq("john")
                .or_(session_filter().email.eq("john@ex.com"))
            )
            ```
        """
        return object.__getattribute__(self, "_filter").or_(*filters)

    def not_(self) -> Filter:
        """Negate the current filter.

        Returns:
            Negated filter.

        Example:
            ```python
            # NOT (username = 'john')
            filter = session_filter().username.eq("john").not_()
            ```
        """
        return object.__getattribute__(self, "_filter").not_()

    # Field properties

    @property
    def id(self) -> _IdField:
        """Filter by id field."""
        return self._IdField(self)

    @property
    def created_at(self) -> _CreatedAtField:
        """Filter by created_at field."""
        return self._CreatedAtField(self)

    @property
    def updated_at(self) -> _UpdatedAtField:
        """Filter by updated_at field."""
        return self._UpdatedAtField(self)

    @property
    def doctor_id(self) -> _DoctorIdField:
        """Filter by doctor_id field."""
        return self._DoctorIdField(self)

    @property
    def patient_name(self) -> _PatientNameField:
        """Filter by patient_name field."""
        return self._PatientNameField(self)

    @property
    def clinic_number(self) -> _ClinicNumberField:
        """Filter by clinic_number field."""
        return self._ClinicNumberField(self)

    @property
    def medical_record_number(self) -> _MedicalRecordNumberField:
        """Filter by medical_record_number field."""
        return self._MedicalRecordNumberField(self)

    @property
    def diagnosis(self) -> _DiagnosisField:
        """Filter by diagnosis field."""
        return self._DiagnosisField(self)

    @property
    def status(self) -> _StatusField:
        """Filter by status field."""
        return self._StatusField(self)

    @property
    def started_at(self) -> _StartedAtField:
        """Filter by started_at field."""
        return self._StartedAtField(self)

    @property
    def ended_at(self) -> _EndedAtField:
        """Filter by ended_at field."""
        return self._EndedAtField(self)

    @property
    def notes(self) -> _NotesField:
        """Filter by notes field."""
        return self._NotesField(self)


def session_filter() -> SessionFilterBuilder:
    """Create a Session filter builder with full type safety.

    Returns:
        A SessionFilterBuilder instance with full IDE support and chainable fields.

    Example:
        ```python
        # AND conditions (chained)
        filter = (
            session_filter()
            .field1.eq(value1)
            .field2.contains(value2)
        )

        # OR conditions
        filter = session_filter().field1.eq(
            value1
        ) | session_filter().field2.eq(value2)
        ```
    """
    return SessionFilterBuilder(Session)
