"""Serializers for back office app advertisements"""
from advertisement.serializers import AdvertisementBaseSerializer
from main.serializers import PageExtendedSerializer


class AdvertisementDetailSerializer(AdvertisementBaseSerializer):
    """Advertisement serializer for back office."""
    pages = PageExtendedSerializer(many=True, read_only=True)

    class Meta(AdvertisementBaseSerializer.Meta):
        """Meta class."""
        fields = AdvertisementBaseSerializer.Meta.fields + [
            'pages',
        ]
