ipg/apps/pg/constans.py
Sayyid Hamid Mahdavi d5a25dfaee basic pg app
2025-05-13 13:48:39 +03:30

17 lines
No EOL
692 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
class TypeChoices(IntegerChoices):
USER = 1 , _('user')
APPLICATION = 2 , _('application')