MarketingSystemDataExportTool/grpc/mix/mixv1/bank.proto

115 lines
2.8 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
import "validate/validate.proto";
import "mix/mixv1/common.proto";
package mixservice.mixv1;
option go_package = "./mix/mixv1;mixv1";
// 银行相关服务
service Bank {
// 获取所有开户行
rpc GetBank (GetBankReq) returns (GetBankResp) {}
// 获取行业类型
rpc GetBankIndustry (GetBankIndustryReq) returns (GetBankIndustryResp) {}
// 获取行业类型带父级
rpc GetBankIndustryWithParent(GetBankIndustryWithParentReq) returns (GetBankIndustryWithParentResp) {}
// 获取银行交易列表
rpc SearchBankTradeList(SearchBankTradeListReq) returns (SearchBankTradeListResp) {}
}
// 获取行业类型带父级请求
message GetBankIndustryWithParentReq {
string industry_mcc = 1 [(validate.rules).string = {len:4}];
}
// 获取行业类型带父级返回
message GetBankIndustryWithParentResp {
// 分类信息
BankIndustryInfo info = 1;
// 父级分类信息
BankIndustryInfo parent = 2;
}
// 获取所有开户行请求
message GetBankReq {
}
// 获取所有开户行返回
message GetBankResp {
repeated BankInfo list = 1;
}
// 获取行业类型请求
message GetBankIndustryReq {
// 父级id
int32 parent_id = 1;
}
// 获取行业类型返回
message GetBankIndustryResp {
repeated BankIndustryInfo list = 1;
}
message BankIndustryInfo {
uint32 id = 1;
// 类目名称
string name = 2;
// 类目代码
string mcc = 3;
// 父级id
uint32 parent_id = 4;
}
message BankInfo {
uint32 id = 1;
// 银行名称
string bank_name = 2;
// 字符型编码
string string_code = 3;
// 排序 大在前
int32 sort = 4;
}
// 银行交易列表请求参数
message SearchBankTradeListReq {
ReqPage page = 1; // 分页
double amount = 2; // 金额
string tag = 3; // 标签
string outside_acct_name = 4; // 收款方名称
int32 trade_start_time = 5; // 交易开始时间
int32 trade_end_time = 6; // 交易结束时间
}
// 交易状态
enum TradeStatus {
WAITING = 0; //待处理
SUCCESS = 1; //处理成功
FAIL = 2; //处理失败
}
// 银行交易信息
message BankTrade {
string bank = 1; // 银行标识
string serial_number = 2; // 交易流水号
double amount = 3; // 金额
string tag = 4; // 标签
string business_number = 5; // 附言业务ID
string trade_type = 6; // 交易类型(收入或支出)
int32 trade_time = 7; // 交易时间
string inside = 8; // 自身账户名称
string outside = 9; // 收款方名称
string data = 10; // 付款原始数据
TradeStatus status = 11; // 状态
int32 create_time = 12; // 创建时间
int32 update_time = 13; // 更新时间
string voucher = 14; // 交易凭证
string error_msg = 15; // 处理失败原因
}
// 银行交易列表返回参数
message SearchBankTradeListResp {
repeated BankTrade list = 1; // 列表
RespPage page = 2; // 分页
}