feat: 定义batchst默认排序为batch

This commit is contained in:
caoqianming 2024-12-02 14:33:44 +08:00
parent bc6baca698
commit d9a1512a92
1 changed files with 2 additions and 0 deletions

View File

@ -521,6 +521,8 @@ class BatchStViewSet(ListModelMixin, CustomGenericViewSet):
perms_map = {"get": "*"}
queryset = BatchSt.objects.all()
serializer_class = BatchStSerializer
ordering_fields = ["batch", "last_time", "update_time"]
ordering = ["batch"]
filterset_fields = {
"batch": ["exact", "contains"],
"last_time": ["exact", "gte", "lte"],