Merge branch 'newmain'

This commit is contained in:
masoodafar-web
2025-11-24 23:22:18 +03:30
parent 744f71ce6c
commit 25eee4ede3
30 changed files with 69 additions and 370 deletions
@@ -1,49 +1,17 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Commands.CreateNewTransactions;
public record CreateNewTransactionsCommand : IRequest<CreateNewTransactionsResponseDto>
{
//
public string MerchantId { get; init; }
//
public long Amount { get; init; }
//
public string CallbackUrl { get; init; }
//
public string Description { get; init; }
//
public string? Mobile { get; init; }
//
public string? Email { get; init; }
//
public int? RequestStatusCode { get; init; }
//
public string? RequestStatusMessage { get; init; }
//
public string? Authority { get; init; }
//
public string? FeeType { get; init; }
//
public long? Fee { get; init; }
//
public int? Currency { get; init; }
//
public PaymentStatus PaymentStatus { get; init; }
//تاریخ پرداخت
public DateTime? PaymentDate { get; init; }
//
public int? VerificationStatusCode { get; init; }
//
public string? VerificationStatusMessage { get; init; }
//
public string? CardHash { get; init; }
//
public string? CardPan { get; init; }
//
public string? RefId { get; init; }
//
public string? OrderId { get; init; }
//
public TransactionType Type { get; init; }
}
@@ -3,12 +3,8 @@ public class CreateNewTransactionsCommandValidator : AbstractValidator<CreateNew
{
public CreateNewTransactionsCommandValidator()
{
RuleFor(model => model.MerchantId)
.NotEmpty();
RuleFor(model => model.Amount)
.NotNull();
RuleFor(model => model.CallbackUrl)
.NotEmpty();
RuleFor(model => model.Description)
.NotEmpty();
RuleFor(model => model.PaymentStatus)
@@ -1,51 +1,19 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Commands.UpdateTransactions;
public record UpdateTransactionsCommand : IRequest<Unit>
{
//
public long Id { get; init; }
//
public string MerchantId { get; init; }
//
public long Amount { get; init; }
//
public string CallbackUrl { get; init; }
//
public string Description { get; init; }
//
public string? Mobile { get; init; }
//
public string? Email { get; init; }
//
public int? RequestStatusCode { get; init; }
//
public string? RequestStatusMessage { get; init; }
//
public string? Authority { get; init; }
//
public string? FeeType { get; init; }
//
public long? Fee { get; init; }
//
public int? Currency { get; init; }
//
public PaymentStatus PaymentStatus { get; init; }
//تاریخ پرداخت
public DateTime? PaymentDate { get; init; }
//
public int? VerificationStatusCode { get; init; }
//
public string? VerificationStatusMessage { get; init; }
//
public string? CardHash { get; init; }
//
public string? CardPan { get; init; }
//
public string? RefId { get; init; }
//
public string? OrderId { get; init; }
//
public TransactionType Type { get; init; }
}
@@ -5,12 +5,8 @@ public class UpdateTransactionsCommandValidator : AbstractValidator<UpdateTransa
{
RuleFor(model => model.Id)
.NotNull();
RuleFor(model => model.MerchantId)
.NotEmpty();
RuleFor(model => model.Amount)
.NotNull();
RuleFor(model => model.CallbackUrl)
.NotEmpty();
RuleFor(model => model.Description)
.NotEmpty();
RuleFor(model => model.PaymentStatus)
@@ -1,5 +1,3 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
public record GetAllTransactionsByFilterQuery : IRequest<GetAllTransactionsByFilterResponseDto>
{
@@ -15,45 +13,15 @@ public record GetAllTransactionsByFilterQuery : IRequest<GetAllTransactionsByFil
//
public long? Id { get; set; }
//
public string? MerchantId { get; set; }
//
public long? Amount { get; set; }
//
public string? CallbackUrl { get; set; }
//
public string? Description { get; set; }
//
public string? Mobile { get; set; }
//
public string? Email { get; set; }
//
public int? RequestStatusCode { get; set; }
//
public string? RequestStatusMessage { get; set; }
//
public string? Authority { get; set; }
//
public string? FeeType { get; set; }
//
public long? Fee { get; set; }
//
public int? Currency { get; set; }
//
public PaymentStatus? PaymentStatus { get; set; }
//تاریخ پرداخت
public DateTime? PaymentDate { get; set; }
//
public int? VerificationStatusCode { get; set; }
//
public string? VerificationStatusMessage { get; set; }
//
public string? CardHash { get; set; }
//
public string? CardPan { get; set; }
//
public string? RefId { get; set; }
//
public long? OrderId { get; set; }
//
public TransactionType? Type { get; set; }
}
@@ -1,5 +1,3 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
public class GetAllTransactionsByFilterResponseDto
{
@@ -13,45 +11,15 @@ public class GetAllTransactionsByFilterResponseDto
//
public long Id { get; set; }
//
public string MerchantId { get; set; }
//
public long Amount { get; set; }
//
public string CallbackUrl { get; set; }
//
public string Description { get; set; }
//
public string? Mobile { get; set; }
//
public string? Email { get; set; }
//
public int? RequestStatusCode { get; set; }
//
public string? RequestStatusMessage { get; set; }
//
public string? Authority { get; set; }
//
public string? FeeType { get; set; }
//
public long? Fee { get; set; }
//
public int? Currency { get; set; }
//
public PaymentStatus PaymentStatus { get; set; }
//تاریخ پرداخت
public DateTime? PaymentDate { get; set; }
//
public int? VerificationStatusCode { get; set; }
//
public string? VerificationStatusMessage { get; set; }
//
public string? CardHash { get; set; }
//
public string? CardPan { get; set; }
//
public string? RefId { get; set; }
//
public string? OrderId { get; set; }
//
public TransactionType Type { get; set; }
}
@@ -1,51 +1,19 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetTransactions;
public class GetTransactionsResponseDto
{
//
public long Id { get; set; }
//
public string MerchantId { get; set; }
//
public long Amount { get; set; }
//
public string CallbackUrl { get; set; }
//
public string Description { get; set; }
//
public string? Mobile { get; set; }
//
public string? Email { get; set; }
//
public int? RequestStatusCode { get; set; }
//
public string? RequestStatusMessage { get; set; }
//
public string? Authority { get; set; }
//
public string? FeeType { get; set; }
//
public long? Fee { get; set; }
//
public int? Currency { get; set; }
//
public PaymentStatus PaymentStatus { get; set; }
//تاریخ پرداخت
public DateTime? PaymentDate { get; set; }
//
public int? VerificationStatusCode { get; set; }
//
public string? VerificationStatusMessage { get; set; }
//
public string? CardHash { get; set; }
//
public string? CardPan { get; set; }
//
public string? RefId { get; set; }
//
public string? OrderId { get; set; }
//
public TransactionType Type { get; set; }
}