from django_filters import rest_framework as filters
from django.db.models import Count
from app.entities.models import Department
from django.db.models import Q


class ChangeRequestDepartmentFilterSet(filters.FilterSet):
    # search = filters.CharFilter(method='search_bar', label='search')
    # def search_bar(self, queryset, name, value):
    #     return queryset.filter(
    #         Q(Companyname__icontains=value) |
    #         Q(first_name__icontains=value) |
    #         Q(last_name__icontains=value))

    class Meta:
        model = Department
        fields = '__all__'
