from django_filters import rest_framework as filters

from LiveStock.models import Contractor


class ContractorFilterSet(filters.FilterSet):
    class Meta:
        model = Contractor
        fields = [
            'address__city__name',
            'contractor_code',
            'fullname',
            'entity_code',
            'national_id',
            'company_name',
            'user__mobile',
            'user__first_name',
            'user__last_name',
            'user__fullname'
        ]
