feat: add ReferenceItem model and update QuickEvaluation FKs
- Create ReferenceitemModel with type, name, parent (self FK), order, is_active fields - Add ReferenceType choices: brand, marka, color, fuel_type, body_type, car_position, state_car - Implement ReferenceItem API (list, retrieve) with filter by type/parent/is_active, search, ordering - Add ReferenceItem admin with list_filter, search, inline editing - Change QuickEvaluation FK fields from shared.OptionsModel to evaluation.ReferenceitemModel - Update serializers and views to use .name instead of .key - Add ReferenceItem to unfold admin navigation
This commit is contained in:
12
core/apps/evaluation/choices/reference.py
Normal file
12
core/apps/evaluation/choices/reference.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class ReferenceType(models.TextChoices):
|
||||
BRAND = "brand", _("Brand")
|
||||
MARKA = "marka", _("Marka")
|
||||
COLOR = "color", _("Color")
|
||||
FUEL_TYPE = "fuel_type", _("Fuel type")
|
||||
BODY_TYPE = "body_type", _("Body type")
|
||||
CAR_POSITION = "car_position", _("Car position")
|
||||
STATE_CAR = "state_car", _("Car state")
|
||||
Reference in New Issue
Block a user