"""This module holds the django admin models for the ``roleplays`` app"""

from django.contrib import admin

from .models import Criterion, Roleplay, Step


class StepInline(admin.TabularInline):
    """The django admin inline model for the ``Steps`` model."""

    model = Step


class RoleplayAdmin(admin.ModelAdmin):
    """The django admin model for the ``Roleplay`` model."""

    inlines = [
        StepInline,
    ]

    model = Roleplay


class CriterionInline(admin.TabularInline):
    """The django admin inline model for the ``Criterion`` model."""
    model = Criterion


class StepAdmin(admin.ModelAdmin):
    """The django admin model for the ``Step`` model."""
    inlines = [
        CriterionInline,
    ]

    model = Step

admin.site.register(Roleplay, RoleplayAdmin)
admin.site.register(Step, StepAdmin)
