committed by
GitHub
46 changed files with 451 additions and 473 deletions
@ -1,10 +1,9 @@ |
|||
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.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; |
|||
|
|||
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 const string Default = GroupName + ".Orders"; |
|||
public const string SetAsCancelled = GroupName + ".SetAsCancelled"; |
|||
public const string SetAsShipped = GroupName + ".SetAsShipped"; |
|||
public const string Dashboard = GroupName + ".Dashboard"; |
|||
} |
|||
public static class Orders |
|||
{ |
|||
public const string Default = GroupName + ".Orders"; |
|||
public const string SetAsCancelled = GroupName + ".SetAsCancelled"; |
|||
public const string SetAsShipped = GroupName + ".SetAsShipped"; |
|||
public const string Dashboard = GroupName + ".Dashboard"; |
|||
} |
|||
|
|||
public static string[] GetAll() |
|||
{ |
|||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(OrderingServicePermissions)); |
|||
} |
|||
public static string[] GetAll() |
|||
{ |
|||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(OrderingServicePermissions)); |
|||
} |
|||
} |
|||
@ -1,10 +1,9 @@ |
|||
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 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 string ProductName { get; set; } |
|||
public string PictureUrl { get; set; } |
|||
public decimal UnitPrice { get; set; } |
|||
public decimal Discount { get; set; } |
|||
public int Units { get; set; } |
|||
} |
|||
public Guid ProductId { get; set; } |
|||
public string ProductCode { get; set; } |
|||
public string ProductName { get; set; } |
|||
public string PictureUrl { get; set; } |
|||
public decimal UnitPrice { 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.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; |
|||
|
|||
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: |
|||
* public const string MySettingName = GroupName + ".MySettingName"; |
|||
*/ |
|||
} |
|||
/* Add constants for setting names. Example: |
|||
* public const string MySettingName = GroupName + ".MySettingName"; |
|||
*/ |
|||
} |
|||
@ -1,34 +1,33 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
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( |
|||
this ModelBuilder builder) |
|||
{ |
|||
Check.NotNull(builder, nameof(builder)); |
|||
Check.NotNull(builder, nameof(builder)); |
|||
|
|||
/* Configure all entities here. Example: |
|||
/* Configure all entities here. Example: |
|||
|
|||
builder.Entity<Question>(b => |
|||
{ |
|||
//Configure table & schema name
|
|||
b.ToTable(OrderingServiceDbProperties.DbTablePrefix + "Questions", OrderingServiceDbProperties.DbSchema); |
|||
builder.Entity<Question>(b => |
|||
{ |
|||
//Configure table & schema name
|
|||
b.ToTable(OrderingServiceDbProperties.DbTablePrefix + "Questions", OrderingServiceDbProperties.DbSchema); |
|||
|
|||
b.ConfigureByConvention(); |
|||
b.ConfigureByConvention(); |
|||
|
|||
//Properties
|
|||
b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); |
|||
//Properties
|
|||
b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); |
|||
|
|||
//Relations
|
|||
b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); |
|||
//Relations
|
|||
b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); |
|||
|
|||
//Indexes
|
|||
b.HasIndex(q => q.CreationTime); |
|||
}); |
|||
*/ |
|||
} |
|||
//Indexes
|
|||
b.HasIndex(q => q.CreationTime); |
|||
}); |
|||
*/ |
|||
} |
|||
} |
|||
} |
|||
@ -1,39 +1,38 @@ |
|||
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. |
|||
* |
|||
* 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) |
|||
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES |
|||
* |
|||
* Example: Map a property to a table field: |
|||
/* 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. |
|||
* |
|||
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING. |
|||
* 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: |
|||
|
|||
ObjectExtensionManager.Instance |
|||
.MapEfCoreProperty<IdentityUser, string>( |
|||
"MyProperty", |
|||
(entityBuilder, propertyBuilder) => |
|||
{ |
|||
propertyBuilder.HasMaxLength(128); |
|||
} |
|||
); |
|||
ObjectExtensionManager.Instance |
|||
.MapEfCoreProperty<IdentityUser, string>( |
|||
"MyProperty", |
|||
(entityBuilder, propertyBuilder) => |
|||
{ |
|||
propertyBuilder.HasMaxLength(128); |
|||
} |
|||
); |
|||
|
|||
* See the documentation for more: |
|||
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
|||
*/ |
|||
}); |
|||
} |
|||
* See the documentation for more: |
|||
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
|||
*/ |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,13 +1,12 @@ |
|||
using EShopOnAbp.OrderingService.Localization; |
|||
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.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; } |
|||
} |
|||
@ -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; } |
|||
} |
|||
@ -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; } |
|||
|
|||
} |
|||
} |
|||
@ -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; } |
|||
} |
|||
@ -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; } |
|||
} |
|||
@ -1,6 +1,5 @@ |
|||
namespace EShopOnAbp.PaymentService |
|||
namespace EShopOnAbp.PaymentService; |
|||
|
|||
public static class PaymentServiceConsts |
|||
{ |
|||
public static class PaymentServiceConsts |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue