feat: add subordinate network tree query with security checks

This commit is contained in:
masoodafar-web
2025-12-18 03:14:37 +03:30
parent 4330ec3726
commit 5c03335f0b
6 changed files with 192 additions and 0 deletions
@@ -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;