from typing import Optional

from api_graphql.abc.filter_abc import FilterABC


class IntFilter(FilterABC):
    def __init__(
        self,
        obj: Optional[dict],  # {'equal': value}
    ):
        FilterABC.__init__(self, obj)

        self.add_field("equal", int)
        self.add_field("notEqual", int)
        self.add_field("greater", int)
        self.add_field("greaterOrEqual", int)
        self.add_field("less", int)
        self.add_field("lessOrEqual", int)
        self.add_field("isNull", int)
        self.add_field("isNotNull", int)
        self.add_field("in", list)
        self.add_field("notIn", list)
