feat: add search, filter, sort and pagination to QuickEvaluation list API

This commit is contained in:
Husanjonazamov
2026-03-09 13:21:44 +05:00
parent 9c176674f9
commit 8feee78ce4
13 changed files with 168 additions and 21 deletions

View File

@@ -3,8 +3,8 @@ from django.utils.translation import gettext_lazy as _
from django_core.models import AbstractBaseModel
from model_bakery import baker
from core.apps.evaluation.choices.vehicle import FuelType, BodyType, VehicleCondition
from core.apps.evaluation.choices.quick import CarState, CarType, QuickEvaluationStatus
from core.apps.evaluation.choices.vehicle import BodyType, FuelType, VehicleCondition
class QuickEvaluationModel(AbstractBaseModel):
@@ -63,6 +63,26 @@ class QuickEvaluationModel(AbstractBaseModel):
blank=True,
null=True,
)
status = models.CharField(
verbose_name=_("status"),
max_length=50,
choices=QuickEvaluationStatus.choices,
default=QuickEvaluationStatus.CREATED,
)
car_type = models.CharField(
verbose_name=_("car type"),
max_length=50,
choices=CarType.choices,
blank=True,
null=True,
)
state_car = models.CharField(
verbose_name=_("car state"),
max_length=50,
choices=CarState.choices,
blank=True,
null=True,
)
def __str__(self):
return f"Quick Evaluation {self.pk} by {self.created_by}"