from api_graphql.abc.db_model_filter_abc import DbModelFilterABC
from api_graphql.abc.filter.string_filter import StringFilter
from api_graphql.filter.user_space_filter import UserSpaceFilter


class GroupFilter(DbModelFilterABC):
    def __init__(
        self,
        obj: dict,
    ):
        DbModelFilterABC.__init__(self, obj)

        self.add_field("name", StringFilter)
        self.add_field("description", StringFilter)
        self.add_field("userSpace", UserSpaceFilter, "userspace")

        self.add_field("isNull", bool)
        self.add_field("isNotNull", bool)
