syntax = "proto3";

option go_package = "common/proto/ss/grpc_pb";
import "ss_common.proto";
import "google/api/annotations.proto";

service User {
  rpc Login(LoginReq) returns (LoginResp) {}
  rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
    option (google.api.http) = {
      post: "/user/info"
      body: "*"
    };
  }
}

message LoginReq {
  string Phone = 1 [json_name = "phone"]; // 手机号
  string Code = 2 [json_name = "code"]; // 验证码
}

message LoginResp {
  int64 USN = 1 [json_name = "usn"]; // 用户ID
  string Name = 2 [json_name = "name"]; // 用户名
}

message GetUserInfoReq {
  int64 USN = 1 [json_name = "usn"]; 
}

message GetUserInfoResp {
  int64 USN = 1 [json_name = "usn"]; 
  string Name = 2 [json_name = "name"]; 
}