Browse Source

PaymentService updated to use file-scoped namespaces and namespace fix

pull/172/head
Galip Tolga Erdem 3 years ago
parent
commit
1590f819d2
  1. 13
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentCompletedEto.cs
  2. 31
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestCreationDto.cs
  3. 29
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestDto.cs
  4. 29
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestProductCreationDto.cs
  5. 21
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestProductDto.cs
  6. 19
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestStartDto.cs
  7. 11
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestStartResultDto.cs
  8. 9
      services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentServiceConsts.cs
  9. 1
      services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/PaymentRequests/EfCorePaymentRequestRepository.cs
  10. 3
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/DbMigrations/PaymentServiceDatabaseMigrationChecker.cs
  11. 8
      shared/EShopOnAbp.Shared.Hosting.Microservices/DbMigrations/MongoDb/PendingMongoDbMigrationsChecker.cs

13
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentCompletedEto.cs

@ -1,11 +1,10 @@
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus;
namespace EShopOnAbp.PaymentService.PaymentRequests
namespace EShopOnAbp.PaymentService.PaymentRequests;
[EventName("EShopOnAbp.Payment.Completed")]
public class PaymentCompletedEto : EtoBase
{
[EventName("EShopOnAbp.Payment.Completed")]
public class PaymentCompletedEto : EtoBase
{
public PaymentRequestDto PaymentRequest { get; set; }
}
}
public PaymentRequestDto PaymentRequest { get; set; }
}

31
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestCreationDto.cs

@ -2,24 +2,23 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace EShopOnAbp.PaymentService.PaymentRequests
namespace EShopOnAbp.PaymentService.PaymentRequests;
[Serializable]
public class PaymentRequestCreationDto
{
[Serializable]
public class PaymentRequestCreationDto
{
[Required]
[MaxLength(PaymentRequestConsts.MaxCurrencyLength)]
public string Currency { get; set; }
[Required]
[MaxLength(PaymentRequestConsts.MaxCurrencyLength)]
public string Currency { get; set; }
[Required]
[MinLength(PaymentRequestConsts.MinOrderIdLength)]
[MaxLength(PaymentRequestConsts.MaxOrderIdLength)]
public string OrderId { get; set; }
[Required]
[MinLength(PaymentRequestConsts.MinOrderIdLength)]
[MaxLength(PaymentRequestConsts.MaxOrderIdLength)]
public string OrderId { get; set; }
[Required]
public int OrderNo { get; set; }
[Required]
public int OrderNo { get; set; }
public string BuyerId { get; set; }
public List<PaymentRequestProductCreationDto> Products { get; set; }
}
public string BuyerId { get; set; }
public List<PaymentRequestProductCreationDto> Products { get; set; }
}

29
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestDto.cs

@ -3,25 +3,24 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace EShopOnAbp.PaymentService.PaymentRequests
namespace EShopOnAbp.PaymentService.PaymentRequests;
[Serializable]
public class PaymentRequestDto : CreationAuditedEntityDto<Guid>
{
[Serializable]
public class PaymentRequestDto : CreationAuditedEntityDto<Guid>
{
[Required]
[MaxLength(PaymentRequestConsts.MaxCurrencyLength)]
public string Currency { get; set; }
[Required]
[MaxLength(PaymentRequestConsts.MaxCurrencyLength)]
public string Currency { get; set; }
public string OrderId { get; set; }
public string OrderId { get; set; }
public int OrderNo {get;set;}
public int OrderNo {get;set;}
public string BuyerId { get; set; }
public string BuyerId { get; set; }
public bool IsDeleted { get; set; }
public bool IsDeleted { get; set; }
public PaymentRequestState State { get; set; }
public PaymentRequestState State { get; set; }
public List<PaymentRequestProductDto> Products { get; set; }
}
}
public List<PaymentRequestProductDto> Products { get; set; }
}

29
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestProductCreationDto.cs

@ -1,22 +1,21 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace EShopOnAbp.PaymentService.PaymentRequests
namespace EShopOnAbp.PaymentService.PaymentRequests;
[Serializable]
public class PaymentRequestProductCreationDto
{
[Serializable]
public class PaymentRequestProductCreationDto
{
public string ReferenceId { get; set; }
public string ReferenceId { get; set; }
[Required]
[MaxLength(PaymentRequestConsts.MaxCodeLength)]
public string Code { get; set; }
[Required]
[MaxLength(PaymentRequestConsts.MaxCodeLength)]
public string Code { get; set; }
[Required]
[MaxLength(PaymentRequestConsts.MaxNameLength)]
public string Name { get; set; }
public decimal UnitPrice { get; set; }
public int Quantity { get; set; }
public decimal TotalPrice { get; set; }
}
[Required]
[MaxLength(PaymentRequestConsts.MaxNameLength)]
public string Name { get; set; }
public decimal UnitPrice { get; set; }
public int Quantity { get; set; }
public decimal TotalPrice { get; set; }
}

21
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestProductDto.cs

@ -1,23 +1,22 @@
using System;
using Volo.Abp.Application.Dtos;
namespace EShopOnAbp.PaymentService.PaymentRequests
namespace EShopOnAbp.PaymentService.PaymentRequests;
public class PaymentRequestProductDto : EntityDto<Guid>
{
public class PaymentRequestProductDto : EntityDto<Guid>
{
public Guid PaymentRequestId { get; set; }
public Guid PaymentRequestId { get; set; }
public string ReferenceId { get; set; }
public string ReferenceId { get; set; }
public string Code { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string Name { get; set; }
public decimal UnitPrice { get; set; }
public decimal UnitPrice { get; set; }
public int Quantity { get; set; }
public int Quantity { get; set; }
public decimal TotalPrice { get; set; }
public decimal TotalPrice { get; set; }
}
}

19
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestStartDto.cs

@ -1,17 +1,16 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace EShopOnAbp.PaymentService.PaymentRequests
namespace EShopOnAbp.PaymentService.PaymentRequests;
[Serializable]
public class PaymentRequestStartDto
{
[Serializable]
public class PaymentRequestStartDto
{
public int PaymentTypeId { get; set; }
public Guid PaymentRequestId { get; set; }
public int PaymentTypeId { get; set; }
public Guid PaymentRequestId { get; set; }
[Required]
public string ReturnUrl { get; set; }
[Required]
public string ReturnUrl { get; set; }
public string CancelUrl { get; set; }
}
public string CancelUrl { get; set; }
}

11
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentRequests/PaymentRequestStartResultDto.cs

@ -1,10 +1,9 @@
using System;
namespace EShopOnAbp.PaymentService.PaymentRequests
namespace EShopOnAbp.PaymentService.PaymentRequests;
[Serializable]
public class PaymentRequestStartResultDto
{
[Serializable]
public class PaymentRequestStartResultDto
{
public string CheckoutLink { get; set; }
}
public string CheckoutLink { get; set; }
}

9
services/payment/src/EShopOnAbp.PaymentService.Application.Contracts/PaymentServiceConsts.cs

@ -1,6 +1,5 @@
namespace EShopOnAbp.PaymentService
namespace EShopOnAbp.PaymentService;
public static class PaymentServiceConsts
{
public static class PaymentServiceConsts
{
}
}
}

1
services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/PaymentRequests/EfCorePaymentRequestRepository.cs

@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;

3
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/DbMigrations/PaymentServiceDatabaseMigrationChecker.cs

@ -8,8 +8,7 @@ using Volo.Abp.DistributedLocking;
namespace EShopOnAbp.PaymentService.DbMigrations;
public class PaymentServiceDatabaseMigrationChecker
: PendingEfCoreMigrationsChecker<PaymentServiceDbContext>
public class PaymentServiceDatabaseMigrationChecker : PendingEfCoreMigrationsChecker<PaymentServiceDbContext>
{
public PaymentServiceDatabaseMigrationChecker(
IUnitOfWorkManager unitOfWorkManager,

8
shared/EShopOnAbp.Shared.Hosting.Microservices/DbMigrations/MongoDb/PendingMongoDbMigrationsChecker.cs

@ -1,15 +1,15 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using MongoDB.Driver;
using Serilog;
using System;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DistributedLocking;
using Volo.Abp.MongoDB;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
namespace EShopOnAbp.Shared.Hosting.Microservices.DbMigrations;
namespace EShopOnAbp.Shared.Hosting.Microservices.DbMigrations.MongoDb;
public class PendingMongoDbMigrationsChecker<TDbContext> : PendingMigrationsCheckerBase
where TDbContext : AbpMongoDbContext

Loading…
Cancel
Save