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