committed by
GitHub
46 changed files with 451 additions and 473 deletions
@ -1,10 +1,9 @@ |
|||||
using Volo.Abp.Localization; |
using Volo.Abp.Localization; |
||||
|
|
||||
namespace EShopOnAbp.BasketService.Localization |
namespace EShopOnAbp.BasketService.Localization; |
||||
|
|
||||
|
[LocalizationResourceName("BasketService")] |
||||
|
public class BasketServiceResource |
||||
{ |
{ |
||||
[LocalizationResourceName("BasketService")] |
|
||||
public class BasketServiceResource |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
} |
} |
||||
@ -1,10 +1,9 @@ |
|||||
using Volo.Abp.Data; |
using Volo.Abp.Data; |
||||
using Volo.Abp.EntityFrameworkCore; |
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
namespace EShopOnAbp.CmskitService.EntityFrameworkCore |
namespace EShopOnAbp.CmskitService.EntityFrameworkCore; |
||||
|
|
||||
|
[ConnectionStringName(CmskitServiceDbProperties.ConnectionStringName)] |
||||
|
public interface ICmskitServiceDbContext : IEfCoreDbContext |
||||
{ |
{ |
||||
[ConnectionStringName(CmskitServiceDbProperties.ConnectionStringName)] |
|
||||
public interface ICmskitServiceDbContext : IEfCoreDbContext |
|
||||
{ |
|
||||
} |
|
||||
} |
} |
||||
@ -1,7 +1,6 @@ |
|||||
namespace EShopOnAbp.OrderingService |
namespace EShopOnAbp.OrderingService; |
||||
|
|
||||
|
public static class OrderingServiceRemoteServiceConsts |
||||
{ |
{ |
||||
public static class OrderingServiceRemoteServiceConsts |
public const string RemoteServiceName = "Ordering"; |
||||
{ |
} |
||||
public const string RemoteServiceName = "Ordering"; |
|
||||
} |
|
||||
} |
|
||||
@ -1,7 +1,6 @@ |
|||||
namespace EShopOnAbp.OrderingService.Orders |
namespace EShopOnAbp.OrderingService.Orders; |
||||
|
|
||||
|
public class DashboardInput |
||||
{ |
{ |
||||
public class DashboardInput |
public string Filter { get; set; } |
||||
{ |
|
||||
public string Filter { get; set; } |
|
||||
} |
|
||||
} |
} |
||||
@ -1,7 +1,6 @@ |
|||||
namespace EShopOnAbp.OrderingService.Orders |
namespace EShopOnAbp.OrderingService.Orders; |
||||
|
|
||||
|
public class GetOrdersInput |
||||
{ |
{ |
||||
public class GetOrdersInput |
public string Filter { get; set; } |
||||
{ |
|
||||
public string Filter { get; set; } |
|
||||
} |
|
||||
} |
} |
||||
@ -1,22 +1,21 @@ |
|||||
using Volo.Abp.Reflection; |
using Volo.Abp.Reflection; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService.Permissions |
namespace EShopOnAbp.OrderingService.Permissions; |
||||
|
|
||||
|
public static class OrderingServicePermissions |
||||
{ |
{ |
||||
public static class OrderingServicePermissions |
public const string GroupName = "OrderingService"; |
||||
{ |
|
||||
public const string GroupName = "OrderingService"; |
|
||||
|
|
||||
public static class Orders |
public static class Orders |
||||
{ |
{ |
||||
public const string Default = GroupName + ".Orders"; |
public const string Default = GroupName + ".Orders"; |
||||
public const string SetAsCancelled = GroupName + ".SetAsCancelled"; |
public const string SetAsCancelled = GroupName + ".SetAsCancelled"; |
||||
public const string SetAsShipped = GroupName + ".SetAsShipped"; |
public const string SetAsShipped = GroupName + ".SetAsShipped"; |
||||
public const string Dashboard = GroupName + ".Dashboard"; |
public const string Dashboard = GroupName + ".Dashboard"; |
||||
} |
} |
||||
|
|
||||
public static string[] GetAll() |
public static string[] GetAll() |
||||
{ |
{ |
||||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(OrderingServicePermissions)); |
return ReflectionHelper.GetPublicConstantsRecursively(typeof(OrderingServicePermissions)); |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
@ -1,10 +1,9 @@ |
|||||
using Volo.Abp.Localization; |
using Volo.Abp.Localization; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService.Localization |
namespace EShopOnAbp.OrderingService.Localization; |
||||
|
|
||||
|
[LocalizationResourceName("OrderingService")] |
||||
|
public class OrderingServiceResource |
||||
{ |
{ |
||||
[LocalizationResourceName("OrderingService")] |
|
||||
public class OrderingServiceResource |
|
||||
{ |
|
||||
|
|
||||
} |
} |
||||
} |
|
||||
@ -1,16 +1,15 @@ |
|||||
using System; |
using System; |
||||
using Volo.Abp.Domain.Entities.Events.Distributed; |
using Volo.Abp.Domain.Entities.Events.Distributed; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService.Orders |
namespace EShopOnAbp.OrderingService.Orders; |
||||
|
|
||||
|
public class OrderItemEto : EtoBase |
||||
{ |
{ |
||||
public class OrderItemEto : EtoBase |
public Guid ProductId { get; set; } |
||||
{ |
public string ProductCode { get; set; } |
||||
public Guid ProductId { get; set; } |
public string ProductName { get; set; } |
||||
public string ProductCode { get; set; } |
public string PictureUrl { get; set; } |
||||
public string ProductName { get; set; } |
public decimal UnitPrice { get; set; } |
||||
public string PictureUrl { get; set; } |
public decimal Discount { get; set; } |
||||
public decimal UnitPrice { get; set; } |
public int Units { get; set; } |
||||
public decimal Discount { get; set; } |
|
||||
public int Units { get; set; } |
|
||||
} |
|
||||
} |
} |
||||
@ -1,11 +1,10 @@ |
|||||
namespace EShopOnAbp.OrderingService |
namespace EShopOnAbp.OrderingService; |
||||
|
|
||||
|
public static class OrderingServiceDbProperties |
||||
{ |
{ |
||||
public static class OrderingServiceDbProperties |
public static string DbTablePrefix { get; set; } = ""; |
||||
{ |
|
||||
public static string DbTablePrefix { get; set; } = ""; |
|
||||
|
|
||||
public static string DbSchema { get; set; } |
public static string DbSchema { get; set; } |
||||
|
|
||||
public const string ConnectionStringName = "OrderingService"; |
public const string ConnectionStringName = "OrderingService"; |
||||
} |
} |
||||
} |
|
||||
@ -1,14 +1,13 @@ |
|||||
using Volo.Abp.Domain; |
using Volo.Abp.Domain; |
||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService |
namespace EShopOnAbp.OrderingService; |
||||
|
|
||||
|
[DependsOn( |
||||
|
typeof(AbpDddDomainModule), |
||||
|
typeof(OrderingServiceDomainSharedModule) |
||||
|
)] |
||||
|
public class OrderingServiceDomainModule : AbpModule |
||||
{ |
{ |
||||
[DependsOn( |
|
||||
typeof(AbpDddDomainModule), |
|
||||
typeof(OrderingServiceDomainSharedModule) |
|
||||
)] |
|
||||
public class OrderingServiceDomainModule : AbpModule |
|
||||
{ |
|
||||
|
|
||||
} |
} |
||||
} |
|
||||
@ -1,14 +1,13 @@ |
|||||
using Volo.Abp.Settings; |
using Volo.Abp.Settings; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService.Settings |
namespace EShopOnAbp.OrderingService.Settings; |
||||
|
|
||||
|
public class OrderingServiceSettingDefinitionProvider : SettingDefinitionProvider |
||||
{ |
{ |
||||
public class OrderingServiceSettingDefinitionProvider : SettingDefinitionProvider |
public override void Define(ISettingDefinitionContext context) |
||||
{ |
{ |
||||
public override void Define(ISettingDefinitionContext context) |
/* Define module settings here. |
||||
{ |
* Use names from OrderingServiceSettings class. |
||||
/* Define module settings here. |
*/ |
||||
* Use names from OrderingServiceSettings class. |
|
||||
*/ |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
@ -1,11 +1,10 @@ |
|||||
namespace EShopOnAbp.OrderingService.Settings |
namespace EShopOnAbp.OrderingService.Settings; |
||||
|
|
||||
|
public static class OrderingServiceSettings |
||||
{ |
{ |
||||
public static class OrderingServiceSettings |
public const string GroupName = "OrderingService"; |
||||
{ |
|
||||
public const string GroupName = "OrderingService"; |
|
||||
|
|
||||
/* Add constants for setting names. Example: |
/* Add constants for setting names. Example: |
||||
* public const string MySettingName = GroupName + ".MySettingName"; |
* public const string MySettingName = GroupName + ".MySettingName"; |
||||
*/ |
*/ |
||||
} |
|
||||
} |
} |
||||
@ -1,34 +1,33 @@ |
|||||
using Microsoft.EntityFrameworkCore; |
using Microsoft.EntityFrameworkCore; |
||||
using Volo.Abp; |
using Volo.Abp; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService.EntityFrameworkCore |
namespace EShopOnAbp.OrderingService.EntityFrameworkCore; |
||||
|
|
||||
|
public static class OrderingServiceDbContextModelCreatingExtensions |
||||
{ |
{ |
||||
public static class OrderingServiceDbContextModelCreatingExtensions |
public static void ConfigureOrderingService( |
||||
|
this ModelBuilder builder) |
||||
{ |
{ |
||||
public static void ConfigureOrderingService( |
Check.NotNull(builder, nameof(builder)); |
||||
this ModelBuilder builder) |
|
||||
{ |
|
||||
Check.NotNull(builder, nameof(builder)); |
|
||||
|
|
||||
/* Configure all entities here. Example: |
/* Configure all entities here. Example: |
||||
|
|
||||
builder.Entity<Question>(b => |
builder.Entity<Question>(b => |
||||
{ |
{ |
||||
//Configure table & schema name
|
//Configure table & schema name
|
||||
b.ToTable(OrderingServiceDbProperties.DbTablePrefix + "Questions", OrderingServiceDbProperties.DbSchema); |
b.ToTable(OrderingServiceDbProperties.DbTablePrefix + "Questions", OrderingServiceDbProperties.DbSchema); |
||||
|
|
||||
b.ConfigureByConvention(); |
b.ConfigureByConvention(); |
||||
|
|
||||
//Properties
|
//Properties
|
||||
b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); |
b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); |
||||
|
|
||||
//Relations
|
//Relations
|
||||
b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); |
b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); |
||||
|
|
||||
//Indexes
|
//Indexes
|
||||
b.HasIndex(q => q.CreationTime); |
b.HasIndex(q => q.CreationTime); |
||||
}); |
}); |
||||
*/ |
*/ |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
@ -1,39 +1,38 @@ |
|||||
using Volo.Abp.Threading; |
using Volo.Abp.Threading; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService.EntityFrameworkCore |
namespace EShopOnAbp.OrderingService.EntityFrameworkCore; |
||||
|
|
||||
|
public static class OrderingServiceEfCoreEntityExtensionMappings |
||||
{ |
{ |
||||
public static class OrderingServiceEfCoreEntityExtensionMappings |
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
||||
{ |
|
||||
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
|
||||
|
|
||||
public static void Configure() |
public static void Configure() |
||||
|
{ |
||||
|
OneTimeRunner.Run(() => |
||||
{ |
{ |
||||
OneTimeRunner.Run(() => |
/* You can configure extra properties for the |
||||
{ |
* entities defined in the modules used by your application. |
||||
/* You can configure extra properties for the |
* |
||||
* entities defined in the modules used by your application. |
* This class can be used to map these extra properties to table fields in the database. |
||||
* |
* |
||||
* This class can be used to map these extra properties to table fields in the database. |
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING. |
||||
* |
* USE OrderingServiceModuleExtensionConfigurator CLASS (in the Domain.Shared project) |
||||
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING. |
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES |
||||
* USE OrderingServiceModuleExtensionConfigurator CLASS (in the Domain.Shared project) |
* |
||||
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES |
* Example: Map a property to a table field: |
||||
* |
|
||||
* Example: Map a property to a table field: |
|
||||
|
|
||||
ObjectExtensionManager.Instance |
ObjectExtensionManager.Instance |
||||
.MapEfCoreProperty<IdentityUser, string>( |
.MapEfCoreProperty<IdentityUser, string>( |
||||
"MyProperty", |
"MyProperty", |
||||
(entityBuilder, propertyBuilder) => |
(entityBuilder, propertyBuilder) => |
||||
{ |
{ |
||||
propertyBuilder.HasMaxLength(128); |
propertyBuilder.HasMaxLength(128); |
||||
} |
} |
||||
); |
); |
||||
|
|
||||
* See the documentation for more: |
* See the documentation for more: |
||||
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
||||
*/ |
*/ |
||||
}); |
}); |
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
@ -1,13 +1,12 @@ |
|||||
using EShopOnAbp.OrderingService.Localization; |
using EShopOnAbp.OrderingService.Localization; |
||||
using Volo.Abp.AspNetCore.Mvc; |
using Volo.Abp.AspNetCore.Mvc; |
||||
|
|
||||
namespace EShopOnAbp.OrderingService |
namespace EShopOnAbp.OrderingService; |
||||
|
|
||||
|
public abstract class OrderingServiceController : AbpControllerBase |
||||
{ |
{ |
||||
public abstract class OrderingServiceController : AbpControllerBase |
protected OrderingServiceController() |
||||
{ |
{ |
||||
protected OrderingServiceController() |
LocalizationResource = typeof(OrderingServiceResource); |
||||
{ |
|
||||
LocalizationResource = typeof(OrderingServiceResource); |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
@ -1,11 +1,10 @@ |
|||||
using Volo.Abp.Domain.Entities.Events.Distributed; |
using Volo.Abp.Domain.Entities.Events.Distributed; |
||||
using Volo.Abp.EventBus; |
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 PaymentRequestDto PaymentRequest { get; set; } |
||||
public class PaymentCompletedEto : EtoBase |
} |
||||
{ |
|
||||
public PaymentRequestDto PaymentRequest { get; set; } |
|
||||
} |
|
||||
} |
|
||||
@ -1,22 +1,21 @@ |
|||||
using System; |
using System; |
||||
using System.ComponentModel.DataAnnotations; |
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
namespace EShopOnAbp.PaymentService.PaymentRequests |
namespace EShopOnAbp.PaymentService.PaymentRequests; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class PaymentRequestProductCreationDto |
||||
{ |
{ |
||||
[Serializable] |
public string ReferenceId { get; set; } |
||||
public class PaymentRequestProductCreationDto |
|
||||
{ |
|
||||
public string ReferenceId { get; set; } |
|
||||
|
|
||||
[Required] |
[Required] |
||||
[MaxLength(PaymentRequestConsts.MaxCodeLength)] |
[MaxLength(PaymentRequestConsts.MaxCodeLength)] |
||||
public string Code { get; set; } |
public string Code { get; set; } |
||||
|
|
||||
[Required] |
[Required] |
||||
[MaxLength(PaymentRequestConsts.MaxNameLength)] |
[MaxLength(PaymentRequestConsts.MaxNameLength)] |
||||
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; } |
||||
} |
|
||||
} |
} |
||||
@ -1,23 +1,22 @@ |
|||||
using System; |
using System; |
||||
using Volo.Abp.Application.Dtos; |
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; } |
||||
|
|
||||
} |
|
||||
} |
} |
||||
@ -1,17 +1,16 @@ |
|||||
using System; |
using System; |
||||
using System.ComponentModel.DataAnnotations; |
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
namespace EShopOnAbp.PaymentService.PaymentRequests |
namespace EShopOnAbp.PaymentService.PaymentRequests; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class PaymentRequestStartDto |
||||
{ |
{ |
||||
[Serializable] |
public int PaymentTypeId { get; set; } |
||||
public class PaymentRequestStartDto |
public Guid PaymentRequestId { get; set; } |
||||
{ |
|
||||
public int PaymentTypeId { get; set; } |
|
||||
public Guid PaymentRequestId { get; set; } |
|
||||
|
|
||||
[Required] |
[Required] |
||||
public string ReturnUrl { get; set; } |
public string ReturnUrl { get; set; } |
||||
|
|
||||
public string CancelUrl { get; set; } |
public string CancelUrl { get; set; } |
||||
} |
|
||||
} |
} |
||||
@ -1,10 +1,9 @@ |
|||||
using System; |
using System; |
||||
|
|
||||
namespace EShopOnAbp.PaymentService.PaymentRequests |
namespace EShopOnAbp.PaymentService.PaymentRequests; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class PaymentRequestStartResultDto |
||||
{ |
{ |
||||
[Serializable] |
public string CheckoutLink { get; set; } |
||||
public class PaymentRequestStartResultDto |
|
||||
{ |
|
||||
public string CheckoutLink { get; set; } |
|
||||
} |
|
||||
} |
} |
||||
@ -1,6 +1,5 @@ |
|||||
namespace EShopOnAbp.PaymentService |
namespace EShopOnAbp.PaymentService; |
||||
|
|
||||
|
public static class PaymentServiceConsts |
||||
{ |
{ |
||||
public static class PaymentServiceConsts |
} |
||||
{ |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue