refactor: update protobuf imports and add HTTP annotations

This commit is contained in:
masoodafar-web
2025-12-08 04:43:03 +03:30
parent fd3c17ac23
commit ca28678e8f
25 changed files with 207 additions and 53 deletions
@@ -1,5 +1,5 @@
using Foursat.BackOffice.BFF.ClubMembership.Protobuf;
using Foursat.BackOffice.BFF.ClubMembership.Protos;
using GetAllClubMembershipsRequest = CMSMicroservice.Protobuf.Protos.ClubMembership.GetAllClubMembershipsRequest;
namespace BackOffice.BFF.Application.ClubMembershipCQ.Queries.GetAllClubMembers;
@@ -1,4 +1,4 @@
using BackOffice.BFF.Commission.Protobuf;
using Foursat.BackOffice.BFF.Commission.Protos;
using Google.Protobuf.WellKnownTypes;
namespace BackOffice.BFF.Application.CommissionCQ.Commands.ProcessWithdrawal;
@@ -1,4 +1,4 @@
using BackOffice.BFF.Configuration.Protobuf;
using Foursat.BackOffice.BFF.Configuration.Protos;
using Google.Protobuf.WellKnownTypes;
namespace BackOffice.BFF.Application.ConfigurationCQ.Commands.CreateOrUpdateConfiguration;
@@ -1,4 +1,4 @@
using BackOffice.BFF.Configuration.Protobuf;
using Foursat.BackOffice.BFF.Configuration.Protos;
namespace BackOffice.BFF.Application.ConfigurationCQ.Commands.DeactivateConfiguration;
@@ -1,5 +1,5 @@
using BackOffice.BFF.Application.Common.Interfaces;
using BackOffice.BFF.Configuration.Protobuf;
using Foursat.BackOffice.BFF.Configuration.Protos;
using Google.Protobuf.WellKnownTypes;
using MediatR;
using Microsoft.Extensions.Logging;
@@ -1,4 +1,4 @@
using BackOffice.BFF.Configuration.Protobuf;
using Foursat.BackOffice.BFF.Configuration.Protos;
namespace BackOffice.BFF.Application.ConfigurationCQ.Queries.GetAllConfigurations;
@@ -1,5 +1,5 @@
using BackOffice.BFF.Application.Common.Interfaces;
using BackOffice.BFF.Configuration.Protobuf;
using Foursat.BackOffice.BFF.Configuration.Protos;
using MediatR;
using Microsoft.Extensions.Logging;
@@ -5,7 +5,7 @@ public record GetNetworkTreeQuery : IRequest<GetNetworkTreeResponseDto>
/// <summary>
/// شناسه کاربر ریشه (Root)
/// </summary>
public long RootUserId { get; init; }
public long UserId { get; init; }
/// <summary>
/// حداکثر عمق درخت (اختیاری، پیش‌فرض: 5)
@@ -14,6 +14,7 @@ public class GetNetworkTreeQueryHandler : IRequestHandler<GetNetworkTreeQuery, G
public async Task<GetNetworkTreeResponseDto> Handle(GetNetworkTreeQuery request, CancellationToken cancellationToken)
{
var x=request.Adapt<GetNetworkTreeRequest>();
var response = await _context.NetworkMemberships.GetNetworkTreeAsync(
request.Adapt<GetNetworkTreeRequest>(),
cancellationToken: cancellationToken);
@@ -28,20 +28,20 @@ public class NetworkTreeNodeDto
/// <summary>
/// موقعیت در شبکه (0=Left, 1=Right)
/// </summary>
public int NetworkLeg { get; set; }
public int? NetworkLeg { get; set; }
/// <summary>
/// سطح در شبکه
/// </summary>
public int NetworkLevel { get; set; }
public int? NetworkLevel { get; set; }
/// <summary>
/// وضعیت فعال/غیرفعال
/// </summary>
public bool IsActive { get; set; }
public bool? IsActive { get; set; }
/// <summary>
/// تاریخ عضویت
/// </summary>
public DateTime JoinedAt { get; set; }
public DateTime? JoinedAt { get; set; }
}