syntax = "proto3";

package stats;

option go_package = "github.com/echofi-ai/backend/types/stats";

import "stats/user_statistics.proto";
import "stats/point_boost.proto";

// StatsService defines the gRPC service for statistics operations
service StatsService {
  // GetUserStatistics retrieves user statistics by user ID
  rpc GetUserStatistics(GetUserStatisticsRequest) returns (GetUserStatisticsResponse) {}

  // ListUserStatistics retrieves user statistics with pagination
  rpc ListUserStatistics(ListUserStatisticsRequest) returns (ListUserStatisticsResponse) {}

  // GetPointBoost retrieves a point boost by ID
  rpc GetPointBoost(GetPointBoostRequest) returns (GetPointBoostResponse) {}

  // ListPointBoosts retrieves point boosts with pagination
  rpc ListPointBoosts(ListPointBoostsRequest) returns (ListPointBoostsResponse) {}


}

// User Statistics requests and responses
message GetUserStatisticsRequest {
  string user_id = 1;
}

message GetUserStatisticsResponse {
  UserStatistics statistics = 1;
}

message ListUserStatisticsRequest {
  int32 offset = 1;
  int32 limit = 2;
}

message ListUserStatisticsResponse {
  repeated UserStatistics statistics = 1;
  int64 total = 2;
  int32 offset = 3;
  int32 limit = 4;
}

// Point Boost requests and responses
message GetPointBoostRequest {
  int32 boost_id = 1;
}

message GetPointBoostResponse {
  PointBoost boost = 1;
}

message ListPointBoostsRequest {
  int32 offset = 1;
  int32 limit = 2;
  optional string user_id = 3; // Filter by user
  optional bool is_active = 4; // Filter by active status
}

message ListPointBoostsResponse {
  repeated PointBoost boosts = 1;
  int64 total = 2;
  int32 offset = 3;
  int32 limit = 4;
}


