import graphene


class HiddenForMixin:
    hidden_for = graphene.List('users.schema.SchoolClassNode')

    @staticmethod
    def resolve_hidden_for(parent, info, **kwargs):
        return parent.hidden_for.all()


class VisibleForMixin:
    visible_for = graphene.List('users.schema.SchoolClassNode')

    @staticmethod
    def resolve_visible_for(parent, info, **kwargs):
        return parent.visible_for.all()

class HiddenAndVisibleForMixin(HiddenForMixin, VisibleForMixin):
    pass
