namespace CMSMicroservice.WebApi.Common.Mappings;

public class TransactionsProfile : IRegister
{
    void IRegister.Register(TypeAdapterConfig config)
    {       
        config.NewConfig<Protobuf.Protos.Transactions.GetAllTransactionsByFilterRequest, Application.TransactionsCQ.Queries.GetAllTransactionsByFilter.GetAllTransactionsByFilterQuery>()
        .IgnoreIf((src, dest) => !src.Filter.HasPaymentStatus, dest => dest.Filter.PaymentStatus)
        .IgnoreIf((src, dest) => !src.Filter.HasType, dest => dest.Filter.Type);
    }
}
