from enum import Enum, StrEnum


class EnumBase(Enum):
    @classmethod
    def get_member_values(cls):
        return [item.value for item in cls._member_map_.values()]

    @classmethod
    def get_member_names(cls):
        return [name for name in cls._member_names_]


class MethodType(StrEnum):
    GET = "GET"
    POST = "POST"
    PUT = "PUT"
    DELETE = "DELETE"
    PATCH = "PATCH"

class TaskStatus(Enum):
    PENDING = "pending"
    RUNNING = "running"
    SUCCESS = "success"
    FAILED = "failed"
    CANCELLED = "cancelled"
    EXPIRED = "expired"

class TaskType(Enum):
    DECODE_ORDER = "decode_order"
    EVENT = "event"
    TIMER = "timer"

class ScenarioScope(str, Enum):
    ALL = "all"
    PERSONAL = "personal"
    KEFU = "kefu"         # 接待员
    FOLLOW = "follow"     # 跟单员
    DESIGNER = "designer" # 设计师

class RoleType(StrEnum):
    BUYER = "buyer"
    DESIGER = "desiger"
    FOLLOWER = "follower"
    ADMIN = "admin"
    KEFU = "taobao_kefu"

class MsgType(StrEnum):
    NEW_ORDER = "new_order"
    COMMENT = "comment"
    SYSTEM = "system"
    NOTIFY = "notify"

class ActionType(StrEnum):
    CREATE_GROUP = "create_group"
    VIEW_ERP_LOG = "view_erp_log"
    BIND_USER = "bind_user"
    BIND_ORDER = "bind_order"
    WRITE_REMARK = "write_remark"
    SEND_WECHAT_NOTIFY = "send_notify"
    # 清理群聊
    CLEAN_GROUP = "clean_group"
    # 设置群管理员
    SET_GROUP_ADMIN = "set_group_admin"
