feat: add search, filter, sort and pagination to QuickEvaluation list API
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user