from sqlalchemy import Connection as Connection
from sqlalchemy.orm import Mapper as Mapper

from ..contexts import get_user_id as get_user_id
from ..utils import (
    current_timestamp as current_timestamp,
    try_creatable as try_creatable,
)

class CreateMixin:
    """Mixin for models with creation tracking.

    AUTOMATIC BEHAVIOR on any model creation:
    - created_at: Set to current timestamp in SYSTEM_TIMEZONE
    - created_by: Set from ctx_user_id context

    To control automatic updates:
    ```python
    disable_on_create()
    enable_on_create()
    ```

    The actual columns are defined in the model itself
    based on what exists in the database schema.

    A model using this mixin may have one or more of:
    - created_at: When the record was created
    - created_by: User ID who created the record
    """

def disable_on_create() -> None:
    """Disable automatic creation fields."""

def enable_on_create() -> None:
    """Enable automatic creation fields."""
