"""This module contains the factories for the ``ideas`` app"""

import factory

from mtp.apps.trainings.factories import TrainingFactory

from .models import (
    Brainstorming,
    BrainstormingIdea,
    BrainstormingTag,
    QuestionWall,
    QuestionWallIdea,
    WordCloud,
    WordCloudIdea
)


class BrainstormingFactory(factory.DjangoModelFactory):
    """Factory for the ``Brainstorming`` model

    Attributes
    ----------
    name: ``factory.Sequence``
    training: sub-factory of ``mtp.apps.trainings.factories.TrainingFactory``

    """

    name = factory.Sequence(lambda n: 'Brainstorming-%d' % n)
    training = factory.SubFactory(TrainingFactory)

    class Meta:
        model = Brainstorming


class BrainstormingIdeaFactory(factory.DjangoModelFactory):
    """Factory for the ``BrainstormingIdea`` model

    Attributes
    ----------
    text: ``factory.Sequence``

    """

    text = factory.Sequence(lambda n: 'BrainstormingIdea-%d' % n)

    class Meta:
        model = BrainstormingIdea


class BrainstormingTagFactory(factory.DjangoModelFactory):
    """Factory for the ``BrainstormingTag`` model

    Attributes
    ----------
    name: ``factory.Sequence``

    """

    name = factory.Sequence(lambda n: 'BrainstormingTag-%d' % n)

    class Meta:
        model = BrainstormingTag


class QuestionWallFactory(factory.DjangoModelFactory):
    """Factory for the ``QuestionWall`` model

    Attributes
    ----------
    name: ``factory.Sequence``
    training: sub-factory of ``mtp.apps.trainings.factories.TrainingFactory``

    """

    name = factory.Sequence(lambda n: 'QuestionWall-%d' % n)
    training = factory.SubFactory(TrainingFactory)

    class Meta:
        model = QuestionWall


class QuestionWallIdeaFactory(factory.DjangoModelFactory):
    """Factory for the ``QuestionWallIdea`` model

    Attributes
    ----------
    text: ``factory.Sequence``

    """

    text = factory.Sequence(lambda n: 'QuestionWallIdea-%d' % n)

    class Meta:
        model = QuestionWallIdea


class WordCloudFactory(factory.DjangoModelFactory):
    """Factory for the ``WordCloud`` model

    Attributes
    ----------
    name: ``factory.Sequence``
    training: sub-factory of ``mtp.apps.trainings.factories.TrainingFactory``

    """

    name = factory.Sequence(lambda n: 'WordCloud-%d' % n)
    training = factory.SubFactory(TrainingFactory)

    class Meta:
        model = WordCloud


class WordCloudIdeaFactory(factory.DjangoModelFactory):
    """Factory for the ``WordCloudIdea`` model

    Attributes
    ----------
    text: ``factory.Sequence``

    """

    text = factory.Sequence(lambda n: 'WordCloudIdea-%d' % n)

    class Meta:
        model = WordCloudIdea
