You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
570 B
28 lines
570 B
from enum import Enum
|
|
|
|
class UserRole(Enum):
|
|
ADMIN = 0
|
|
USER = 1
|
|
|
|
# Add this method to enable casting to int
|
|
def __int__(self):
|
|
return self.value
|
|
|
|
class PublishedStatus(Enum):
|
|
APPROVED = 0
|
|
PENDING = 1
|
|
DECLINED = 2
|
|
REVOKED = 3
|
|
BANNED = 4
|
|
DRAFT = 5
|
|
def __int__(self):
|
|
return self.value
|
|
|
|
class NotificationTypes(Enum):
|
|
MENTION = 0
|
|
COURSE_PUBLISH_STATUS_UPDATE = 1
|
|
NEW_BADGE = 2
|
|
TEXT_WITH_URL = 3
|
|
PLAINTEXT_NOTICE = 4
|
|
def __int__(self):
|
|
return self.value
|
|
|