""" This module holds the managers and querysets for the ``brainstormers`` app. """

from django.db import models

from mtp.apps.sync.managers import SyncableQuerySet


class BrainstormerManager(models.Manager):
    """The Manager used by the ``Brainstormer`` model."""
    pass


class BrainstormerQuerySet(SyncableQuerySet, models.QuerySet):
    """The QuerySet used by the ``Brainstormer`` model."""

    def for_training_session(self, training_session):
        """ Filter only ``Brainstormer`` instances that belong to the given training session.

        Returns
        -------
        QuerySet of ``mtp.apps.brainstormers.models.Brainstormer``
        """
        return self.filter(session=training_session)


class BrainstormerActivityManager(models.Manager):
    """The Manager used by the ``BrainstormerActivity`` model."""
    pass


class BrainstormerActivityQuerySet(SyncableQuerySet, models.QuerySet):
    """The QuerySet used by the ``BrainstormerActivity`` model."""
    pass


class BrainstormerPropositionGroupManager(models.Manager):
    """The Manager used by the ``BrainstormerPropositionGroup`` model."""
    pass


class BrainstormerPropositionGroupQuerySet(SyncableQuerySet, models.QuerySet):
    """The QuerySet used by the ``BrainstormerPropositionGroup`` model."""
    pass


class BrainstormerPropositionManager(models.Manager):
    """The Manager used by the ``BrainstormerProposition`` model."""
    pass


class BrainstormerPropositionQuerySet(SyncableQuerySet, models.QuerySet):
    """The QuerySet used by the ``BrainstormerProposition`` model."""
    pass
