mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-02 09:06:36 +08:00
[账单]显示账单、手动生成账单
This commit is contained in:
12
pkg/rpc/protos/model_server_daily_stat.proto
Normal file
12
pkg/rpc/protos/model_server_daily_stat.proto
Normal file
@@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// 服务每日统计
|
||||
message ServerDailyStat {
|
||||
int64 serverId = 1;
|
||||
int64 regionId = 2;
|
||||
int64 bytes = 3;
|
||||
int64 createdAt = 4;
|
||||
}
|
||||
18
pkg/rpc/protos/model_user_bill.proto
Normal file
18
pkg/rpc/protos/model_user_bill.proto
Normal file
@@ -0,0 +1,18 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "model_user.proto";
|
||||
|
||||
message UserBill {
|
||||
int64 id = 1;
|
||||
User user = 2;
|
||||
string type = 3;
|
||||
string typeName = 4;
|
||||
string description = 5;
|
||||
float amount = 6;
|
||||
string month = 7;
|
||||
bool isPaid = 8;
|
||||
int64 paidAt = 9;
|
||||
}
|
||||
18
pkg/rpc/protos/service_server_daily_stat.proto
Normal file
18
pkg/rpc/protos/service_server_daily_stat.proto
Normal file
@@ -0,0 +1,18 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "model_server_daily_stat.proto";
|
||||
import "rpc_messages.proto";
|
||||
|
||||
// 服务统计相关服务
|
||||
service ServerDailyStatService {
|
||||
// 上传统计
|
||||
rpc uploadServerDailyStats (UploadServerDailyStatsRequest) returns (RPCSuccess);
|
||||
}
|
||||
|
||||
// 上传统计
|
||||
message UploadServerDailyStatsRequest {
|
||||
repeated ServerDailyStat stats = 1;
|
||||
}
|
||||
45
pkg/rpc/protos/service_user_bill.proto
Normal file
45
pkg/rpc/protos/service_user_bill.proto
Normal file
@@ -0,0 +1,45 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "rpc_messages.proto";
|
||||
import "model_user_bill.proto";
|
||||
|
||||
// 账单相关服务
|
||||
service UserBillService {
|
||||
// 手工生成订单
|
||||
rpc generateAllUserBills (GenerateAllUserBillsRequest) returns (RPCSuccess);
|
||||
|
||||
// 计算所有账单数量
|
||||
rpc countAllUserBills (CountAllUserBillsRequest) returns (RPCCountResponse);
|
||||
|
||||
// 列出单页账单
|
||||
rpc listUserBills (ListUserBillsRequest) returns (ListUserBillsResponse);
|
||||
}
|
||||
|
||||
// 手工生成订单
|
||||
message GenerateAllUserBillsRequest {
|
||||
string month = 1;
|
||||
}
|
||||
|
||||
// 计算所有账单数量
|
||||
message CountAllUserBillsRequest {
|
||||
int32 paidFlag = 1; // 0|1|-1
|
||||
int64 userId = 2;
|
||||
string month = 3;
|
||||
}
|
||||
|
||||
// 列出单页账单
|
||||
message ListUserBillsRequest {
|
||||
int32 paidFlag = 1;
|
||||
int64 userId = 2;
|
||||
string month = 5;
|
||||
|
||||
int64 offset = 3;
|
||||
int64 size = 4;
|
||||
}
|
||||
|
||||
message ListUserBillsResponse {
|
||||
repeated UserBill userBills = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user