from django_filters import rest_framework as filters

from apps.rpm.models import Rpj


class RpjFilterSet(filters.FilterSet):
    start_come = filters.DateTimeFilter(field_name="come_time", lookup_expr='gte')
    end_come = filters.DateTimeFilter(field_name="come_time", lookup_expr='lte')

    class Meta:
        model = Rpj
        fields = ['rparty', 'belong_dept', 'state', 'create_by', 'start_come', 'end_come']
