# coding=utf-8

import django_filters

from apps.customer.models import Customer, CustomerVehicle


class CustomerFilter(django_filters.FilterSet):
    name = django_filters.CharFilter(field_name='name', lookup_expr='icontains')
    tel = django_filters.CharFilter(field_name='tel', lookup_expr='icontains')

    class Meta:
        model = Customer
        fields = '__all__'


class CustomerVehicleFilter(django_filters.FilterSet):
    customer = django_filters.CharFilter(field_name='customer')

    class Meta:
        model = CustomerVehicle
        fields = '__all__'
