MarketingSystemDataExportTool/grpc/mix/financev1/collection_account.proto

188 lines
3.8 KiB
Protocol Buffer

syntax = "proto3";
package mixservice.financev1;
import "validate/validate.proto";
option go_package = "./mix/financev1;financev1";
// 收款账户服务
service CollectionAccount {
// 获取收款账户列表
rpc GetList (GetListReq) returns (GetListResp) {}
// 添加收款账户
rpc Create(CreateReq) returns (CreateResp) {}
// 更新收款账户
rpc Update(UpdateReq) returns (UpdateResp) {}
// 收款账户详情
rpc Detail(DetailReq) returns (DetailResp) {}
// 删除收款账户
rpc Delete(DeleteReq) returns (DeleteResp) {}
// 获得可用收款账户
rpc GetEnableList (GetEnableListReq) returns (GetEnableListResp) {}
// 获取所有平台
rpc GetAllPlatform (GetAllPlatformReq) returns (GetAllPlatformResp) {}
}
// 收款账户枚举
enum CollectionAccountType {
Unknown = 0;
// 个人账户
Personal = 1;
// 公司账户
Company = 2;
}
// 获取收款账户列表请求
message GetListReq {
// 页码
int32 page = 1;
// 每页条数
int32 limit = 2;
// ID列表
repeated int32 ids = 3;
}
// 获取收款账户列表返回
message GetListResp {
// 数据量
int32 data_count = 1;
// 数据列表
repeated AccountEntity list = 2;
}
// 收款账户实体
message AccountEntity {
// ID
int32 id = 1;
// 账户类型
CollectionAccountType type = 2;
// 开户行/平台
string platform = 3;
// 开户行信息
string bank_info = 4;
// 账号
string account = 5;
// 开户名
string open_name = 6;
// 开户时间
int64 open_time = 7;
// 备注
string remark = 8;
// 创建时间
int64 create_time = 9;
// 更新时间
int64 update_time = 10;
// 累计收款
double received = 11;
// 累计到账
double collected = 12;
// 账户状态
int32 status = 13;
}
// 添加收款账户请求
message CreateReq {
// 账户类型
CollectionAccountType type = 1 [(validate.rules).enum = {in: [1, 2]}];
// 开户行/平台
string platform = 2;
// 开户行信息
string bank_info = 3;
// 账号
string account = 4;
// 开户名
string open_name = 5 [(validate.rules).string.max_len = 50];
// 开户时间
int64 open_time = 6;
// 备注
string remark = 7 [(validate.rules).string.max_len = 100];
// 状态
int32 status = 8 [(validate.rules).int32 = {in: [0, 1]}];
}
// 添加收款账户返回
message CreateResp {
}
// 更新收款账户请求
message UpdateReq {
// 账户类型
CollectionAccountType type = 1 [(validate.rules).enum = {in: [1, 2]}];
// 开户行/平台
string platform = 2;
// 开户行信息
string bank_info = 3;
// 账号
string account = 4;
// 开户名
string open_name = 5 [(validate.rules).string.max_len = 50];
// 开户时间
int64 open_time = 6;
// 备注
string remark = 7 [(validate.rules).string.max_len = 100];
// 状态
int32 status = 8 [(validate.rules).int32 = {in: [0, 1]}];
// ID
int64 id = 9 [(validate.rules).int64.gt = 0];
}
// 更新收款账户返回
message UpdateResp {
}
// 收款账户详情请求
message DetailReq {
// ID
int64 id = 1 [(validate.rules).int64.gt = 0];
}
// 收款账户详情返回
message DetailResp {
// 收款账户详情
AccountEntity data = 1;
}
// 删除收款账户请求
message DeleteReq {
// ID
int64 id = 1 [(validate.rules).int64.gt = 0];
}
// 删除收款账户返回
message DeleteResp {
}
// 获得可用收款账户请求
message GetEnableListReq {
}
// 获得可用收款账户返回
message GetEnableListResp {
repeated EnableListEntity list = 1;
}
message EnableListEntity {
// ID
int64 id = 1;
// 账号
string account = 2;
// 开户行/平台
string platform = 3;
// 账号类型
CollectionAccountType type = 4;
// 开户名
string open_name = 5;
}
// 获取所有平台请求
message GetAllPlatformReq {
}
// 获取所有平台返回
message GetAllPlatformResp {
// 平台信息
map<int32, string> data = 1;
}