支持购买套餐/续费套餐/用户账户操作等

This commit is contained in:
刘祥超
2021-11-08 20:52:21 +08:00
parent b82732af42
commit d92e987f7a
16 changed files with 3379 additions and 163 deletions

View File

@@ -8,8 +8,11 @@ import "models/model_user_plan.proto";
// 用户购买的套餐
service UserPlanService {
// 添加已购套餐
rpc createUserPlan(CreateUserPlanRequest) returns (CreateUserPlanResponse);
// 购套餐
rpc buyUserPlan(BuyUserPlanRequest) returns (BuyUserPlanResponse);
// 续费套餐
rpc renewUserPlan(RenewUserPlanRequest) returns (RPCSuccess);
// 查找单个已购套餐信息
rpc findEnabledUserPlan(FindEnabledUserPlanRequest) returns (FindEnabledUserPlanResponse);
@@ -28,16 +31,26 @@ service UserPlanService {
}
// 添加已购套餐
message CreateUserPlanRequest{
message BuyUserPlanRequest{
int64 userId = 1;
int64 planId = 2;
string dayTo = 3;
string period = 4;
int32 countPeriod = 5;
}
message CreateUserPlanResponse {
message BuyUserPlanResponse {
int64 userPlanId = 1;
}
// 续费套餐
message RenewUserPlanRequest {
int64 userPlanId = 1;
string dayTo = 3;
string period = 4;
int32 countPeriod = 5;
}
// 查找单个已购套餐信息
message FindEnabledUserPlanRequest {
int64 userPlanId = 1;