# coding=utf-8
import django_filters

from .models import Order


class OrderFilter(django_filters.FilterSet):
    no = django_filters.CharFilter(field_name='no', lookup_expr='icontains')
    name = django_filters.CharFilter(field_name='customer__name', lookup_expr='icontains')
    tel = django_filters.CharFilter(field_name='customer__tel', lookup_expr='icontains')

    class Meta:
        model = Order
        fields = '__all__'
