from protobuf3.message import Message
from enum import Enum


class MsgId(Enum):
    C_Login = 0
    S_Login = 1
    C_Logout = 3
    S_Logout = 4
    C_Heartbeat = 5
    S_Heartbeat = 6
    S_HotGames = 10
    C_ChildrenItemsOf = 11
    S_ChildrenItemsOf = 12
    C_EnterGame = 15
    S_EnterGame = 16
    C_LeaveGame = 17
    S_LeaveGame = 18
    S_Announcement = 20
    S_Marquee = 24
    C_UpdatePassword = 28
    S_UpdatePassword = 29
    C_UserSettings = 30
    S_UserSettings = 31
    C_UpdateBankBalance = 32
    S_UpdateBankBalance = 33
    C_UpdateBankPassword = 34
    S_UpdateBankPassword = 35
    C_AuthBank = 36
    S_AuthBank = 37
    C_VerifiCode = 40
    S_VerifiCode = 41
    C_BindPhone = 42
    S_BindPhone = 43
    C_BindAlipay = 44
    S_BindAlipay = 45
    C_PrivateMail = 50
    S_PrivateMail = 51
    C_RemPrivateMail = 52
    S_RemPrivateMail = 53
    C_Marquee = 54
    C_Activity = 55
    S_Activity = 56
    C_Notice = 57
    S_Notice = 58
    S_Ntf_ItemsChanged = 100
    C_UserBalance = 101
    S_Ntf_UserBalance = 102
    S_Ntf_UserBank = 104
    S_Ntf_Config = 105
    S_Ntf_NewPrivateMails = 106
    S_Ntf_Marquee = 107
    S_Default = 1000
    S_Offline = 1024


class ErrCode(Enum):
    OK = 0
    PENDING = 1
    TOKEN_ERR = 6
    USER_OFFLINE = 301
    USER_ONLINE = 302
    VER_MISMATCH = 303
    BAD_REQUEST = 400
    AUTH = 401
    FORBIDDEN = 403
    CMD_UNSUPPORT = 404
    UNKNOWN = 500
    TARGET_NOT_FOUND = 601
    NO_REACTION = 602
    BALANCE_INSUFFICIENT = 610
    BANK_INSUFFICIENT = 611
    LENGTH = 612
    TIMEOUT = 614
    OUTDATED = 615
    BAD_FORMAT = 701
    OCCUPIED = 800
    DUP_OPER = 801


class ReasonBalanceChange(Enum):
    REGISTER = 0
    LOGIN = 1
    CHECKIN = 2
    BIND_PHONE = 4
    TASK = 6
    DAILY = 9
    WEEKLY = 13
    MONTHLY = 16
    ALMS = 19
    TOBANK = 21
    BANKOUT = 22
    RECHARGE = 23
    WITHDRAW = 24
    BET = 25
    MGR_ADD = 26
    MGR_DEDUC = 27


class ReasonDisconn(Enum):
    OFFLINE = 0
    ERR_DATA = 1
    REMOTE = 2
    KICK = 3
    HEARTBEAT = 4
    ERR_AUTH = 5
    DUP = 6
    DISABLED = 7


class GameNavbar(Enum):
    PLACEHOLDER = 0
    HOT_GAMES = 1
    CARD_GAMES = 2
    FISHING_GAMES = 3
    ELEC_GAMES = 4
    ONLINE_VIDEOS = 5
    SPORTS_GAMES = 6

