# coding=utf-8

import django_filters

from apps.employee.models import Employee


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

    class Meta:
        model = Employee
        fields = ['username', 'name', 'tel', ]
