feat: 设备增加power_kw查询
This commit is contained in:
parent
93881852d0
commit
235d17f193
|
@ -6,7 +6,11 @@ class EquipFilterSet(filters.FilterSet):
|
|||
tag = filters.CharFilter(method='filter_tag')
|
||||
class Meta:
|
||||
model = Equipment
|
||||
fields = ['keeper', 'type', 'tag']
|
||||
fields = {
|
||||
"keeper": ["exact"],
|
||||
"type": ["exact"],
|
||||
"power_kw": ["gte"],
|
||||
}
|
||||
|
||||
def filter_tag(self, queryset, name, value):
|
||||
now = datetime.now()
|
||||
|
|
Loading…
Reference in New Issue