# coding=utf-8

import django_filters

from .models import Equipment


class EquipmentFilter(django_filters.FilterSet):
    name = django_filters.CharFilter(field_name='name', lookup_expr='icontains')
    type = django_filters.CharFilter(field_name='type__name', lookup_expr='icontains')
    supplier = django_filters.CharFilter(field_name='supplier__name', lookup_expr='icontains')

    class Meta:
        model = Equipment
        fields = '__all__'
