wallet/apps/wallet/constans.py
2026-02-14 15:24:46 +03:30

19 lines
No EOL
771 B
Python

from django.db.models import IntegerChoices
from django.utils.translation import gettext_lazy as _
class StateChoices(IntegerChoices):
CREATED = 1 , _('created')
DELAYED = 2 , _('delayed') # delayed as user wish
PENDING = 3 , _('pending') # wait for external service response (or action)
INCOMPLETE = 4 , _('incomplete') # started and wait for internal progress to complete
SUCCESS = 5 , _('success')
FAILED = 6 , _('failed')
EXPECTED_FAILURE = 7 , _('expected_failure') # no exact data available but guessed to be failed
ROLLED_BACK = 8 , _('ROLLED_BACK')
CANCELED = 9, _('CANCELED')
class TypeChoices(IntegerChoices):
USER = 1 , _('user')
APPLICATION = 2 , _('application')