syntax="proto3";
package pb;

// 夺宝电子钱包工程专用

enum Ec {
        SUCCEED = 0000;
        FAILED = 9999;
        NATA = 9001;// NO AUTHORIZED TO ACCESS
        DINOTLODLT = 9002;// DOMAIN IS NULL OR THE LENGTH OF DOMAIN LESS THAN 2.
        FTPTDV = 9003;// FAILED TO PASS THE DOMAIN VALIDATION.
        TRDI = 9004;// THE ENCRYPTED DATA IS NULL OR THE LENGTH OF THE ENCRYPTED DATA IS EQUAL TO 0.
        ADP = 9005; //ASSERTION(SAML) DIDN'T PASS THE TIMESTAMP VALIDATION.
        FTE = 9006; //FAILED TO EXTRACT THE SAML PARAMETERS FROM THE ENCRYPTED DATA.
        UA = 9007; //UNKNOW ACTION.
        TSVAB = 9008; //THE SAME VALUE AS BEFORE.
        TO = 9009; //TIME OUT.
        RTO = 9010; //READ TIME OUT.
        DTS = 9011; //DUPLICATE TRANSACTIONS.
        PTAL = 9012; //PLEASE TRY AGAIN LATER.
        SIM = 9013; //SYSTEM IS MAINTAINED.
        MALD = 9014; //MULTIPLE ACCOUNT LOGIN DETECTED.
        DDNE = 9015; //DATA DOES NOT EXIST.
        WIP = 9017; //WORK IN PROCESS, PLEASE TRY AGAIN LATER.
        TPOIE = 8000; //THE PARAMETER OF INPUT ERROR, PLEASE CHECK YOUR PARAMETER IS CORRECT OR NOT.
        TPCBE = 8001; //THE PARAMETER CANNOT BE EMPTY.
        TPMBAP = 8002; //THE PARAMETER MUST BE AN POSITIVE INTEGER.
        TPCBN = 8003; //THE PARAMETER CANNOT BE NEGATIVE.
        WSSF = 8005; //WRONG SDATE SECOND FORMAT
        TDNM = 8006; //TIME DOES NOT MEET.
        TPOC = 8007; //THE PARAMETER ONLY CAN USE NUMBER.
        TPCBF = 8008; //THE PARAMETER CANNOT BE FOUND.
        TIET = 8009; //TIME INTERVAL EXCEEDS THE ALLOWABLE RANGE.
        TLOPI = 8010; //THE LENGTH OF PARAMETER IS TOO LONG.
        TPICBF = 7001; //THE SPECIFIED PARENT ID CANNOT BE FOUND.
        PIS = 7002; //PARENT IS SUSPENDED.
        PIL = 7003; //PARENT IS LOCKED.
        PICJ = 7004; //PARENT IS CLOSED.JDB_SEAMLESS_WALLET_API_CN_V1.11.DOCX
        YHBLO = 7405; //YOU HAVE BEEN LOGGED OUT!
        UICBF = 7501; //USER ID CANNOT BE FOUND.
        UIS = 7502; //USER IS SUSPENDED.
        UIL = 7503; //USER IS LOCKED.
        UIC = 7504; //USER IS CLOSED.
        UINP = 7505;// USER IS NOT PLAYING
        IUIP = 7601; //INVALID USER ID. PLEASE ONLY USE CHARACTERS BETWEEN A-Z, 0-9
        AAEP = 7602; //ACCOUNT ALREADY EXIST. PLEASE CHOOSE OTHER USER ID
        IU = 7603; //INVALID USERNAME.
        TMALC = 7604; //THE PASSWORD MUST AT LEAST 6 CHARACTERS, WITH 1 ALPHABET AND 1 NUMBER.
        IOPO = 7605; //INVALID OPERATION_CODE. PLEASE ONLY USE NUMBER 2, 3, 4, 5.
        YCBNET = 6001; //YOUR CASH BALANCE NOT ENOUGH TO WITHDRAW
        UBIZ = 6002; //USER BALANCE IS ZERO
        WNA = 6003; //WITHDRAW NEGATIVE AMOUNT
        DT = 6004; //DUPLICATE TRANSFER
        RSN = 6005; //REPEAT SERIAL NUMBER.
        YCBNE = 6006; //YOUR CASH BALANCE NOT ENOUGH.
        UIPG = 6901; //USER IS PLAYING GAME, AND NOT ALLOW TRANSFER BALANCE.
}

enum MemberStatus{
    DISBALED = 0;
    OK       = 1;
    BLOCKED  = 2;   // 不能下注
}

message Member{
    string username = 1;        // 会员登入账号
    string password = 2;        // 会员密码 md5
    double balance  = 3;        // 会员余额
    int32  status   = 4;        // 会员状态 see MemberStatus
    string currency = 5;        // 会员货币类型
    double winLimit = 6;        // 会员盈利限制
    double amount   = 7;        // 存取款金额
}

message Order {
    string username     = 1;    // 会员登入账号
    int64   ticketId    = 2;    // 注单ID
    string  serial      = 3;    // 转账流水号
    double  amount      = 4;    // 转账金额
}