重新实现套餐相关功能

This commit is contained in:
刘祥超
2023-09-06 16:31:14 +08:00
parent 972b487db8
commit 2497a81e09
16 changed files with 1600 additions and 972 deletions

View File

@@ -16,4 +16,7 @@ message Plan {
double monthlyPrice = 9;
double seasonallyPrice = 10;
double yearlyPrice = 11;
int32 totalServers = 13; // 可以添加的网站数
int32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数
int32 totalServerNames = 15; // 可以添加的域名总数
}

View File

@@ -19,4 +19,5 @@ message ServerBandwidthStat {
int64 countRequests = 12; // 总请求数
int64 countCachedRequests = 13; // 总缓存请求数
int64 countAttackRequests = 14; // 总攻击请求数
int64 userPlanId = 15; // 绑定的用户套餐ID
}

View File

@@ -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 代替
}