feat: add subordinate network tree query with security checks
This commit is contained in:
+14
@@ -19,6 +19,13 @@ service NetworkMembershipContract
|
||||
};
|
||||
};
|
||||
|
||||
// دریافت درخت شبکه یک زیرمجموعه (با چک امنیتی)
|
||||
rpc GetSubordinateTree(GetSubordinateTreeRequest) returns (GetMyNetworkTreeResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/NetworkMembership/SubordinateTree/{target_user_id}"
|
||||
};
|
||||
};
|
||||
|
||||
// دریافت آمار شبکه کاربر جاری
|
||||
rpc GetMyNetworkStatistics(google.protobuf.Empty) returns (GetMyNetworkStatisticsResponse){
|
||||
option (google.api.http) = {
|
||||
@@ -40,6 +47,13 @@ message GetMyNetworkTreeRequest
|
||||
int32 max_depth = 1; // حداکثر عمق درخت (پیشفرض: 3)
|
||||
}
|
||||
|
||||
// ============ GetSubordinateTree ============
|
||||
message GetSubordinateTreeRequest
|
||||
{
|
||||
int64 target_user_id = 1; // شناسه زیرمجموعه مورد نظر
|
||||
int32 max_depth = 2; // حداکثر عمق درخت (پیشفرض: 3)
|
||||
}
|
||||
|
||||
message GetMyNetworkTreeResponse
|
||||
{
|
||||
NetworkNodeModel root_node = 1;
|
||||
|
||||
Reference in New Issue
Block a user