Modellar tayyor
This commit is contained in:
3
core/apps/api/choices/__init__.py
Normal file
3
core/apps/api/choices/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from .ad_type import * # noqa
|
||||
from .ad_variant_type import * # noqa
|
||||
from .order_status import * # noqa
|
||||
22
core/apps/api/choices/ad_type.py
Normal file
22
core/apps/api/choices/ad_type.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.db import models
|
||||
|
||||
|
||||
class AdType(models.TextChoices):
|
||||
"""
|
||||
Ad type choices.
|
||||
"""
|
||||
|
||||
BUY = "Buy", _("Buy")
|
||||
SELL = "Sell", _("Sell")
|
||||
|
||||
|
||||
class AdCategoryType(models.TextChoices):
|
||||
"""
|
||||
Ad category type choices.
|
||||
"""
|
||||
|
||||
PRODUCT = "Product", _("Product")
|
||||
SERVICE = "Service", _("Service")
|
||||
AUTO = "Auto", _("Auto")
|
||||
HOME = "Home", _("Home")
|
||||
11
core/apps/api/choices/ad_variant_type.py
Normal file
11
core/apps/api/choices/ad_variant_type.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.db import models
|
||||
|
||||
|
||||
class AdVariantType(models.TextChoices):
|
||||
"""
|
||||
Ad variant type choices.
|
||||
"""
|
||||
|
||||
COLOR = "Color", _("Color")
|
||||
SIZE = "Size", _("Size")
|
||||
12
core/apps/api/choices/order_status.py
Normal file
12
core/apps/api/choices/order_status.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.db import models
|
||||
|
||||
|
||||
class OrderStatus(models.TextChoices):
|
||||
"""
|
||||
Order Status choices.
|
||||
"""
|
||||
|
||||
PENDING = "Pending", _("Pending")
|
||||
CANCEL = "Cancel", _("Cancel")
|
||||
DONE = "Done", _("Done")
|
||||
Reference in New Issue
Block a user