update
This commit is contained in:
@@ -17,6 +17,7 @@ service ClubMembershipContract
|
||||
rpc GetClubMembership(GetClubMembershipRequest) returns (GetClubMembershipResponse);
|
||||
rpc GetAllClubMemberships(GetAllClubMembershipsRequest) returns (GetAllClubMembershipsResponse);
|
||||
rpc GetClubMembershipHistory(GetClubMembershipHistoryRequest) returns (GetClubMembershipHistoryResponse);
|
||||
rpc GetClubStatistics(GetClubStatisticsRequest) returns (GetClubStatisticsResponse);
|
||||
}
|
||||
|
||||
// Activate Command
|
||||
@@ -136,3 +137,40 @@ message ClubMembershipHistoryModel
|
||||
string reason = 12;
|
||||
google.protobuf.Timestamp created = 13;
|
||||
}
|
||||
|
||||
// GetClubStatistics Query
|
||||
message GetClubStatisticsRequest
|
||||
{
|
||||
// Empty - returns overall statistics
|
||||
}
|
||||
|
||||
message GetClubStatisticsResponse
|
||||
{
|
||||
int32 total_members = 1;
|
||||
int32 active_members = 2;
|
||||
int32 inactive_members = 3;
|
||||
int32 expired_members = 4;
|
||||
double active_percentage = 5;
|
||||
repeated PackageLevelDistribution package_distribution = 6;
|
||||
repeated MonthlyMembershipTrend monthly_trend = 7;
|
||||
int64 total_revenue = 8;
|
||||
double average_membership_duration_days = 9;
|
||||
int32 expiring_soon_count = 10;
|
||||
}
|
||||
|
||||
message PackageLevelDistribution
|
||||
{
|
||||
int64 package_id = 1;
|
||||
string package_name = 2;
|
||||
int32 member_count = 3;
|
||||
double percentage = 4;
|
||||
}
|
||||
|
||||
message MonthlyMembershipTrend
|
||||
{
|
||||
string month = 1;
|
||||
int32 activations = 2;
|
||||
int32 expirations = 3;
|
||||
int32 net_change = 4;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user