temp
This commit is contained in:
@@ -107,10 +107,18 @@ message UserInfoReq {
|
||||
message UserInfoResp{
|
||||
string username = 1;
|
||||
string phone = 2;
|
||||
string enterpriseAuthStatus = 3;
|
||||
string enterpriseName = 4;
|
||||
string creditCode = 5;
|
||||
string legalPerson = 6;
|
||||
int64 disable = 3;
|
||||
int64 quotaExceeded = 4;
|
||||
string enterpriseAuthStatus = 5;
|
||||
string enterpriseName = 6;
|
||||
string creditCode = 7;
|
||||
string legalPerson = 8;
|
||||
}
|
||||
message GetUserInfoResp{
|
||||
string username = 1;
|
||||
string phone = 2;
|
||||
int64 disable = 3;
|
||||
int64 quotaExceeded = 4;
|
||||
}
|
||||
|
||||
message GetEnterpriseAuthStatusReq {
|
||||
@@ -122,5 +130,142 @@ message GetEnterpriseAuthStatusResp {
|
||||
service User {
|
||||
// 获取用户信息
|
||||
rpc UserInfo(UserInfoReq) returns (UserInfoResp);
|
||||
|
||||
rpc GetUserInfo(UserInfoReq) returns (GetUserInfoResp);
|
||||
|
||||
rpc GetEnterpriseAuthStatus(GetEnterpriseAuthStatusReq) returns (GetEnterpriseAuthStatusResp);
|
||||
}
|
||||
|
||||
|
||||
// 定义钱包服务
|
||||
service WalletService {
|
||||
|
||||
|
||||
// 修改钱包余额
|
||||
rpc UpdateWallet (UpdateWalletRequest) returns (UpdateWalletResponse);
|
||||
|
||||
// 查询钱包信息
|
||||
rpc GetWallet (GetWalletRequest) returns (GetWalletResponse);
|
||||
|
||||
// 查询扣款记录
|
||||
rpc GetDeductions (GetDeductionsRequest) returns (GetDeductionsResponse);
|
||||
|
||||
rpc GetDeductionByTransactionId (GetDeductionByTransactionIdRequest) returns (GetDeductionByTransactionIdResponse);
|
||||
}
|
||||
|
||||
// 更新钱包余额
|
||||
message UpdateWalletRequest {
|
||||
int64 user_id = 1;
|
||||
string transaction_id = 2;
|
||||
string product_code = 3;
|
||||
string remark = 4;
|
||||
bool charge = 5;
|
||||
}
|
||||
|
||||
message UpdateWalletResponse {
|
||||
|
||||
}
|
||||
|
||||
// 查询钱包信息
|
||||
message GetWalletRequest {
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
message GetWalletResponse {
|
||||
int64 id = 1;
|
||||
int64 user_id = 2;
|
||||
double balance = 3;
|
||||
int64 version = 4;
|
||||
}
|
||||
|
||||
// 查询扣款记录
|
||||
message GetDeductionsRequest {
|
||||
int64 user_id = 1;
|
||||
int64 page = 2;
|
||||
int64 size = 3;
|
||||
}
|
||||
|
||||
message GetDeductionsResponse {
|
||||
repeated Deduction deductions = 1;
|
||||
}
|
||||
message GetDeductionByTransactionIdRequest {
|
||||
string transaction_id = 1;
|
||||
}
|
||||
message GetDeductionByTransactionIdResponse {
|
||||
int64 id = 1;
|
||||
int64 user_id = 2;
|
||||
double amount = 3;
|
||||
string transaction_id = 4;
|
||||
string created_at = 5;
|
||||
}
|
||||
message Deduction {
|
||||
int64 id = 1;
|
||||
int64 user_id = 2;
|
||||
double amount = 3;
|
||||
string transaction_id = 4;
|
||||
string created_at = 5;
|
||||
}
|
||||
|
||||
|
||||
service ApiRequestService {
|
||||
// 添加API请求记录
|
||||
rpc AddApiRequest (AddApiRequestRequest) returns (AddApiRequestResponse);
|
||||
|
||||
// 查询API请求记录
|
||||
rpc GetApiRequests (GetApiRequestsRequest) returns (GetApiRequestsResponse);
|
||||
|
||||
// 查询API请求记录ByTransactionId
|
||||
rpc GetApiRequestByTransactionId (GetApiRequestByTransactionIdRequest) returns (GetApiRequestByTransactionIdResponse);
|
||||
}
|
||||
// 添加API请求记录
|
||||
message AddApiRequestRequest {
|
||||
string transaction_id = 1;
|
||||
int64 user_id = 2;
|
||||
string product_code = 3;
|
||||
string status = 4;
|
||||
bool charges = 5;
|
||||
string remark = 6;
|
||||
string timestamp = 7;
|
||||
}
|
||||
|
||||
message AddApiRequestResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
// 查询API请求记录
|
||||
message GetApiRequestsRequest {
|
||||
int64 user_id = 1;
|
||||
int64 page = 2;
|
||||
int64 size = 3;
|
||||
}
|
||||
|
||||
message GetApiRequestsResponse {
|
||||
repeated ApiRequest api_requests = 1;
|
||||
}
|
||||
|
||||
message ApiRequest {
|
||||
int64 id = 1;
|
||||
string transaction_id = 2;
|
||||
int64 user_id = 3;
|
||||
string product_code = 4;
|
||||
string status = 5;
|
||||
double charges = 6;
|
||||
string remark = 7;
|
||||
string timestamp = 8;
|
||||
}
|
||||
|
||||
// 查询API请求记录
|
||||
message GetApiRequestByTransactionIdRequest {
|
||||
string transaction_id = 1;
|
||||
}
|
||||
|
||||
message GetApiRequestByTransactionIdResponse {
|
||||
int64 id = 1;
|
||||
string transaction_id = 2;
|
||||
int64 user_id = 3;
|
||||
string product_code = 4;
|
||||
string status = 5;
|
||||
double charges = 6;
|
||||
string remark = 7;
|
||||
string timestamp = 8;
|
||||
}
|
||||
Reference in New Issue
Block a user