# coding=utf-8
import django_filters

from .models import Agent,Store

class AgentFilter(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 = Agent
        fields = '__all__'

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

    class Meta:
        model = Store
        fields = '__all__'