Add payment status to boolean mapping for protobuf
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Globalization;
|
||||
using CMSMicroservice.Protobuf.Protos;
|
||||
namespace BackOffice.BFF.Application.Common.Mappings;
|
||||
|
||||
public class GeneralMapping : IRegister
|
||||
@@ -60,5 +61,9 @@ public class GeneralMapping : IRegister
|
||||
|
||||
config.NewConfig<byte[], Google.Protobuf.ByteString>()
|
||||
.MapWith(src => Google.Protobuf.ByteString.CopyFrom(src));
|
||||
|
||||
// نگاشت وضعیت پرداخت پروتوباف به bool (فقط Success = true)
|
||||
config.NewConfig<PaymentStatus, bool>()
|
||||
.MapWith(src => src == PaymentStatus.Success);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user