mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-29 06:16:40 +08:00
重新实现套餐相关功能
This commit is contained in:
@@ -16,4 +16,7 @@ message Plan {
|
||||
double monthlyPrice = 9;
|
||||
double seasonallyPrice = 10;
|
||||
double yearlyPrice = 11;
|
||||
int32 totalServers = 13; // 可以添加的网站数
|
||||
int32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数
|
||||
int32 totalServerNames = 15; // 可以添加的域名总数
|
||||
}
|
||||
@@ -19,4 +19,5 @@ message ServerBandwidthStat {
|
||||
int64 countRequests = 12; // 总请求数
|
||||
int64 countCachedRequests = 13; // 总缓存请求数
|
||||
int64 countAttackRequests = 14; // 总攻击请求数
|
||||
int64 userPlanId = 15; // 绑定的用户套餐ID
|
||||
}
|
||||
@@ -8,15 +8,17 @@ import "models/model_plan.proto";
|
||||
import "models/model_server.proto";
|
||||
|
||||
message UserPlan {
|
||||
int64 id = 1;
|
||||
int64 userId = 2;
|
||||
int64 planId = 3;
|
||||
bool isOn = 4;
|
||||
string dayTo = 5;
|
||||
string name = 6;
|
||||
int64 id = 1; // 套餐ID
|
||||
int64 userId = 2; // 用户ID
|
||||
int64 planId = 3; // 套餐定义ID
|
||||
bool isOn = 4; // 是否启用
|
||||
string dayTo = 5; // 到期日期Y-m-d
|
||||
string name = 6; // 自定义备注名称
|
||||
|
||||
User user = 30;
|
||||
Plan plan = 31;
|
||||
Server server = 32;
|
||||
User user = 30; // 用户信息
|
||||
Plan plan = 31; // 套餐定义信息
|
||||
repeated Server servers = 33; // 绑定的网站列表
|
||||
|
||||
Server server = 32 [deprecated = true]; // 绑定的网站,已过期,使用 servers 代替
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ message CreatePlanRequest {
|
||||
float monthlyPrice = 7;
|
||||
float seasonallyPrice = 8;
|
||||
float yearlyPrice = 9;
|
||||
int32 totalServers = 11; // 可以添加的网站数
|
||||
int32 totalServerNamesPerServer = 12; // 每个网站可以添加的域名数
|
||||
int32 totalServerNames = 13; // 可以添加的域名总数
|
||||
}
|
||||
|
||||
message CreatePlanResponse {
|
||||
@@ -62,6 +65,9 @@ message UpdatePlanRequest {
|
||||
float monthlyPrice = 9;
|
||||
float seasonallyPrice = 10;
|
||||
float yearlyPrice = 11;
|
||||
int32 totalServers = 13; // 可以添加的网站数
|
||||
int32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数
|
||||
int32 totalServerNames = 15; // 可以添加的域名总数
|
||||
}
|
||||
|
||||
// 删除套餐
|
||||
|
||||
@@ -125,9 +125,18 @@ service ServerService {
|
||||
// 查找一个用户下的所有域名列表
|
||||
rpc findAllEnabledServerNamesWithUserId (FindAllEnabledServerNamesWithUserIdRequest) returns (FindAllEnabledServerNamesWithUserIdResponse);
|
||||
|
||||
// 计算一个用户下的所有域名数量
|
||||
rpc countAllServerNamesWithUserId (CountAllServerNamesWithUserIdRequest) returns (RPCCountResponse);
|
||||
|
||||
// 计算某个网站下的域名数量
|
||||
rpc countServerNames(CountServerNamesRequest) returns (RPCCountResponse);
|
||||
|
||||
// 查找一个用户下的所有网站
|
||||
rpc findAllUserServers(FindAllUserServersRequest) returns (FindAllUserServersResponse);
|
||||
|
||||
// 计算一个用户下的所有网站数量
|
||||
rpc countAllUserServers(CountAllUserServersRequest) returns (RPCCountResponse);
|
||||
|
||||
// 查找某个用户下的网站配置
|
||||
rpc composeAllUserServersConfig(ComposeAllUserServersConfigRequest) returns (ComposeAllUserServersConfigResponse);
|
||||
|
||||
@@ -368,6 +377,7 @@ message CountAllEnabledServersMatchRequest {
|
||||
int64 nodeClusterId = 4;
|
||||
int32 auditingFlag = 5;
|
||||
string protocolFamily = 6;
|
||||
int64 userPlanId = 7; // 用户套餐ID
|
||||
}
|
||||
|
||||
// 列出单页网站
|
||||
@@ -519,6 +529,17 @@ message FindAllEnabledServerNamesWithUserIdResponse {
|
||||
repeated string serverNames = 1;
|
||||
}
|
||||
|
||||
// 计算一个用户下的所有域名数量
|
||||
message CountAllServerNamesWithUserIdRequest {
|
||||
int64 userId = 1; // 用户ID
|
||||
int64 userPlanId = 2; // 用户套餐ID
|
||||
}
|
||||
|
||||
// 计算某个网站下的域名数量
|
||||
message CountServerNamesRequest {
|
||||
int64 serverId = 1; // 网站ID
|
||||
}
|
||||
|
||||
// 查找一个用户下的所有网站
|
||||
message FindAllUserServersRequest {
|
||||
int64 userId = 1;
|
||||
@@ -528,6 +549,12 @@ message FindAllUserServersResponse {
|
||||
repeated Server servers = 1; // 只返回一些简要信息
|
||||
}
|
||||
|
||||
// 计算一个用户下的所有网站数量
|
||||
message CountAllUserServersRequest {
|
||||
int64 userId = 1; // 用户ID
|
||||
int64 userPlanId = 2; // 用户套餐ID
|
||||
}
|
||||
|
||||
// 查找某个用户下的网站配置
|
||||
message ComposeAllUserServersConfigRequest {
|
||||
int64 userId = 1;
|
||||
|
||||
Reference in New Issue
Block a user