import graphene
from graphene_django import DjangoObjectType

from vbv_lernwelt.media_files.models import ContentDocument


class ContentDocumentObjectType(DjangoObjectType):
    url = graphene.String(source="url")

    class Meta:
        model = ContentDocument
        fields = (
            "id",
            "display_text",
            "description",
            "link_display_text",
            "thumbnail",
        )
