# coding=utf-8
import django_filters

from apps.supplier.models import Supplier


class SupplierFilter(django_filters.FilterSet):
    name = django_filters.CharFilter(name='name', lookup_expr='icontains')
    contacts = django_filters.CharFilter(name='contacts', lookup_expr='icontains')
    phone_number = django_filters.CharFilter(name='phone_number', lookup_expr='icontains')
    enabled = django_filters.CharFilter(name='enabled')
    class Meta:
        model = Supplier
        fields = ['name', 'contacts', 'phone_number', 'enabled', 'type']