feat: add GetAvailableWeeks query and update protobuf imports
All checks were successful
Build and Deploy / build (push) Successful in 2m18s

This commit is contained in:
masoodafar-web
2025-12-12 05:57:32 +03:30
parent ce3b5db822
commit fe56b8f139
80 changed files with 308 additions and 238 deletions

View File

@@ -0,0 +1,21 @@
using BackOffice.BFF.Application.CommissionCQ.Queries.GetWeeklyPool;
using CMSMicroservice.Protobuf.Protos.Commission;
namespace BackOffice.BFF.Application.Common.Mappings;
public class CommissionProfile : IRegister
{
void IRegister.Register(TypeAdapterConfig config)
{
config.NewConfig< GetWeeklyCommissionPoolResponse,GetWeeklyPoolResponseDto>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.CalculatedAt, src => src.CalculatedAt)
.Map(dest => dest.IsCalculated, src => src.IsCalculated)
.Map(dest => dest.WeekNumber, src => src.WeekNumber)
.Map(dest => dest.TotalPoolAmount, src => src.TotalPoolAmount)
.Map(dest => dest.ValuePerBalance, src => src.ValuePerBalance)
.Map(dest => dest.TotalBalances, src => src.TotalBalances)
.Map(dest => dest.Created, src => src.Created.ToDateTimeOffset())
;
}
}

View File

@@ -51,6 +51,9 @@ public class GeneralMapping : IRegister
config.NewConfig<TimeSpan?, Duration>()
.MapWith(src => src.HasValue ? Duration.FromTimeSpan(src.Value) : null);
config.NewConfig<DateTimeOffset?, DateTime?>()
.MapWith(src => src.HasValue ? src.Value.DateTime : (DateTime?)null);
config.Default
.UseDestinationValue(member => member.SetterModifier == AccessModifier.None &&
member.Type.IsGenericType &&