# coding=utf-8

import django_filters

from .models import UsedVehicle, UsedVehicleImg


class UsedVehicleFilter(django_filters.FilterSet):
    brand = django_filters.CharFilter(field_name='brand')
    number = django_filters.CharFilter(field_name='number', lookup_expr='icontains')
    status = django_filters.CharFilter(field_name='status')

    class Meta:
        model = UsedVehicle
        fields = '__all__'

class UsedVehicleImgFilter(django_filters.FilterSet):
    main = django_filters.CharFilter(field_name='main')

    class Meta:
        model = UsedVehicleImg
        fields = '__all__'
