Merge branch 'newmain'
This commit is contained in:
@@ -7,6 +7,8 @@ public class CreateNewTagCommandValidator : AbstractValidator<CreateNewTagComman
|
|||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.Title)
|
RuleFor(model => model.Title)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
|
RuleFor(model => model.IsActive)
|
||||||
|
.NotNull();
|
||||||
RuleFor(model => model.SortOrder)
|
RuleFor(model => model.SortOrder)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
}
|
}
|
||||||
@@ -18,4 +20,3 @@ public class CreateNewTagCommandValidator : AbstractValidator<CreateNewTagComman
|
|||||||
return result.Errors.Select(e => e.ErrorMessage);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ public class UpdateTagCommandValidator : AbstractValidator<UpdateTagCommand>
|
|||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.Title)
|
RuleFor(model => model.Title)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
|
RuleFor(model => model.IsActive)
|
||||||
|
.NotNull();
|
||||||
RuleFor(model => model.SortOrder)
|
RuleFor(model => model.SortOrder)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
}
|
}
|
||||||
@@ -20,4 +22,3 @@ public class UpdateTagCommandValidator : AbstractValidator<UpdateTagCommand>
|
|||||||
return result.Errors.Select(e => e.ErrorMessage);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,49 +1,17 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.TransactionsCQ.Commands.CreateNewTransactions;
|
namespace CMSMicroservice.Application.TransactionsCQ.Commands.CreateNewTransactions;
|
||||||
public record CreateNewTransactionsCommand : IRequest<CreateNewTransactionsResponseDto>
|
public record CreateNewTransactionsCommand : IRequest<CreateNewTransactionsResponseDto>
|
||||||
{
|
{
|
||||||
//
|
|
||||||
public string MerchantId { get; init; }
|
|
||||||
//
|
//
|
||||||
public long Amount { get; init; }
|
public long Amount { get; init; }
|
||||||
//
|
//
|
||||||
public string CallbackUrl { get; init; }
|
|
||||||
//
|
|
||||||
public string Description { 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 PaymentStatus PaymentStatus { get; init; }
|
||||||
//تاریخ پرداخت
|
//تاریخ پرداخت
|
||||||
public DateTime? PaymentDate { 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? RefId { get; init; }
|
||||||
//
|
//
|
||||||
public string? OrderId { get; init; }
|
|
||||||
//
|
|
||||||
public TransactionType Type { get; init; }
|
public TransactionType Type { get; init; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,12 +3,8 @@ public class CreateNewTransactionsCommandValidator : AbstractValidator<CreateNew
|
|||||||
{
|
{
|
||||||
public CreateNewTransactionsCommandValidator()
|
public CreateNewTransactionsCommandValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.MerchantId)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Amount)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.CallbackUrl)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Description)
|
RuleFor(model => model.Description)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.PaymentStatus)
|
RuleFor(model => model.PaymentStatus)
|
||||||
|
|||||||
@@ -1,51 +1,19 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.TransactionsCQ.Commands.UpdateTransactions;
|
namespace CMSMicroservice.Application.TransactionsCQ.Commands.UpdateTransactions;
|
||||||
public record UpdateTransactionsCommand : IRequest<Unit>
|
public record UpdateTransactionsCommand : IRequest<Unit>
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
public long Id { get; init; }
|
public long Id { get; init; }
|
||||||
//
|
//
|
||||||
public string MerchantId { get; init; }
|
|
||||||
//
|
|
||||||
public long Amount { get; init; }
|
public long Amount { get; init; }
|
||||||
//
|
//
|
||||||
public string CallbackUrl { get; init; }
|
|
||||||
//
|
|
||||||
public string Description { 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 PaymentStatus PaymentStatus { get; init; }
|
||||||
//تاریخ پرداخت
|
//تاریخ پرداخت
|
||||||
public DateTime? PaymentDate { 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? RefId { get; init; }
|
||||||
//
|
//
|
||||||
public string? OrderId { get; init; }
|
|
||||||
//
|
|
||||||
public TransactionType Type { get; init; }
|
public TransactionType Type { get; init; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,12 +5,8 @@ public class UpdateTransactionsCommandValidator : AbstractValidator<UpdateTransa
|
|||||||
{
|
{
|
||||||
RuleFor(model => model.Id)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.MerchantId)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Amount)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.CallbackUrl)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Description)
|
RuleFor(model => model.Description)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.PaymentStatus)
|
RuleFor(model => model.PaymentStatus)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
|
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
|
||||||
public record GetAllTransactionsByFilterQuery : IRequest<GetAllTransactionsByFilterResponseDto>
|
public record GetAllTransactionsByFilterQuery : IRequest<GetAllTransactionsByFilterResponseDto>
|
||||||
{
|
{
|
||||||
@@ -15,45 +13,15 @@ public record GetAllTransactionsByFilterQuery : IRequest<GetAllTransactionsByFil
|
|||||||
//
|
//
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
//
|
//
|
||||||
public string? MerchantId { get; set; }
|
|
||||||
//
|
|
||||||
public long? Amount { get; set; }
|
public long? Amount { get; set; }
|
||||||
//
|
//
|
||||||
public string? CallbackUrl { get; set; }
|
|
||||||
//
|
|
||||||
public string? Description { 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 PaymentStatus? PaymentStatus { get; set; }
|
||||||
//تاریخ پرداخت
|
//تاریخ پرداخت
|
||||||
public DateTime? PaymentDate { 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? RefId { get; set; }
|
||||||
//
|
//
|
||||||
public long? OrderId { get; set; }
|
|
||||||
//
|
|
||||||
public TransactionType? Type { get; set; }
|
public TransactionType? Type { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
|
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
|
||||||
public class GetAllTransactionsByFilterResponseDto
|
public class GetAllTransactionsByFilterResponseDto
|
||||||
{
|
{
|
||||||
@@ -13,45 +11,15 @@ public class GetAllTransactionsByFilterResponseDto
|
|||||||
//
|
//
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
//
|
//
|
||||||
public string MerchantId { get; set; }
|
|
||||||
//
|
|
||||||
public long Amount { get; set; }
|
public long Amount { get; set; }
|
||||||
//
|
//
|
||||||
public string CallbackUrl { get; set; }
|
|
||||||
//
|
|
||||||
public string Description { 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 PaymentStatus PaymentStatus { get; set; }
|
||||||
//تاریخ پرداخت
|
//تاریخ پرداخت
|
||||||
public DateTime? PaymentDate { 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? RefId { get; set; }
|
||||||
//
|
//
|
||||||
public string? OrderId { get; set; }
|
|
||||||
//
|
|
||||||
public TransactionType Type { get; set; }
|
public TransactionType Type { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,51 +1,19 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetTransactions;
|
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetTransactions;
|
||||||
public class GetTransactionsResponseDto
|
public class GetTransactionsResponseDto
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
//
|
//
|
||||||
public string MerchantId { get; set; }
|
|
||||||
//
|
|
||||||
public long Amount { get; set; }
|
public long Amount { get; set; }
|
||||||
//
|
//
|
||||||
public string CallbackUrl { get; set; }
|
|
||||||
//
|
|
||||||
public string Description { 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 PaymentStatus PaymentStatus { get; set; }
|
||||||
//تاریخ پرداخت
|
//تاریخ پرداخت
|
||||||
public DateTime? PaymentDate { 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? RefId { get; set; }
|
||||||
//
|
//
|
||||||
public string? OrderId { get; set; }
|
|
||||||
//
|
|
||||||
public TransactionType Type { get; set; }
|
public TransactionType Type { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.UserOrderCQ.Commands.CreateNewUserOrder;
|
namespace CMSMicroservice.Application.UserOrderCQ.Commands.CreateNewUserOrder;
|
||||||
public record CreateNewUserOrderCommand : IRequest<CreateNewUserOrderResponseDto>
|
public record CreateNewUserOrderCommand : IRequest<CreateNewUserOrderResponseDto>
|
||||||
{
|
{
|
||||||
//قیمت
|
//قیمت
|
||||||
public long Price { get; init; }
|
public long Amount { get; init; }
|
||||||
//شناسه پکیج
|
//شناسه پکیج
|
||||||
public long PackageId { get; init; }
|
public long PackageId { get; init; }
|
||||||
//شناسه تراکنش
|
//شناسه تراکنش
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ public class CreateNewUserOrderCommandValidator : AbstractValidator<CreateNewUse
|
|||||||
{
|
{
|
||||||
public CreateNewUserOrderCommandValidator()
|
public CreateNewUserOrderCommandValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.Price)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.PackageId)
|
RuleFor(model => model.PackageId)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.UserOrderCQ.Commands.UpdateUserOrder;
|
namespace CMSMicroservice.Application.UserOrderCQ.Commands.UpdateUserOrder;
|
||||||
public record UpdateUserOrderCommand : IRequest<Unit>
|
public record UpdateUserOrderCommand : IRequest<Unit>
|
||||||
{
|
{
|
||||||
//شناسه
|
//شناسه
|
||||||
public long Id { get; init; }
|
public long Id { get; init; }
|
||||||
//قیمت
|
//قیمت
|
||||||
public long Price { get; init; }
|
public long Amount { get; init; }
|
||||||
//شناسه پکیج
|
//شناسه پکیج
|
||||||
public long PackageId { get; init; }
|
public long PackageId { get; init; }
|
||||||
//شناسه تراکنش
|
//شناسه تراکنش
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ public class UpdateUserOrderCommandValidator : AbstractValidator<UpdateUserOrder
|
|||||||
{
|
{
|
||||||
RuleFor(model => model.Id)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.Price)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.PackageId)
|
RuleFor(model => model.PackageId)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetAllUserOrderByFilter;
|
namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetAllUserOrderByFilter;
|
||||||
public record GetAllUserOrderByFilterQuery : IRequest<GetAllUserOrderByFilterResponseDto>
|
public record GetAllUserOrderByFilterQuery : IRequest<GetAllUserOrderByFilterResponseDto>
|
||||||
{
|
{
|
||||||
@@ -15,7 +13,7 @@ public record GetAllUserOrderByFilterQuery : IRequest<GetAllUserOrderByFilterRes
|
|||||||
//شناسه
|
//شناسه
|
||||||
public long? Id { get; set; }
|
public long? Id { get; set; }
|
||||||
//قیمت
|
//قیمت
|
||||||
public long? Price { get; set; }
|
public long? Amount { get; set; }
|
||||||
//شناسه پکیج
|
//شناسه پکیج
|
||||||
public long? PackageId { get; set; }
|
public long? PackageId { get; set; }
|
||||||
//شناسه تراکنش
|
//شناسه تراکنش
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetAllUserOrderByFilter;
|
namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetAllUserOrderByFilter;
|
||||||
public class GetAllUserOrderByFilterResponseDto
|
public class GetAllUserOrderByFilterResponseDto
|
||||||
{
|
{
|
||||||
@@ -13,7 +11,7 @@ public class GetAllUserOrderByFilterResponseDto
|
|||||||
//شناسه
|
//شناسه
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
//قیمت
|
//قیمت
|
||||||
public long Price { get; set; }
|
public long Amount { get; set; }
|
||||||
//شناسه پکیج
|
//شناسه پکیج
|
||||||
public long PackageId { get; set; }
|
public long PackageId { get; set; }
|
||||||
//شناسه تراکنش
|
//شناسه تراکنش
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetUserOrder;
|
namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetUserOrder;
|
||||||
public class GetUserOrderResponseDto
|
public class GetUserOrderResponseDto
|
||||||
{
|
{
|
||||||
//شناسه
|
//شناسه
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
//قیمت
|
//قیمت
|
||||||
public long Price { get; set; }
|
public long Amount { get; set; }
|
||||||
//شناسه پکیج
|
//شناسه پکیج
|
||||||
public long PackageId { get; set; }
|
public long PackageId { get; set; }
|
||||||
//شناسه تراکنش
|
//شناسه تراکنش
|
||||||
|
|||||||
@@ -1,31 +1,12 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Domain.Entities;
|
namespace CMSMicroservice.Domain.Entities;
|
||||||
//آدرس کاربر
|
//آدرس کاربر
|
||||||
public class Transactions : BaseAuditableEntity
|
public class Transactions : BaseAuditableEntity
|
||||||
{
|
{
|
||||||
public string MerchantId { get; set; }
|
|
||||||
public long Amount { get; set; }
|
public long Amount { get; set; }
|
||||||
public string CallbackUrl { get; set; }
|
|
||||||
public string Description { 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 PaymentStatus PaymentStatus { get; set; }
|
||||||
//تاریخ پرداخت
|
//تاریخ پرداخت
|
||||||
public DateTime? PaymentDate { 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? RefId { get; set; }
|
||||||
public long? OrderId { get; set; }
|
|
||||||
//Order Navigation Property
|
|
||||||
public virtual UserOrder? Order { get; set; }
|
|
||||||
public TransactionType Type { get; set; }
|
public TransactionType Type { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
using CMSMicroservice.Domain.Enums;
|
|
||||||
|
|
||||||
namespace CMSMicroservice.Domain.Entities;
|
namespace CMSMicroservice.Domain.Entities;
|
||||||
//سفارش کاربر
|
//سفارش کاربر
|
||||||
public class UserOrder : BaseAuditableEntity
|
public class UserOrder : BaseAuditableEntity
|
||||||
{
|
{
|
||||||
//قیمت
|
//قیمت
|
||||||
public long Price { get; set; }
|
public long Amount { get; set; }
|
||||||
//شناسه پکیج
|
//شناسه پکیج
|
||||||
public long PackageId { get; set; }
|
public long? PackageId { get; set; }
|
||||||
//Package Navigation Property
|
//Package Navigation Property
|
||||||
public virtual Package Package { get; set; }
|
public virtual Package? Package { get; set; }
|
||||||
//شناسه تراکنش
|
//شناسه تراکنش
|
||||||
public long? TransactionId { get; set; }
|
public long? TransactionId { get; set; }
|
||||||
//وضعیت پرداخت
|
//وضعیت پرداخت
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
using CMSMicroservice.Domain.Entities;
|
using CMSMicroservice.Domain.Entities;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
|
||||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||||
|
//دسته بندی
|
||||||
public class CategoryConfiguration : IEntityTypeConfiguration<Category>
|
public class CategoryConfiguration : IEntityTypeConfiguration<Category>
|
||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<Category> builder)
|
public void Configure(EntityTypeBuilder<Category> builder)
|
||||||
@@ -12,19 +11,17 @@ public class CategoryConfiguration : IEntityTypeConfiguration<Category>
|
|||||||
builder.Ignore(entity => entity.DomainEvents);
|
builder.Ignore(entity => entity.DomainEvents);
|
||||||
builder.HasKey(entity => entity.Id);
|
builder.HasKey(entity => entity.Id);
|
||||||
builder.Property(entity => entity.Id).UseIdentityColumn();
|
builder.Property(entity => entity.Id).UseIdentityColumn();
|
||||||
|
|
||||||
builder.Property(entity => entity.Name).IsRequired(true);
|
builder.Property(entity => entity.Name).IsRequired(true);
|
||||||
builder.Property(entity => entity.Title).IsRequired(true);
|
builder.Property(entity => entity.Title).IsRequired(true);
|
||||||
builder.Property(entity => entity.Description).IsRequired(false);
|
builder.Property(entity => entity.Description).IsRequired(false);
|
||||||
builder.Property(entity => entity.ImagePath).IsRequired(false);
|
builder.Property(entity => entity.ImagePath).IsRequired(false);
|
||||||
builder.Property(entity => entity.IsActive).IsRequired(true);
|
|
||||||
builder.Property(entity => entity.SortOrder).IsRequired(true);
|
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.HasOne(entity => entity.Parent)
|
.HasOne(entity => entity.Parent)
|
||||||
.WithMany(entity => entity.Categorys)
|
.WithMany(entity => entity.Categorys)
|
||||||
.HasForeignKey(entity => entity.ParentId)
|
.HasForeignKey(entity => entity.ParentId)
|
||||||
.IsRequired(false);
|
.IsRequired(false);
|
||||||
}
|
builder.Property(entity => entity.IsActive).IsRequired(true);
|
||||||
}
|
builder.Property(entity => entity.SortOrder).IsRequired(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,30 +11,11 @@ public class TransactionsConfiguration : IEntityTypeConfiguration<Transactions>
|
|||||||
builder.Ignore(entity => entity.DomainEvents);
|
builder.Ignore(entity => entity.DomainEvents);
|
||||||
builder.HasKey(entity => entity.Id);
|
builder.HasKey(entity => entity.Id);
|
||||||
builder.Property(entity => entity.Id).UseIdentityColumn();
|
builder.Property(entity => entity.Id).UseIdentityColumn();
|
||||||
builder.Property(entity => entity.MerchantId).IsRequired(true);
|
|
||||||
builder.Property(entity => entity.Amount).IsRequired(true);
|
builder.Property(entity => entity.Amount).IsRequired(true);
|
||||||
builder.Property(entity => entity.CallbackUrl).IsRequired(true);
|
|
||||||
builder.Property(entity => entity.Description).IsRequired(true);
|
builder.Property(entity => entity.Description).IsRequired(true);
|
||||||
builder.Property(entity => entity.Mobile).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.Email).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.RequestStatusCode).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.RequestStatusMessage).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.Authority).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.FeeType).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.Fee).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.Currency).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.PaymentStatus).IsRequired(true);
|
builder.Property(entity => entity.PaymentStatus).IsRequired(true);
|
||||||
builder.Property(entity => entity.PaymentDate).IsRequired(false);
|
builder.Property(entity => entity.PaymentDate).IsRequired(false);
|
||||||
builder.Property(entity => entity.VerificationStatusCode).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.VerificationStatusMessage).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.CardHash).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.CardPan).IsRequired(false);
|
|
||||||
builder.Property(entity => entity.RefId).IsRequired(false);
|
builder.Property(entity => entity.RefId).IsRequired(false);
|
||||||
builder
|
|
||||||
.HasOne(entity => entity.Order)
|
|
||||||
.WithMany(entity => entity.Transactionss)
|
|
||||||
.HasForeignKey(entity => entity.OrderId)
|
|
||||||
.IsRequired(false);
|
|
||||||
builder.Property(entity => entity.Type).IsRequired(true);
|
builder.Property(entity => entity.Type).IsRequired(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
using CMSMicroservice.Domain.Entities;
|
using CMSMicroservice.Domain.Entities;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
|
||||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||||
|
//سفارش کاربر
|
||||||
public class UserOrderConfiguration : IEntityTypeConfiguration<UserOrder>
|
public class UserOrderConfiguration : IEntityTypeConfiguration<UserOrder>
|
||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<UserOrder> builder)
|
public void Configure(EntityTypeBuilder<UserOrder> builder)
|
||||||
@@ -12,12 +11,12 @@ public class UserOrderConfiguration : IEntityTypeConfiguration<UserOrder>
|
|||||||
builder.Ignore(entity => entity.DomainEvents);
|
builder.Ignore(entity => entity.DomainEvents);
|
||||||
builder.HasKey(entity => entity.Id);
|
builder.HasKey(entity => entity.Id);
|
||||||
builder.Property(entity => entity.Id).UseIdentityColumn();
|
builder.Property(entity => entity.Id).UseIdentityColumn();
|
||||||
builder.Property(entity => entity.Price).IsRequired(true);
|
builder.Property(entity => entity.Amount).IsRequired(true);
|
||||||
builder
|
builder
|
||||||
.HasOne(entity => entity.Package)
|
.HasOne(entity => entity.Package)
|
||||||
.WithMany(entity => entity.UserOrders)
|
.WithMany(entity => entity.UserOrders)
|
||||||
.HasForeignKey(entity => entity.PackageId)
|
.HasForeignKey(entity => entity.PackageId)
|
||||||
.IsRequired(true);
|
.IsRequired(false);
|
||||||
builder.Property(entity => entity.TransactionId).IsRequired(false);
|
builder.Property(entity => entity.TransactionId).IsRequired(false);
|
||||||
builder.Property(entity => entity.PaymentStatus).IsRequired(true);
|
builder.Property(entity => entity.PaymentStatus).IsRequired(true);
|
||||||
builder.Property(entity => entity.PaymentDate).IsRequired(false);
|
builder.Property(entity => entity.PaymentDate).IsRequired(false);
|
||||||
@@ -30,7 +29,8 @@ public class UserOrderConfiguration : IEntityTypeConfiguration<UserOrder>
|
|||||||
.HasOne(entity => entity.UserAddress)
|
.HasOne(entity => entity.UserAddress)
|
||||||
.WithMany(entity => entity.UserOrders)
|
.WithMany(entity => entity.UserOrders)
|
||||||
.HasForeignKey(entity => entity.UserAddressId)
|
.HasForeignKey(entity => entity.UserAddressId)
|
||||||
.OnDelete(deleteBehavior: DeleteBehavior.Restrict)
|
|
||||||
.IsRequired(true);
|
.IsRequired(true);
|
||||||
|
builder.Property(entity => entity.PaymentMethod).IsRequired(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ message CreateNewTagRequest
|
|||||||
{
|
{
|
||||||
string name = 1;
|
string name = 1;
|
||||||
string title = 2;
|
string title = 2;
|
||||||
string description = 3;
|
google.protobuf.StringValue description = 3;
|
||||||
bool is_active = 4;
|
bool is_active = 4;
|
||||||
int32 sort_order = 5;
|
int32 sort_order = 5;
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ message UpdateTagRequest
|
|||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string name = 2;
|
string name = 2;
|
||||||
string title = 3;
|
string title = 3;
|
||||||
string description = 4;
|
google.protobuf.StringValue description = 4;
|
||||||
bool is_active = 5;
|
bool is_active = 5;
|
||||||
int32 sort_order = 6;
|
int32 sort_order = 6;
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ message GetTagResponse
|
|||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string name = 2;
|
string name = 2;
|
||||||
string title = 3;
|
string title = 3;
|
||||||
string description = 4;
|
google.protobuf.StringValue description = 4;
|
||||||
bool is_active = 5;
|
bool is_active = 5;
|
||||||
int32 sort_order = 6;
|
int32 sort_order = 6;
|
||||||
}
|
}
|
||||||
@@ -107,8 +107,7 @@ message GetAllTagByFilterResponseModel
|
|||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string name = 2;
|
string name = 2;
|
||||||
string title = 3;
|
string title = 3;
|
||||||
string description = 4;
|
google.protobuf.StringValue description = 4;
|
||||||
bool is_active = 5;
|
bool is_active = 5;
|
||||||
int32 sort_order = 6;
|
int32 sort_order = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,32 +46,17 @@ service TransactionsContract
|
|||||||
}
|
}
|
||||||
message CreateNewTransactionsRequest
|
message CreateNewTransactionsRequest
|
||||||
{
|
{
|
||||||
string merchant_id = 1;
|
int64 amount = 1;
|
||||||
int64 amount = 2;
|
string description = 2;
|
||||||
string callback_url = 3;
|
|
||||||
string description = 4;
|
|
||||||
google.protobuf.StringValue mobile = 5;
|
|
||||||
google.protobuf.StringValue email = 6;
|
|
||||||
google.protobuf.Int32Value request_status_code = 7;
|
|
||||||
google.protobuf.StringValue request_status_message = 8;
|
|
||||||
google.protobuf.StringValue authority = 9;
|
|
||||||
google.protobuf.StringValue fee_type = 10;
|
|
||||||
google.protobuf.Int64Value fee = 11;
|
|
||||||
google.protobuf.Int32Value currency = 12;
|
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
{
|
{
|
||||||
messages.PaymentStatus payment_status = 13;
|
messages.PaymentStatus payment_status = 3;
|
||||||
}
|
}
|
||||||
google.protobuf.Timestamp payment_date = 14;
|
google.protobuf.Timestamp payment_date = 4;
|
||||||
google.protobuf.Int32Value verification_status_code = 15;
|
google.protobuf.StringValue ref_id = 5;
|
||||||
google.protobuf.StringValue verification_status_message = 16;
|
|
||||||
google.protobuf.StringValue card_hash = 17;
|
|
||||||
google.protobuf.StringValue card_pan = 18;
|
|
||||||
google.protobuf.StringValue ref_id = 19;
|
|
||||||
google.protobuf.StringValue order_id = 20;
|
|
||||||
oneof Type_item
|
oneof Type_item
|
||||||
{
|
{
|
||||||
messages.TransactionType type = 21;
|
messages.TransactionType type = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message CreateNewTransactionsResponse
|
message CreateNewTransactionsResponse
|
||||||
@@ -81,32 +66,17 @@ message CreateNewTransactionsResponse
|
|||||||
message UpdateTransactionsRequest
|
message UpdateTransactionsRequest
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string merchant_id = 2;
|
int64 amount = 2;
|
||||||
int64 amount = 3;
|
string description = 3;
|
||||||
string callback_url = 4;
|
|
||||||
string description = 5;
|
|
||||||
google.protobuf.StringValue mobile = 6;
|
|
||||||
google.protobuf.StringValue email = 7;
|
|
||||||
google.protobuf.Int32Value request_status_code = 8;
|
|
||||||
google.protobuf.StringValue request_status_message = 9;
|
|
||||||
google.protobuf.StringValue authority = 10;
|
|
||||||
google.protobuf.StringValue fee_type = 11;
|
|
||||||
google.protobuf.Int64Value fee = 12;
|
|
||||||
google.protobuf.Int32Value currency = 13;
|
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
{
|
{
|
||||||
messages.PaymentStatus payment_status = 14;
|
messages.PaymentStatus payment_status = 4;
|
||||||
}
|
}
|
||||||
google.protobuf.Timestamp payment_date = 15;
|
google.protobuf.Timestamp payment_date = 5;
|
||||||
google.protobuf.Int32Value verification_status_code = 16;
|
google.protobuf.StringValue ref_id = 6;
|
||||||
google.protobuf.StringValue verification_status_message = 17;
|
|
||||||
google.protobuf.StringValue card_hash = 18;
|
|
||||||
google.protobuf.StringValue card_pan = 19;
|
|
||||||
google.protobuf.StringValue ref_id = 20;
|
|
||||||
google.protobuf.StringValue order_id = 21;
|
|
||||||
oneof Type_item
|
oneof Type_item
|
||||||
{
|
{
|
||||||
messages.TransactionType type = 22;
|
messages.TransactionType type = 7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message DeleteTransactionsRequest
|
message DeleteTransactionsRequest
|
||||||
@@ -120,32 +90,17 @@ message GetTransactionsRequest
|
|||||||
message GetTransactionsResponse
|
message GetTransactionsResponse
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string merchant_id = 2;
|
int64 amount = 2;
|
||||||
int64 amount = 3;
|
string description = 3;
|
||||||
string callback_url = 4;
|
|
||||||
string description = 5;
|
|
||||||
google.protobuf.StringValue mobile = 6;
|
|
||||||
google.protobuf.StringValue email = 7;
|
|
||||||
google.protobuf.Int32Value request_status_code = 8;
|
|
||||||
google.protobuf.StringValue request_status_message = 9;
|
|
||||||
google.protobuf.StringValue authority = 10;
|
|
||||||
google.protobuf.StringValue fee_type = 11;
|
|
||||||
google.protobuf.Int64Value fee = 12;
|
|
||||||
google.protobuf.Int32Value currency = 13;
|
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
{
|
{
|
||||||
messages.PaymentStatus payment_status = 14;
|
messages.PaymentStatus payment_status = 4;
|
||||||
}
|
}
|
||||||
google.protobuf.Timestamp payment_date = 15;
|
google.protobuf.Timestamp payment_date = 5;
|
||||||
google.protobuf.Int32Value verification_status_code = 16;
|
google.protobuf.StringValue ref_id = 6;
|
||||||
google.protobuf.StringValue verification_status_message = 17;
|
|
||||||
google.protobuf.StringValue card_hash = 18;
|
|
||||||
google.protobuf.StringValue card_pan = 19;
|
|
||||||
google.protobuf.StringValue ref_id = 20;
|
|
||||||
google.protobuf.StringValue order_id = 21;
|
|
||||||
oneof Type_item
|
oneof Type_item
|
||||||
{
|
{
|
||||||
messages.TransactionType type = 22;
|
messages.TransactionType type = 7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message GetAllTransactionsByFilterRequest
|
message GetAllTransactionsByFilterRequest
|
||||||
@@ -157,32 +112,17 @@ message GetAllTransactionsByFilterRequest
|
|||||||
message GetAllTransactionsByFilterFilter
|
message GetAllTransactionsByFilterFilter
|
||||||
{
|
{
|
||||||
google.protobuf.Int64Value id = 1;
|
google.protobuf.Int64Value id = 1;
|
||||||
google.protobuf.StringValue merchant_id = 2;
|
google.protobuf.Int64Value amount = 2;
|
||||||
google.protobuf.Int64Value amount = 3;
|
google.protobuf.StringValue description = 3;
|
||||||
google.protobuf.StringValue callback_url = 4;
|
|
||||||
google.protobuf.StringValue description = 5;
|
|
||||||
google.protobuf.StringValue mobile = 6;
|
|
||||||
google.protobuf.StringValue email = 7;
|
|
||||||
google.protobuf.Int32Value request_status_code = 8;
|
|
||||||
google.protobuf.StringValue request_status_message = 9;
|
|
||||||
google.protobuf.StringValue authority = 10;
|
|
||||||
google.protobuf.StringValue fee_type = 11;
|
|
||||||
google.protobuf.Int64Value fee = 12;
|
|
||||||
google.protobuf.Int32Value currency = 13;
|
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
{
|
{
|
||||||
messages.PaymentStatus payment_status = 14;
|
messages.PaymentStatus payment_status = 4;
|
||||||
}
|
}
|
||||||
google.protobuf.Timestamp payment_date = 15;
|
google.protobuf.Timestamp payment_date = 5;
|
||||||
google.protobuf.Int32Value verification_status_code = 16;
|
google.protobuf.StringValue ref_id = 6;
|
||||||
google.protobuf.StringValue verification_status_message = 17;
|
|
||||||
google.protobuf.StringValue card_hash = 18;
|
|
||||||
google.protobuf.StringValue card_pan = 19;
|
|
||||||
google.protobuf.StringValue ref_id = 20;
|
|
||||||
google.protobuf.Int64Value order_id = 21;
|
|
||||||
oneof Type_item
|
oneof Type_item
|
||||||
{
|
{
|
||||||
messages.TransactionType type = 22;
|
messages.TransactionType type = 7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message GetAllTransactionsByFilterResponse
|
message GetAllTransactionsByFilterResponse
|
||||||
@@ -193,31 +133,16 @@ message GetAllTransactionsByFilterResponse
|
|||||||
message GetAllTransactionsByFilterResponseModel
|
message GetAllTransactionsByFilterResponseModel
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string merchant_id = 2;
|
int64 amount = 2;
|
||||||
int64 amount = 3;
|
string description = 3;
|
||||||
string callback_url = 4;
|
|
||||||
string description = 5;
|
|
||||||
google.protobuf.StringValue mobile = 6;
|
|
||||||
google.protobuf.StringValue email = 7;
|
|
||||||
google.protobuf.Int32Value request_status_code = 8;
|
|
||||||
google.protobuf.StringValue request_status_message = 9;
|
|
||||||
google.protobuf.StringValue authority = 10;
|
|
||||||
google.protobuf.StringValue fee_type = 11;
|
|
||||||
google.protobuf.Int64Value fee = 12;
|
|
||||||
google.protobuf.Int32Value currency = 13;
|
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
{
|
{
|
||||||
messages.PaymentStatus payment_status = 14;
|
messages.PaymentStatus payment_status = 4;
|
||||||
}
|
}
|
||||||
google.protobuf.Timestamp payment_date = 15;
|
google.protobuf.Timestamp payment_date = 5;
|
||||||
google.protobuf.Int32Value verification_status_code = 16;
|
google.protobuf.StringValue ref_id = 6;
|
||||||
google.protobuf.StringValue verification_status_message = 17;
|
|
||||||
google.protobuf.StringValue card_hash = 18;
|
|
||||||
google.protobuf.StringValue card_pan = 19;
|
|
||||||
google.protobuf.StringValue ref_id = 20;
|
|
||||||
google.protobuf.StringValue order_id = 21;
|
|
||||||
oneof Type_item
|
oneof Type_item
|
||||||
{
|
{
|
||||||
messages.TransactionType type = 22;
|
messages.TransactionType type = 7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ service UserOrderContract
|
|||||||
}
|
}
|
||||||
message CreateNewUserOrderRequest
|
message CreateNewUserOrderRequest
|
||||||
{
|
{
|
||||||
int64 price = 1;
|
int64 amount = 1;
|
||||||
int64 package_id = 2;
|
int64 package_id = 2;
|
||||||
google.protobuf.Int64Value transaction_id = 3;
|
google.protobuf.Int64Value transaction_id = 3;
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
@@ -74,7 +74,7 @@ message CreateNewUserOrderResponse
|
|||||||
message UpdateUserOrderRequest
|
message UpdateUserOrderRequest
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
int64 price = 2;
|
int64 amount = 2;
|
||||||
int64 package_id = 3;
|
int64 package_id = 3;
|
||||||
google.protobuf.Int64Value transaction_id = 4;
|
google.protobuf.Int64Value transaction_id = 4;
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
@@ -100,7 +100,7 @@ message GetUserOrderRequest
|
|||||||
message GetUserOrderResponse
|
message GetUserOrderResponse
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
int64 price = 2;
|
int64 amount = 2;
|
||||||
int64 package_id = 3;
|
int64 package_id = 3;
|
||||||
google.protobuf.Int64Value transaction_id = 4;
|
google.protobuf.Int64Value transaction_id = 4;
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
@@ -126,7 +126,7 @@ message GetAllUserOrderByFilterRequest
|
|||||||
message GetAllUserOrderByFilterFilter
|
message GetAllUserOrderByFilterFilter
|
||||||
{
|
{
|
||||||
google.protobuf.Int64Value id = 1;
|
google.protobuf.Int64Value id = 1;
|
||||||
google.protobuf.Int64Value price = 2;
|
google.protobuf.Int64Value amount = 2;
|
||||||
google.protobuf.Int64Value package_id = 3;
|
google.protobuf.Int64Value package_id = 3;
|
||||||
google.protobuf.Int64Value transaction_id = 4;
|
google.protobuf.Int64Value transaction_id = 4;
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
@@ -149,7 +149,7 @@ message GetAllUserOrderByFilterResponse
|
|||||||
message GetAllUserOrderByFilterResponseModel
|
message GetAllUserOrderByFilterResponseModel
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
int64 price = 2;
|
int64 amount = 2;
|
||||||
int64 package_id = 3;
|
int64 package_id = 3;
|
||||||
google.protobuf.Int64Value transaction_id = 4;
|
google.protobuf.Int64Value transaction_id = 4;
|
||||||
oneof PaymentStatus_item
|
oneof PaymentStatus_item
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public class CreateNewTagRequestValidator : AbstractValidator<CreateNewTagReques
|
|||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.Title)
|
RuleFor(model => model.Title)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
|
RuleFor(model => model.IsActive)
|
||||||
|
.NotNull();
|
||||||
RuleFor(model => model.SortOrder)
|
RuleFor(model => model.SortOrder)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
}
|
}
|
||||||
@@ -21,4 +23,3 @@ public class CreateNewTagRequestValidator : AbstractValidator<CreateNewTagReques
|
|||||||
return result.Errors.Select(e => e.ErrorMessage);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ public class UpdateTagRequestValidator : AbstractValidator<UpdateTagRequest>
|
|||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.Title)
|
RuleFor(model => model.Title)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
|
RuleFor(model => model.IsActive)
|
||||||
|
.NotNull();
|
||||||
RuleFor(model => model.SortOrder)
|
RuleFor(model => model.SortOrder)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
}
|
}
|
||||||
@@ -23,4 +25,3 @@ public class UpdateTagRequestValidator : AbstractValidator<UpdateTagRequest>
|
|||||||
return result.Errors.Select(e => e.ErrorMessage);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,8 @@ public class CreateNewTransactionsRequestValidator : AbstractValidator<CreateNew
|
|||||||
{
|
{
|
||||||
public CreateNewTransactionsRequestValidator()
|
public CreateNewTransactionsRequestValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.MerchantId)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Amount)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.CallbackUrl)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Description)
|
RuleFor(model => model.Description)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.PaymentStatus)
|
RuleFor(model => model.PaymentStatus)
|
||||||
|
|||||||
@@ -8,12 +8,8 @@ public class UpdateTransactionsRequestValidator : AbstractValidator<UpdateTransa
|
|||||||
{
|
{
|
||||||
RuleFor(model => model.Id)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.MerchantId)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Amount)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.CallbackUrl)
|
|
||||||
.NotEmpty();
|
|
||||||
RuleFor(model => model.Description)
|
RuleFor(model => model.Description)
|
||||||
.NotEmpty();
|
.NotEmpty();
|
||||||
RuleFor(model => model.PaymentStatus)
|
RuleFor(model => model.PaymentStatus)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ public class CreateNewUserOrderRequestValidator : AbstractValidator<CreateNewUse
|
|||||||
{
|
{
|
||||||
public CreateNewUserOrderRequestValidator()
|
public CreateNewUserOrderRequestValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.Price)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.PackageId)
|
RuleFor(model => model.PackageId)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class UpdateUserOrderRequestValidator : AbstractValidator<UpdateUserOrder
|
|||||||
{
|
{
|
||||||
RuleFor(model => model.Id)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.Price)
|
RuleFor(model => model.Amount)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.PackageId)
|
RuleFor(model => model.PackageId)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
|
|||||||
Reference in New Issue
Block a user