55 lines
1 KiB
Python
55 lines
1 KiB
Python
from enum import StrEnum
|
|
|
|
|
|
class _ChoicesEnum(StrEnum):
|
|
@classmethod
|
|
def choices(cls):
|
|
return [(m.value, m.name.replace("_", " ").title()) for m in cls]
|
|
|
|
|
|
class ChannelType(_ChoicesEnum):
|
|
EMAIL = "email"
|
|
SMS = "sms"
|
|
WHATSAPP = "whatsapp"
|
|
TELEGRAM = "telegram"
|
|
PUSH = "push"
|
|
|
|
|
|
class EventSeverity(_ChoicesEnum):
|
|
INFO = "info"
|
|
WARNING = "warning"
|
|
ERROR = "error"
|
|
CRITICAL = "critical"
|
|
|
|
|
|
class BillingInterval(_ChoicesEnum):
|
|
MONTHLY = "monthly"
|
|
YEARLY = "yearly"
|
|
|
|
|
|
class AuditAction(_ChoicesEnum):
|
|
CREATE = "create"
|
|
UPDATE = "update"
|
|
DELETE = "delete"
|
|
|
|
|
|
class SubscriptionStatus(_ChoicesEnum):
|
|
ACTIVE = "active"
|
|
PAST_DUE = "past_due"
|
|
CANCELLED = "cancelled"
|
|
EXPIRED = "expired"
|
|
TRIALING = "trialing"
|
|
|
|
|
|
class InvoiceStatus(_ChoicesEnum):
|
|
DRAFT = "draft"
|
|
OPEN = "open"
|
|
PAID = "paid"
|
|
VOID = "void"
|
|
UNCOLLECTIBLE = "uncollectible"
|
|
|
|
|
|
class ApprovalStrategy(_ChoicesEnum):
|
|
ANY = "any"
|
|
ALL = "all"
|
|
MAJORITY = "majority"
|