import graphene
from graphene import InputObjectType

from books.schema.inputs import ContentElementInput
from users.inputs import SchoolClassInput


class RoomInput(InputObjectType):
    title = graphene.String()
    description = graphene.String()
    school_class = SchoolClassInput()
    appearance = graphene.String()


class AddRoomArgument(RoomInput):
    pass


class UpdateRoomArgument(RoomInput):
    id = graphene.ID(required=True)


class RoomEntryArgument(InputObjectType):
    title = graphene.String(required=True)
    contents = graphene.List(ContentElementInput)


class AddRoomEntryArgument(RoomEntryArgument):
    room = graphene.ID(required=True)


class UpdateRoomEntryArgument(RoomEntryArgument):
    id = graphene.ID(required=True)
