syntax = "proto3";

package matchmaking.v1;

import "google/api/annotations.proto";

option go_package = "matchmaking-system/api/matchmaking/v1;v1";

service Order {
  // SharePreTrade 新股申购
  rpc SharePreTrade(SharePreRequest)returns(SharePreReply){
    option (google.api.http) = {
      post:"/order_sharepre/share_pre_trade",
      body:"*",
    };
  }
  // SharePreTradeByOrderNo 新股申购-订单号
  rpc SharePreTradeByOrderNo(SharePreRequest)returns(SharePreReply){
    option (google.api.http) = {
      post:"/order_sharepre/share_pre_trade_by_order_no",
      body:"*",
    };
  }
  // UpdateShareTradeStockId 更新股票代码stock_id
  rpc UpdateShareTradeStockId(ShareTradeStockIdRequest)returns(SharePreReply){
    option (google.api.http) = {
      post:"/order_sharepre/update_stock_id",
      body:"*",
    };
  }
  // ShareGiveaways 股票赠送
  rpc ShareGiveaways(SharePreRequest)returns(SharePreReply){
    option (google.api.http) = {
      post:"/order_sharepre/share_giveaways",
      body:"*",
    };
  }
  // UpdateShareAllStockId 更新全局的股票StockId
  rpc UpdateShareAllStockId(ShareNullRequest)returns(SharePreReply){
    option (google.api.http) = {
      post:"/order_sharepre/update_all_stock_id",
      body:"*",
    };
  }
}

message ShareTradeStockIdRequest{
  string code =1;// 股票代码
  string codeOld =2;// 旧股票代码
  int64 stock =3;// 股票市场
}

message SharePreRequest{
  string code =1;// 股票代码
  string id =2;// 新股申购-订单Id
  int32 stock =3;// 股票市场
}

message SharePreReply{
  int64 code =1;// 状态码
  string data =2;// 返回结果
  string message =3;// 返回消息提示
}

message ShareNullRequest{

}