wallet.proto 708 Bytes
Newer Older
kzkzzzz's avatar
kzkzzzz committed
1 2 3 4 5 6
syntax = "proto3";

import "google/protobuf/timestamp.proto";

option go_package = "./;wallet";

7 8 9 10 11 12 13 14 15 16 17 18 19

enum GoldType  {
  typeNone = 0;
  typeCharge = 59;
  typeAdd = 60;
}

message AddGoldReq {
  int64 userId = 1; // @gotags: validate:"required"
  float goldNum = 2; // @gotags: validate:"required,gt=0"
  GoldType type = 3;
  int64 adminUserId = 4;
  string remark = 5;
kzkzzzz's avatar
kzkzzzz committed
20 21
}

22
message AddGoldResp {
kzkzzzz's avatar
kzkzzzz committed
23 24
}

25 26 27 28
message ChargeOneReq {
  int64 userId = 1; // @gotags: validate:"required"
  float goldNum = 2; // @gotags: validate:"required,gt=0"
  GoldType type = 3;
kzkzzzz's avatar
kzkzzzz committed
29 30
}

31 32
message ChargeOneResp {

kzkzzzz's avatar
kzkzzzz committed
33 34 35
}

service Wallet {
36 37
  rpc AddGold(AddGoldReq) returns (AddGoldResp){};
  rpc ChargeOne(ChargeOneReq) returns (ChargeOneResp){};
kzkzzzz's avatar
kzkzzzz committed
38 39
}