syntax = "proto3"; package types; message PurchaseRecord { int64 amount = 1; int64 number = 2; int64 index = 3; int64 way = 4; } message PurchaseRecords { repeated PurchaseRecord record = 1; int64 fundWin = 2; int64 amountOneRound = 3; } message Lottery { string lotteryId = 1; int32 status = 2; int64 createHeight = 3; int64 fund = 4; int64 purBlockNum = 5; int64 drawBlockNum = 6; int64 lastTransToPurState = 7; int64 lastTransToDrawState = 8; map records = 9; int64 totalPurchasedTxNum = 10; string createAddr = 11; int64 round = 12; int64 luckyNumber = 13; int64 createOnMain = 14; int64 lastTransToPurStateOnMain = 15; int64 lastTransToDrawStateOnMain = 16; repeated MissingRecord missingRecords = 17; } message MissingRecord { repeated int32 times = 1; } message LotteryAction { oneof value { LotteryCreate create = 1; LotteryBuy buy = 2; LotteryDraw draw = 3; LotteryClose close = 4; } int32 ty = 10; } message LotteryCreate { int64 purBlockNum = 1; int64 drawBlockNum = 2; } message LotteryBuy { string lotteryId = 1; int64 amount = 2; int64 number = 3; int64 way = 4; } message LotteryDraw { string lotteryId = 1; } message LotteryClose { string lotteryId = 1; } message ReceiptLottery { string lotteryId = 1; int32 status = 2; int32 prevStatus = 3; string addr = 4; int64 round = 5; int64 number = 6; int64 amount = 7; int64 luckyNumber = 8; int64 time = 9; string txHash = 10; LotteryUpdateBuyInfo updateInfo = 11; int64 way = 12; int64 index = 13; } message ReqLotteryInfo { string lotteryId = 1; } message ReqLotteryBuyInfo { string lotteryId = 1; string addr = 2; int64 round = 3; } message ReqLotteryBuyHistory { string lotteryId = 1; string addr = 2; int64 round = 3; int32 count = 4; int32 direction = 5; int64 index = 6; } message ReqLotteryLuckyInfo { string lotteryId = 1; repeated int64 round = 2; } message ReqLotteryLuckyHistory { string lotteryId = 1; int64 round = 2; int32 count = 3; int32 direction = 4; } message ReplyLotteryNormalInfo { int64 createHeight = 1; int64 purBlockNum = 2; int64 drawBlockNum = 3; string createAddr = 4; } message ReplyLotteryCurrentInfo { int32 status = 1; int64 fund = 2; int64 lastTransToPurState = 3; int64 lastTransToDrawState = 4; int64 totalPurchasedTxNum = 5; int64 round = 6; int64 luckyNumber = 7; int64 lastTransToPurStateOnMain = 8; int64 lastTransToDrawStateOnMain = 9; int64 purBlockNum = 10; int64 drawBlockNum = 11; repeated MissingRecord missingRecords = 12; } message ReplyLotteryHistoryLuckyNumber { repeated int64 luckyNumber = 1; } message ReplyLotteryShowInfo { repeated LotteryBuyRecord records = 1; } message LotteryNumberRecord { int64 number = 1; int64 amount = 2; } // used for execlocal message LotteryBuyRecord { int64 number = 1; int64 amount = 2; int64 round = 3; int64 type = 4; int64 way = 5; int64 index = 6; int64 time = 7; string txHash = 8; } message LotteryBuyRecords { repeated LotteryBuyRecord records = 1; } message LotteryDrawRecord { int64 number = 1; int64 round = 2; int64 time = 3; string txHash = 4; } message LotteryDrawRecords { repeated LotteryDrawRecord records = 1; } message LotteryUpdateRec { int64 index = 1; int64 type = 2; } message LotteryUpdateRecs { repeated LotteryUpdateRec records = 1; } message LotteryUpdateBuyInfo { map buyInfo = 1; } message ReplyLotteryPurchaseAddr { repeated string address = 1; }