jumpserver/apps/common/const/choices.py

36 lines
1.2 KiB
Python
Raw Normal View History

2022-09-07 11:49:42 +00:00
from django.db import models
2023-07-24 03:52:25 +00:00
from django.utils.translation import gettext_lazy as _
2020-07-20 02:42:22 +00:00
ADMIN = 'Admin'
USER = 'User'
AUDITOR = 'Auditor'
2022-09-07 11:49:42 +00:00
class Trigger(models.TextChoices):
manual = 'manual', _('Manual trigger')
timing = 'timing', _('Timing trigger')
2022-11-01 03:52:51 +00:00
class Status(models.TextChoices):
2022-11-02 11:07:07 +00:00
ready = 'ready', _('Ready')
2022-11-01 03:52:51 +00:00
pending = 'pending', _("Pending")
running = 'running', _("Running")
success = 'success', _("Success")
failed = 'failed', _("Failed")
error = 'error', _("Error")
canceled = 'canceled', _("Canceled")
2024-02-02 08:52:57 +00:00
COUNTRY_CALLING_CODES = [
{'name': 'China(中国)', 'value': '+86'},
{'name': 'HongKong(中国香港)', 'value': '+852'},
{'name': 'Macao(中国澳门)', 'value': '+853'},
{'name': 'Taiwan(中国台湾)', 'value': '+886'},
{'name': 'America(America)', 'value': '+1'}, {'name': 'Russia(Россия)', 'value': '+7'},
{'name': 'France(français)', 'value': '+33'},
{'name': 'Britain(Britain)', 'value': '+44'},
{'name': 'Germany(Deutschland)', 'value': '+49'},
{'name': 'Japan(日本)', 'value': '+81'}, {'name': 'Korea(한국)', 'value': '+82'},
{'name': 'India(भारत)', 'value': '+91'}
]