diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ff4ed79c..a04b78ea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,66 +11,66 @@ jobs: - uses: actions/checkout@v2 # Publish modules - - name: publish EasyAbp.EShop.Baskets.Application.dll + - name: publish EasyAbp.EShop.Plugins.Application.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/EasyAbp.EShop.Baskets.Application.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.Application.Contracts.dll + - name: publish EasyAbp.EShop.Plugins.Application.Contracts.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/EasyAbp.EShop.Baskets.Application.Contracts.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.Domain.dll + - name: publish EasyAbp.EShop.Plugins.Domain.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/EasyAbp.EShop.Baskets.Domain.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.Domain.Shared.dll + - name: publish EasyAbp.EShop.Plugins.Domain.Shared.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/EasyAbp.EShop.Baskets.Domain.Shared.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.EntityFrameworkCore.dll + - name: publish EasyAbp.EShop.Plugins.EntityFrameworkCore.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EasyAbp.EShop.Baskets.EntityFrameworkCore.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.HttpApi.dll + - name: publish EasyAbp.EShop.Plugins.HttpApi.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/EasyAbp.EShop.Baskets.HttpApi.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.HttpApi.Client.dll + - name: publish EasyAbp.EShop.Plugins.HttpApi.Client.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/EasyAbp.EShop.Baskets.HttpApi.Client.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.MongoDB.dll + - name: publish EasyAbp.EShop.Plugins.MongoDB.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/EasyAbp.EShop.Baskets.MongoDB.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - name: publish EasyAbp.EShop.Baskets.Web.dll + - name: publish EasyAbp.EShop.Plugins.Web.dll uses: brandedoutcast/publish-nuget@v2 with: - PROJECT_FILE_PATH: modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/EasyAbp.EShop.Baskets.Web.csproj + PROJECT_FILE_PATH: modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj VERSION_FILE_PATH: common.props NUGET_KEY: ${{secrets.NUGET_API_KEY}} diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj index 58b40ef4..02f475b5 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj @@ -10,9 +10,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs index 77bcb583..7f429aa6 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp/EShop/EShopApplicationContractsModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Plugins; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payments; using EasyAbp.EShop.Products; @@ -14,9 +14,9 @@ namespace EasyAbp.EShop typeof(EShopDomainSharedModule), typeof(AbpDddApplicationContractsModule), typeof(AbpAuthorizationModule), - typeof(EShopBasketsApplicationContractsModule), typeof(EShopOrdersApplicationContractsModule), typeof(EShopPaymentsApplicationContractsModule), + typeof(EShopPluginsApplicationContractsModule), typeof(EShopProductsApplicationContractsModule), typeof(EShopStoresApplicationContractsModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj index 67d519b1..439e68b6 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj @@ -10,9 +10,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs index 20885409..493a6b29 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp/EShop/EShopApplicationModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Plugins; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payments; using EasyAbp.EShop.Products; @@ -15,9 +15,9 @@ namespace EasyAbp.EShop typeof(EShopApplicationContractsModule), typeof(AbpDddApplicationModule), typeof(AbpAutoMapperModule), - typeof(EShopBasketsApplicationModule), typeof(EShopOrdersApplicationModule), typeof(EShopPaymentsApplicationModule), + typeof(EShopPluginsApplicationModule), typeof(EShopProductsApplicationModule), typeof(EShopStoresApplicationModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj index 0f5936f7..acb03587 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj @@ -9,9 +9,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs index 9a15c30b..10933d56 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp/EShop/EShopDomainSharedModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Plugins; using Volo.Abp.Modularity; using Volo.Abp.Localization; using EasyAbp.EShop.Localization; @@ -15,9 +15,9 @@ namespace EasyAbp.EShop { [DependsOn( typeof(AbpValidationModule), - typeof(EShopBasketsDomainSharedModule), typeof(EShopOrdersDomainSharedModule), typeof(EShopPaymentsDomainSharedModule), + typeof(EShopPluginsDomainSharedModule), typeof(EShopProductsDomainSharedModule), typeof(EShopStoresDomainSharedModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj index d9110336..2cd18c9f 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj @@ -9,9 +9,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs index 0036ce9c..1f76ddcb 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDomainModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Plugins; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payments; using EasyAbp.EShop.Products; @@ -9,9 +9,9 @@ namespace EasyAbp.EShop { [DependsOn( typeof(EShopDomainSharedModule), - typeof(EShopBasketsDomainModule), typeof(EShopOrdersDomainModule), typeof(EShopPaymentsDomainModule), + typeof(EShopPluginsDomainModule), typeof(EShopProductsDomainModule), typeof(EShopStoresDomainModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj index 205e17ce..2972a983 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj @@ -9,9 +9,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs index 09e6a1df..a37a2e4b 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopDbContextModelCreatingExtensions.cs @@ -1,5 +1,5 @@ using System; -using EasyAbp.EShop.Baskets.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.EntityFrameworkCore; using EasyAbp.EShop.Orders.EntityFrameworkCore; using EasyAbp.EShop.Payments.EntityFrameworkCore; using EasyAbp.EShop.Products.EntityFrameworkCore; @@ -44,9 +44,9 @@ namespace EasyAbp.EShop.EntityFrameworkCore }); */ - builder.ConfigureEShopBaskets(); builder.ConfigureEShopOrders(); builder.ConfigureEShopPayments(); + builder.ConfigureEShopPlugins(); builder.ConfigureEShopProducts(); builder.ConfigureEShopStores(); } diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs index b84e6574..2dec169c 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp/EShop/EntityFrameworkCore/EShopEntityFrameworkCoreModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.EntityFrameworkCore; using EasyAbp.EShop.Orders.EntityFrameworkCore; using EasyAbp.EShop.Payments.EntityFrameworkCore; using EasyAbp.EShop.Products.EntityFrameworkCore; @@ -12,9 +12,9 @@ namespace EasyAbp.EShop.EntityFrameworkCore [DependsOn( typeof(EShopDomainModule), typeof(AbpEntityFrameworkCoreModule), - typeof(EShopBasketsEntityFrameworkCoreModule), typeof(EShopOrdersEntityFrameworkCoreModule), typeof(EShopPaymentsEntityFrameworkCoreModule), + typeof(EShopPluginsEntityFrameworkCoreModule), typeof(EShopProductsEntityFrameworkCoreModule), typeof(EShopStoresEntityFrameworkCoreModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj index 97edf62f..0ff1b46f 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp.EShop.HttpApi.Client.csproj @@ -9,9 +9,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs index f6b68ca7..c7541270 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi.Client/EasyAbp/EShop/EShopHttpApiClientModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Plugins; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payments; using EasyAbp.EShop.Products; @@ -12,9 +12,9 @@ namespace EasyAbp.EShop [DependsOn( typeof(EShopApplicationContractsModule), typeof(AbpHttpClientModule), - typeof(EShopBasketsHttpApiClientModule), typeof(EShopOrdersHttpApiClientModule), typeof(EShopPaymentsHttpApiClientModule), + typeof(EShopPluginsHttpApiClientModule), typeof(EShopProductsHttpApiClientModule), typeof(EShopStoresHttpApiClientModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj index c924f81e..ea7871b5 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj @@ -9,9 +9,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs index 8b9fd5c5..1302817b 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp/EShop/EShopHttpApiModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets; +using EasyAbp.EShop.Plugins; using Localization.Resources.AbpUi; using EasyAbp.EShop.Localization; using EasyAbp.EShop.Orders; @@ -15,9 +15,9 @@ namespace EasyAbp.EShop [DependsOn( typeof(EShopApplicationContractsModule), typeof(AbpAspNetCoreMvcModule), - typeof(EShopBasketsHttpApiModule), typeof(EShopOrdersHttpApiModule), typeof(EShopPaymentsHttpApiModule), + typeof(EShopPluginsHttpApiModule), typeof(EShopProductsHttpApiModule), typeof(EShopStoresHttpApiModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj index cbe2571f..2b186770 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp.EShop.MongoDB.csproj @@ -9,9 +9,9 @@ - + diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs index b94b611b..f47a021a 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbContextExtensions.cs @@ -1,5 +1,5 @@ using System; -using EasyAbp.EShop.Baskets.MongoDB; +using EasyAbp.EShop.Plugins.MongoDB; using EasyAbp.EShop.Orders.MongoDB; using EasyAbp.EShop.Payments.MongoDB; using EasyAbp.EShop.Products.MongoDB; @@ -23,7 +23,7 @@ namespace EasyAbp.EShop.MongoDB optionsAction?.Invoke(options); - builder.ConfigureEShopBaskets(); + builder.ConfigureEShopPlugins(); builder.ConfigureEShopOrders(); builder.ConfigureEShopPayments(); builder.ConfigureEShopProducts(); diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs index 96cf27e7..4ac7f057 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.MongoDB/EasyAbp/EShop/MongoDB/EShopMongoDbModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets.MongoDB; +using EasyAbp.EShop.Plugins.MongoDB; using EasyAbp.EShop.Orders.MongoDB; using EasyAbp.EShop.Payments.MongoDB; using EasyAbp.EShop.Products.MongoDB; @@ -12,9 +12,9 @@ namespace EasyAbp.EShop.MongoDB [DependsOn( typeof(EShopDomainModule), typeof(AbpMongoDbModule), - typeof(EShopBasketsMongoDbModule), typeof(EShopOrdersMongoDbModule), typeof(EShopPaymentsMongoDbModule), + typeof(EShopPluginsMongoDbModule), typeof(EShopProductsMongoDbModule), typeof(EShopStoresMongoDbModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs index 72d8a78a..8d489677 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EShopWebModule.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Baskets.Web; +using EasyAbp.EShop.Plugins.Web; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; using EasyAbp.EShop.Localization; @@ -19,9 +19,9 @@ namespace EasyAbp.EShop.Web typeof(EShopHttpApiModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpAutoMapperModule), - typeof(EShopBasketsWebModule), typeof(EShopOrdersWebModule), typeof(EShopPaymentsWebModule), + typeof(EShopPluginsWebModule), typeof(EShopProductsWebModule), typeof(EShopStoresWebModule) )] diff --git a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj index 8e680aac..534cc741 100644 --- a/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj +++ b/integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj @@ -13,9 +13,9 @@ - + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/BasketsResource.cs b/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/BasketsResource.cs deleted file mode 100644 index 30be5b27..00000000 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/BasketsResource.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Volo.Abp.Localization; - -namespace EasyAbp.EShop.Baskets.Localization -{ - [LocalizationResourceName("EasyAbpEShopBaskets")] - public class BasketsResource - { - - } -} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/BasketItems/BasketItem.cs b/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/BasketItems/BasketItem.cs deleted file mode 100644 index fd26dcd0..00000000 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/BasketItems/BasketItem.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using JetBrains.Annotations; -using Volo.Abp.Domain.Entities.Auditing; -using Volo.Abp.MultiTenancy; - -namespace EasyAbp.EShop.Baskets.BasketItems -{ - public class BasketItem : CreationAuditedAggregateRoot, IMultiTenant - { - public virtual Guid? TenantId { get; protected set; } - - public virtual string BasketLabel { get; protected set; } - - public virtual Guid UserId { get; protected set; } - - public virtual Guid ProductId { get; protected set; } - - public virtual Guid ProductSkuId { get; protected set; } - - public virtual int Quantity { get; protected set; } - - [CanBeNull] - public virtual string MediaResources { get; protected set; } - - [NotNull] - public virtual string ProductName { get; protected set; } - - [NotNull] - public virtual string SkuDescription { get; protected set; } - - [NotNull] - public virtual string Currency { get; protected set; } - - public virtual decimal UnitPrice { get; protected set; } - - public virtual decimal TotalPrice { get; protected set; } - - public virtual decimal TotalDiscount { get; protected set; } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/BasketsDbProperties.cs b/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/BasketsDbProperties.cs deleted file mode 100644 index 019c278b..00000000 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/BasketsDbProperties.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EasyAbp.EShop.Baskets -{ - public static class BasketsDbProperties - { - public static string DbTablePrefix { get; set; } = "EShopBaskets"; - - public static string DbSchema { get; set; } = null; - - public const string ConnectionStringName = "EShopBaskets"; - } -} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/EShopBasketsDomainModule.cs b/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/EShopBasketsDomainModule.cs deleted file mode 100644 index 2d3dff01..00000000 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/EShopBasketsDomainModule.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Volo.Abp.Modularity; - -namespace EasyAbp.EShop.Baskets -{ - [DependsOn( - typeof(EShopBasketsDomainSharedModule) - )] - public class EShopBasketsDomainModule : AbpModule - { - - } -} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/Index.cshtml b/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/Index.cshtml deleted file mode 100644 index a7b05c38..00000000 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/Index.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@page -@inherits EasyAbp.EShop.Baskets.Web.Pages.BasketsPage -@model EasyAbp.EShop.Baskets.Web.Pages.EShop.Baskets.IndexModel -@{ -} -

Baskets

-

A sample page for the Baskets module.

\ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/EShopBasketsApplicationTestModule.cs b/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/EShopBasketsApplicationTestModule.cs deleted file mode 100644 index c264c600..00000000 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/EShopBasketsApplicationTestModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Modularity; - -namespace EasyAbp.EShop.Baskets -{ - [DependsOn( - typeof(EShopBasketsApplicationModule), - typeof(EShopBasketsDomainTestModule) - )] - public class EShopBasketsApplicationTestModule : AbpModule - { - - } -} diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/EasyAbp.EShop.Baskets.Application.Tests.csproj b/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/EasyAbp.EShop.Baskets.Application.Tests.csproj deleted file mode 100644 index c898562d..00000000 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/EasyAbp.EShop.Baskets.Application.Tests.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - netcoreapp3.1 - EasyAbp.EShop.Baskets - - - - - - - - - diff --git a/modules/EasyAbp.EShop.Baskets/.gitattributes b/modules/EasyAbp.EShop.Plugins/.gitattributes similarity index 100% rename from modules/EasyAbp.EShop.Baskets/.gitattributes rename to modules/EasyAbp.EShop.Plugins/.gitattributes diff --git a/modules/EasyAbp.EShop.Baskets/.gitignore b/modules/EasyAbp.EShop.Plugins/.gitignore similarity index 94% rename from modules/EasyAbp.EShop.Baskets/.gitignore rename to modules/EasyAbp.EShop.Plugins/.gitignore index a8370efb..f50c28d7 100644 --- a/modules/EasyAbp.EShop.Baskets/.gitignore +++ b/modules/EasyAbp.EShop.Plugins/.gitignore @@ -251,8 +251,8 @@ paket-files/ .idea/ *.sln.iml -# Baskets -host/EasyAbp.EShop.Baskets.IdentityServer/Logs/logs.txt -host/EasyAbp.EShop.Baskets.HttpApi.Host/Logs/logs.txt -host/EasyAbp.EShop.Baskets.Web.Host/Logs/logs.txt -host/EasyAbp.EShop.Baskets.Web.Unified/Logs/logs.txt +# Plugins +host/EasyAbp.EShop.Plugins.IdentityServer/Logs/logs.txt +host/EasyAbp.EShop.Plugins.HttpApi.Host/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Web.Host/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Web.Unified/Logs/logs.txt diff --git a/modules/EasyAbp.EShop.Baskets/EasyAbp.EShop.Baskets.sln b/modules/EasyAbp.EShop.Plugins/EasyAbp.EShop.Plugins.sln similarity index 81% rename from modules/EasyAbp.EShop.Baskets/EasyAbp.EShop.Baskets.sln rename to modules/EasyAbp.EShop.Plugins/EasyAbp.EShop.Plugins.sln index d6ac5fb6..a320b7fe 100644 --- a/modules/EasyAbp.EShop.Baskets/EasyAbp.EShop.Baskets.sln +++ b/modules/EasyAbp.EShop.Plugins/EasyAbp.EShop.Plugins.sln @@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29001.49 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Domain.Shared", "src\EasyAbp.EShop.Baskets.Domain.Shared\EasyAbp.EShop.Baskets.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Domain.Shared", "src\EasyAbp.EShop.Plugins.Domain.Shared\EasyAbp.EShop.Plugins.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Domain", "src\EasyAbp.EShop.Baskets.Domain\EasyAbp.EShop.Baskets.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Domain", "src\EasyAbp.EShop.Plugins.Domain\EasyAbp.EShop.Plugins.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Application.Contracts", "src\EasyAbp.EShop.Baskets.Application.Contracts\EasyAbp.EShop.Baskets.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Application.Contracts", "src\EasyAbp.EShop.Plugins.Application.Contracts\EasyAbp.EShop.Plugins.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Application", "src\EasyAbp.EShop.Baskets.Application\EasyAbp.EShop.Baskets.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Application", "src\EasyAbp.EShop.Plugins.Application\EasyAbp.EShop.Plugins.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}" EndProject @@ -17,37 +17,37 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-2 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{E400416D-2895-4512-9D17-90681EEC7E0A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.EntityFrameworkCore", "src\EasyAbp.EShop.Baskets.EntityFrameworkCore\EasyAbp.EShop.Baskets.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.EntityFrameworkCore", "src\EasyAbp.EShop.Plugins.EntityFrameworkCore\EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.MongoDB", "src\EasyAbp.EShop.Baskets.MongoDB\EasyAbp.EShop.Baskets.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.MongoDB", "src\EasyAbp.EShop.Plugins.MongoDB\EasyAbp.EShop.Plugins.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.HttpApi", "src\EasyAbp.EShop.Baskets.HttpApi\EasyAbp.EShop.Baskets.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.HttpApi", "src\EasyAbp.EShop.Plugins.HttpApi\EasyAbp.EShop.Plugins.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.HttpApi.Client", "src\EasyAbp.EShop.Baskets.HttpApi.Client\EasyAbp.EShop.Baskets.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.HttpApi.Client", "src\EasyAbp.EShop.Plugins.HttpApi.Client\EasyAbp.EShop.Plugins.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.TestBase", "test\EasyAbp.EShop.Baskets.TestBase\EasyAbp.EShop.Baskets.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.TestBase", "test\EasyAbp.EShop.Plugins.TestBase\EasyAbp.EShop.Plugins.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests", "test\EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests\EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests", "test\EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests\EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.MongoDB.Tests", "test\EasyAbp.EShop.Baskets.MongoDB.Tests\EasyAbp.EShop.Baskets.MongoDB.Tests.csproj", "{D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.MongoDB.Tests", "test\EasyAbp.EShop.Plugins.MongoDB.Tests\EasyAbp.EShop.Plugins.MongoDB.Tests.csproj", "{D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Domain.Tests", "test\EasyAbp.EShop.Baskets.Domain.Tests\EasyAbp.EShop.Baskets.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Domain.Tests", "test\EasyAbp.EShop.Plugins.Domain.Tests\EasyAbp.EShop.Plugins.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Application.Tests", "test\EasyAbp.EShop.Baskets.Application.Tests\EasyAbp.EShop.Baskets.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Application.Tests", "test\EasyAbp.EShop.Plugins.Application.Tests\EasyAbp.EShop.Plugins.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.HttpApi.Host", "host\EasyAbp.EShop.Baskets.HttpApi.Host\EasyAbp.EShop.Baskets.HttpApi.Host.csproj", "{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.HttpApi.Host", "host\EasyAbp.EShop.Plugins.HttpApi.Host\EasyAbp.EShop.Plugins.HttpApi.Host.csproj", "{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Web", "src\EasyAbp.EShop.Baskets.Web\EasyAbp.EShop.Baskets.Web.csproj", "{3B7B6317-1B85-4164-8E11-75574F80AE17}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Web", "src\EasyAbp.EShop.Plugins.Web\EasyAbp.EShop.Plugins.Web.csproj", "{3B7B6317-1B85-4164-8E11-75574F80AE17}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp", "test\EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp", "test\EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Web.Host", "host\EasyAbp.EShop.Baskets.Web.Host\EasyAbp.EShop.Baskets.Web.Host.csproj", "{73513786-B6C6-4A21-89C5-0FBDD0A46107}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Web.Host", "host\EasyAbp.EShop.Plugins.Web.Host\EasyAbp.EShop.Plugins.Web.Host.csproj", "{73513786-B6C6-4A21-89C5-0FBDD0A46107}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.IdentityServer", "host\EasyAbp.EShop.Baskets.IdentityServer\EasyAbp.EShop.Baskets.IdentityServer.csproj", "{690203F4-3CD5-4569-88D9-EE831EEA5F5F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.IdentityServer", "host\EasyAbp.EShop.Plugins.IdentityServer\EasyAbp.EShop.Plugins.IdentityServer.csproj", "{690203F4-3CD5-4569-88D9-EE831EEA5F5F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Host.Shared", "host\EasyAbp.EShop.Baskets.Host.Shared\EasyAbp.EShop.Baskets.Host.Shared.csproj", "{F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Host.Shared", "host\EasyAbp.EShop.Plugins.Host.Shared\EasyAbp.EShop.Plugins.Host.Shared.csproj", "{F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Web.Unified", "host\EasyAbp.EShop.Baskets.Web.Unified\EasyAbp.EShop.Baskets.Web.Unified.csproj", "{3D872C41-E226-45C8-89C1-9D3DBD7C73F2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Web.Unified", "host\EasyAbp.EShop.Plugins.Web.Unified\EasyAbp.EShop.Plugins.Web.Unified.csproj", "{3D872C41-E226-45C8-89C1-9D3DBD7C73F2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/modules/EasyAbp.EShop.Baskets/EasyAbp.EShop.Baskets.sln.DotSettings b/modules/EasyAbp.EShop.Plugins/EasyAbp.EShop.Plugins.sln.DotSettings similarity index 100% rename from modules/EasyAbp.EShop.Baskets/EasyAbp.EShop.Baskets.sln.DotSettings rename to modules/EasyAbp.EShop.Plugins/EasyAbp.EShop.Plugins.sln.DotSettings diff --git a/modules/EasyAbp.EShop.Plugins/docker-compose.migrations.yml b/modules/EasyAbp.EShop.Plugins/docker-compose.migrations.yml new file mode 100644 index 00000000..9f7cf55b --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/docker-compose.migrations.yml @@ -0,0 +1,13 @@ +version: '3.4' + +services: + migrations: + build: + context: ../../ + dockerfile: templates/service/database/Dockerfile + depends_on: + - sqlserver + environment: + - IdentityServer_DB=Plugins_Identity + - Plugins_DB=Plugins_ModuleDb + - SA_PASSWORD=yourStrong(!)Password diff --git a/modules/EasyAbp.EShop.Plugins/docker-compose.override.yml b/modules/EasyAbp.EShop.Plugins/docker-compose.override.yml new file mode 100644 index 00000000..4c035216 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/docker-compose.override.yml @@ -0,0 +1,29 @@ +version: '3.4' + +services: + sqlserver: + environment: + - SA_PASSWORD=yourStrong(!)Password + - ACCEPT_EULA=Y + ports: + - "51599:1433" + + identity-server: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=Plugins_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=Plugins_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + ports: + - "51600:80" + + plugins: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=Plugins_ModuleDb;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=Plugins_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=Plugins_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=Plugins_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=Plugins_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - AuthServer__Authority=http://identity-server + ports: + - "51601:80" \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/docker-compose.yml b/modules/EasyAbp.EShop.Plugins/docker-compose.yml similarity index 82% rename from modules/EasyAbp.EShop.Baskets/docker-compose.yml rename to modules/EasyAbp.EShop.Plugins/docker-compose.yml index 3c8255ad..edf99536 100644 --- a/modules/EasyAbp.EShop.Baskets/docker-compose.yml +++ b/modules/EasyAbp.EShop.Plugins/docker-compose.yml @@ -13,10 +13,10 @@ services: depends_on: - sqlserver - baskets: + plugins: build: context: ../../ - dockerfile: templates/service/host/EasyAbp.EShop.Baskets.Host/Dockerfile + dockerfile: templates/service/host/EasyAbp.EShop.Plugins.Host/Dockerfile depends_on: - sqlserver - identity-server diff --git a/modules/EasyAbp.EShop.Baskets/host/EasyAbp.EShop.Baskets.Host.Shared/EasyAbp.EShop.Baskets.Host.Shared.csproj b/modules/EasyAbp.EShop.Plugins/host/EasyAbp.EShop.Plugins.Host.Shared/EasyAbp.EShop.Plugins.Host.Shared.csproj similarity index 100% rename from modules/EasyAbp.EShop.Baskets/host/EasyAbp.EShop.Baskets.Host.Shared/EasyAbp.EShop.Baskets.Host.Shared.csproj rename to modules/EasyAbp.EShop.Plugins/host/EasyAbp.EShop.Plugins.Host.Shared/EasyAbp.EShop.Plugins.Host.Shared.csproj diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissionDefinitionProvider.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissionDefinitionProvider.cs new file mode 100644 index 00000000..4354043e --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissionDefinitionProvider.cs @@ -0,0 +1,19 @@ +using EasyAbp.EShop.Plugins.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; + +namespace EasyAbp.EShop.Plugins.Authorization +{ + public class PluginsPermissionDefinitionProvider : PermissionDefinitionProvider + { + public override void Define(IPermissionDefinitionContext context) + { + //var moduleGroup = context.AddGroup(PluginsPermissions.GroupName, L("Permission:Plugins")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissions.cs new file mode 100644 index 00000000..0379949b --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/Authorization/PluginsPermissions.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Reflection; + +namespace EasyAbp.EShop.Plugins.Authorization +{ + public class PluginsPermissions + { + public const string GroupName = "EasyAbp.EShop.Plugins"; + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(PluginsPermissions)); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/EShopBasketsApplicationContractsModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs similarity index 64% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/EShopBasketsApplicationContractsModule.cs rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs index d45ca5a3..a7b32fba 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/EShopBasketsApplicationContractsModule.cs +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EShopPluginsApplicationContractsModule.cs @@ -3,20 +3,20 @@ using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; using Volo.Abp.Authorization; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins { [DependsOn( - typeof(EShopBasketsDomainSharedModule), + typeof(EShopPluginsDomainSharedModule), typeof(AbpDddApplicationContractsModule), typeof(AbpAuthorizationModule) )] - public class EShopBasketsApplicationContractsModule : AbpModule + public class EShopPluginsApplicationContractsModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => { - options.FileSets.AddEmbedded("EasyAbp.EShop.Baskets"); + options.FileSets.AddEmbedded("EasyAbp.EShop.Plugins"); }); } } diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/EasyAbp.EShop.Baskets.Application.Contracts.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj similarity index 68% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/EasyAbp.EShop.Baskets.Application.Contracts.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj index 7c86fa07..84cad901 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/EasyAbp.EShop.Baskets.Application.Contracts.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj @@ -4,13 +4,13 @@ netstandard2.0 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/EShopBasketsApplicationModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EShopPluginsApplicationModule.cs similarity index 57% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/EShopBasketsApplicationModule.cs rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EShopPluginsApplicationModule.cs index f9eccfe7..b6018530 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/EShopBasketsApplicationModule.cs +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EShopPluginsApplicationModule.cs @@ -3,22 +3,22 @@ using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; using Volo.Abp.Application; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins { [DependsOn( - typeof(EShopBasketsDomainModule), - typeof(EShopBasketsApplicationContractsModule), + typeof(EShopPluginsDomainModule), + typeof(EShopPluginsApplicationContractsModule), typeof(AbpDddApplicationModule), typeof(AbpAutoMapperModule) )] - public class EShopBasketsApplicationModule : AbpModule + public class EShopPluginsApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); + context.Services.AddAutoMapperObjectMapper(); Configure(options => { - options.AddMaps(validate: true); + options.AddMaps(validate: true); }); } } diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/EasyAbp.EShop.Baskets.Application.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj similarity index 56% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/EasyAbp.EShop.Baskets.Application.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj index f02125a0..e13cbed3 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/EasyAbp.EShop.Baskets.Application.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj @@ -4,14 +4,14 @@ netstandard2.0 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - - + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsAppService.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsAppService.cs new file mode 100644 index 00000000..8fd8fb1c --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsAppService.cs @@ -0,0 +1,14 @@ +using EasyAbp.EShop.Plugins.Localization; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Plugins +{ + public abstract class PluginsAppService : ApplicationService + { + protected PluginsAppService() + { + LocalizationResource = typeof(PluginsResource); + ObjectMapperContext = typeof(EShopPluginsApplicationModule); + } + } +} diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsApplicationAutoMapperProfile.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..f4bb6c1c --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/PluginsApplicationAutoMapperProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; + +namespace EasyAbp.EShop.Plugins +{ + public class PluginsApplicationAutoMapperProfile : Profile + { + public PluginsApplicationAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs new file mode 100644 index 00000000..6d6748f1 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EShopPluginsDomainSharedModule.cs @@ -0,0 +1,37 @@ +using Volo.Abp.Modularity; +using Volo.Abp.Localization; +using EasyAbp.EShop.Plugins.Localization; +using Volo.Abp.Localization.ExceptionHandling; +using Volo.Abp.Validation; +using Volo.Abp.Validation.Localization; +using Volo.Abp.VirtualFileSystem; + +namespace EasyAbp.EShop.Plugins +{ + [DependsOn( + typeof(AbpValidationModule) + )] + public class EShopPluginsDomainSharedModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded("EasyAbp.EShop.Plugins"); + }); + + Configure(options => + { + options.Resources + .Add("en") + .AddBaseTypes(typeof(AbpValidationResource)) + .AddVirtualJson("/Localization/Plugins"); + }); + + Configure(options => + { + options.MapCodeNamespace("Plugins", typeof(PluginsResource)); + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/EasyAbp.EShop.Baskets.Domain.Shared.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj similarity index 64% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/EasyAbp.EShop.Baskets.Domain.Shared.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj index 395ab026..59cab61d 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/EasyAbp.EShop.Baskets.Domain.Shared.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj @@ -4,7 +4,7 @@ netstandard2.0 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins @@ -12,8 +12,8 @@ - - + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/cs.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/cs.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/cs.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/cs.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/en.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/en.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/en.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/en.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/pl.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pl.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/pl.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pl.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/pt-BR.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pt-BR.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/pt-BR.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/pt-BR.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/sl.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/sl.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/sl.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/sl.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/tr.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/tr.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/tr.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/tr.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/vi.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/vi.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/vi.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/vi.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/zh-Hans.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hans.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/zh-Hans.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hans.json diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/zh-Hant.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hant.json similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/Localization/Baskets/zh-Hant.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/Plugins/zh-Hant.json diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/PluginsResource.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/PluginsResource.cs new file mode 100644 index 00000000..8ad225c2 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/Localization/PluginsResource.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Localization; + +namespace EasyAbp.EShop.Plugins.Localization +{ + [LocalizationResourceName("EasyAbpEShopPlugins")] + public class PluginsResource + { + + } +} diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/PluginsErrorCodes.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/PluginsErrorCodes.cs new file mode 100644 index 00000000..3f24cbcc --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/PluginsErrorCodes.cs @@ -0,0 +1,7 @@ +namespace EasyAbp.EShop.Plugins +{ + public static class PluginsErrorCodes + { + //Add your business exception error codes here... + } +} diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EShopPluginsDomainModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EShopPluginsDomainModule.cs new file mode 100644 index 00000000..94267a56 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EShopPluginsDomainModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins +{ + [DependsOn( + typeof(EShopPluginsDomainSharedModule) + )] + public class EShopPluginsDomainModule : AbpModule + { + + } +} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/EasyAbp.EShop.Baskets.Domain.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj similarity index 62% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/EasyAbp.EShop.Baskets.Domain.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj index 7e4bef2e..3bf8363e 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/EasyAbp.EShop.Baskets.Domain.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj @@ -4,12 +4,12 @@ netstandard2.0 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs new file mode 100644 index 00000000..68fe20b9 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs @@ -0,0 +1,11 @@ +namespace EasyAbp.EShop.Plugins +{ + public static class PluginsDbProperties + { + public static string DbTablePrefix { get; set; } = "EShopPlugins"; + + public static string DbSchema { get; set; } = null; + + public const string ConnectionStringName = "EShopPlugins"; + } +} diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettingDefinitionProvider.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettingDefinitionProvider.cs new file mode 100644 index 00000000..0ed9d231 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettingDefinitionProvider.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Settings; + +namespace EasyAbp.EShop.Plugins.Settings +{ + public class PluginsSettingDefinitionProvider : SettingDefinitionProvider + { + public override void Define(ISettingDefinitionContext context) + { + /* Define module settings here. + * Use names from PluginsSettings class. + */ + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettings.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettings.cs new file mode 100644 index 00000000..875e4dd2 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/Settings/PluginsSettings.cs @@ -0,0 +1,11 @@ +namespace EasyAbp.EShop.Plugins.Settings +{ + public static class PluginsSettings + { + public const string GroupName = "EasyAbp.EShop.Plugins"; + + /* Add constants for setting names. Example: + * public const string MySettingName = GroupName + ".MySettingName"; + */ + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EasyAbp.EShop.Baskets.EntityFrameworkCore.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj similarity index 64% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EasyAbp.EShop.Baskets.EntityFrameworkCore.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj index 1c0f57bc..22210597 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EasyAbp.EShop.Baskets.EntityFrameworkCore.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj @@ -4,12 +4,12 @@ netstandard2.0 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreModule.cs new file mode 100644 index 00000000..1f017f71 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreModule.cs @@ -0,0 +1,23 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.EntityFrameworkCore +{ + [DependsOn( + typeof(EShopPluginsDomainModule), + typeof(AbpEntityFrameworkCoreModule) + )] + public class EShopPluginsEntityFrameworkCoreModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/IPluginsDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/IPluginsDbContext.cs new file mode 100644 index 00000000..8e5778a1 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/IPluginsDbContext.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.EntityFrameworkCore +{ + [ConnectionStringName(PluginsDbProperties.ConnectionStringName)] + public interface IPluginsDbContext : IEfCoreDbContext + { + /* Add DbSet for each Aggregate Root here. Example: + * DbSet Questions { get; } + */ + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContext.cs new file mode 100644 index 00000000..944122e8 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContext.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.EntityFrameworkCore +{ + [ConnectionStringName(PluginsDbProperties.ConnectionStringName)] + public class PluginsDbContext : AbpDbContext, IPluginsDbContext + { + /* Add DbSet for each Aggregate Root here. Example: + * public DbSet Questions { get; set; } + */ + + public PluginsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigureEShopPlugins(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContextModelCreatingExtensions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContextModelCreatingExtensions.cs new file mode 100644 index 00000000..b199499e --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsDbContextModelCreatingExtensions.cs @@ -0,0 +1,43 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.EntityFrameworkCore +{ + public static class PluginsDbContextModelCreatingExtensions + { + public static void ConfigureEShopPlugins( + this ModelBuilder builder, + Action optionsAction = null) + { + Check.NotNull(builder, nameof(builder)); + + var options = new PluginsModelBuilderConfigurationOptions( + PluginsDbProperties.DbTablePrefix, + PluginsDbProperties.DbSchema + ); + + optionsAction?.Invoke(options); + + /* Configure all entities here. Example: + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + "Questions", options.Schema); + + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); + + //Relations + b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); + + //Indexes + b.HasIndex(q => q.CreationTime); + }); + */ + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsModelBuilderConfigurationOptions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsModelBuilderConfigurationOptions.cs new file mode 100644 index 00000000..12e31385 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EntityFrameworkCore/PluginsModelBuilderConfigurationOptions.cs @@ -0,0 +1,18 @@ +using JetBrains.Annotations; +using Volo.Abp.EntityFrameworkCore.Modeling; + +namespace EasyAbp.EShop.Plugins.EntityFrameworkCore +{ + public class PluginsModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions + { + public PluginsModelBuilderConfigurationOptions( + [NotNull] string tablePrefix = "", + [CanBeNull] string schema = null) + : base( + tablePrefix, + schema) + { + + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/EShopBasketsHttpApiClientModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EShopPluginsHttpApiClientModule.cs similarity index 58% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/EShopBasketsHttpApiClientModule.cs rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EShopPluginsHttpApiClientModule.cs index 003139be..200d8a51 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/EShopBasketsHttpApiClientModule.cs +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EShopPluginsHttpApiClientModule.cs @@ -2,19 +2,19 @@ using Volo.Abp.Http.Client; using Volo.Abp.Modularity; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins { [DependsOn( - typeof(EShopBasketsApplicationContractsModule), + typeof(EShopPluginsApplicationContractsModule), typeof(AbpHttpClientModule))] - public class EShopBasketsHttpApiClientModule : AbpModule + public class EShopPluginsHttpApiClientModule : AbpModule { - public const string RemoteServiceName = "EShopBaskets"; + public const string RemoteServiceName = "EShopPlugins"; public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddHttpClientProxies( - typeof(EShopBasketsApplicationContractsModule).Assembly, + typeof(EShopPluginsApplicationContractsModule).Assembly, RemoteServiceName ); } diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/EasyAbp.EShop.Baskets.HttpApi.Client.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj similarity index 61% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/EasyAbp.EShop.Baskets.HttpApi.Client.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj index f3c8e2b2..bc69a34f 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/EasyAbp.EShop.Baskets.HttpApi.Client.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/EasyAbp.EShop.Plugins.HttpApi.Client.csproj @@ -4,12 +4,12 @@ netstandard2.0 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi.Client/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi.Client/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EShopPluginsHttpApiModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EShopPluginsHttpApiModule.cs new file mode 100644 index 00000000..70007490 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EShopPluginsHttpApiModule.cs @@ -0,0 +1,33 @@ +using Localization.Resources.AbpUi; +using EasyAbp.EShop.Plugins.Localization; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; + +namespace EasyAbp.EShop.Plugins +{ + [DependsOn( + typeof(EShopPluginsApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule))] + public class EShopPluginsHttpApiModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(EShopPluginsHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/EasyAbp.EShop.Baskets.HttpApi.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj similarity index 61% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/EasyAbp.EShop.Baskets.HttpApi.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj index 53657ec2..bc86355e 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/EasyAbp.EShop.Baskets.HttpApi.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj @@ -4,12 +4,12 @@ netcoreapp3.1 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/PluginsController.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/PluginsController.cs new file mode 100644 index 00000000..25cc9b63 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/PluginsController.cs @@ -0,0 +1,13 @@ +using EasyAbp.EShop.Plugins.Localization; +using Volo.Abp.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Plugins +{ + public abstract class PluginsController : AbpController + { + protected PluginsController() + { + LocalizationResource = typeof(PluginsResource); + } + } +} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/EasyAbp.EShop.Baskets.MongoDB.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj similarity index 63% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/EasyAbp.EShop.Baskets.MongoDB.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj index b52d2dc7..2dc9a48d 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/EasyAbp.EShop.Baskets.MongoDB.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/EasyAbp.EShop.Plugins.MongoDB.csproj @@ -4,12 +4,12 @@ netcoreapp3.1 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/EShopPluginsMongoDbModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/EShopPluginsMongoDbModule.cs new file mode 100644 index 00000000..d5e705fc --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/EShopPluginsMongoDbModule.cs @@ -0,0 +1,23 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.MongoDB +{ + [DependsOn( + typeof(EShopPluginsDomainModule), + typeof(AbpMongoDbModule) + )] + public class EShopPluginsMongoDbModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddMongoDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/IPluginsMongoDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/IPluginsMongoDbContext.cs new file mode 100644 index 00000000..6f76c11c --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/IPluginsMongoDbContext.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.MongoDB +{ + [ConnectionStringName(PluginsDbProperties.ConnectionStringName)] + public interface IPluginsMongoDbContext : IAbpMongoDbContext + { + /* Define mongo collections here. Example: + * IMongoCollection Questions { get; } + */ + } +} diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContext.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContext.cs new file mode 100644 index 00000000..8ff5b7ef --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContext.cs @@ -0,0 +1,20 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.MongoDB +{ + [ConnectionStringName(PluginsDbProperties.ConnectionStringName)] + public class PluginsMongoDbContext : AbpMongoDbContext, IPluginsMongoDbContext + { + /* Add mongo collections here. Example: + * public IMongoCollection Questions => Collection(); + */ + + protected override void CreateModel(IMongoModelBuilder modelBuilder) + { + base.CreateModel(modelBuilder); + + modelBuilder.ConfigureEShopPlugins(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContextExtensions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContextExtensions.cs new file mode 100644 index 00000000..50860c08 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoDbContextExtensions.cs @@ -0,0 +1,22 @@ +using System; +using Volo.Abp; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.MongoDB +{ + public static class PluginsMongoDbContextExtensions + { + public static void ConfigureEShopPlugins( + this IMongoModelBuilder builder, + Action optionsAction = null) + { + Check.NotNull(builder, nameof(builder)); + + var options = new PluginsMongoModelBuilderConfigurationOptions( + PluginsDbProperties.DbTablePrefix + ); + + optionsAction?.Invoke(options); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoModelBuilderConfigurationOptions.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoModelBuilderConfigurationOptions.cs new file mode 100644 index 00000000..5c27d856 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.MongoDB/MongoDB/PluginsMongoModelBuilderConfigurationOptions.cs @@ -0,0 +1,14 @@ +using JetBrains.Annotations; +using Volo.Abp.MongoDB; + +namespace EasyAbp.EShop.Plugins.MongoDB +{ + public class PluginsMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions + { + public PluginsMongoModelBuilderConfigurationOptions( + [NotNull] string collectionPrefix = "") + : base(collectionPrefix) + { + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EShopPluginsWebModule.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EShopPluginsWebModule.cs new file mode 100644 index 00000000..0b94b0b6 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EShopPluginsWebModule.cs @@ -0,0 +1,57 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.DependencyInjection; +using EasyAbp.EShop.Plugins.Localization; +using Volo.Abp.AspNetCore.Mvc.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.UI.Navigation; +using Volo.Abp.VirtualFileSystem; + +namespace EasyAbp.EShop.Plugins.Web +{ + [DependsOn( + typeof(EShopPluginsHttpApiModule), + typeof(AbpAspNetCoreMvcUiThemeSharedModule), + typeof(AbpAutoMapperModule) + )] + public class EShopPluginsWebModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.PreConfigure(options => + { + options.AddAssemblyResource(typeof(PluginsResource), typeof(EShopPluginsWebModule).Assembly); + }); + + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(EShopPluginsWebModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.MenuContributors.Add(new PluginsMenuContributor()); + }); + + Configure(options => + { + options.FileSets.AddEmbedded("EasyAbp.EShop.Plugins.Web"); + }); + + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + + Configure(options => + { + //Configure authorization. + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/EasyAbp.EShop.Baskets.Web.csproj b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj similarity index 87% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/EasyAbp.EShop.Baskets.Web.csproj rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj index 2dfec965..4acc389e 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/EasyAbp.EShop.Baskets.Web.csproj +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj @@ -7,7 +7,7 @@ $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true Library - EasyAbp.EShop.Baskets.Web + EasyAbp.EShop.Plugins.Web @@ -16,7 +16,7 @@ - + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/Index.cshtml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/Index.cshtml new file mode 100644 index 00000000..96f192fb --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/Index.cshtml @@ -0,0 +1,7 @@ +@page +@inherits EasyAbp.EShop.Plugins.Web.Pages.PluginsPage +@model EasyAbp.EShop.Plugins.Web.Pages.EShop.Plugins.IndexModel +@{ +} +

Plugins

+

A sample page for the Plugins module.

\ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/Index.cshtml.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/Index.cshtml.cs new file mode 100644 index 00000000..cf370cf7 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/Index.cshtml.cs @@ -0,0 +1,9 @@ +namespace EasyAbp.EShop.Plugins.Web.Pages.EShop.Plugins +{ + public class IndexModel : PluginsPageModel + { + public void OnGet() + { + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/_ViewImports.cshtml b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/_ViewImports.cshtml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/_ViewImports.cshtml rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/EShop/Plugins/_ViewImports.cshtml diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/BasketsPage.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/PluginsPage.cs similarity index 54% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/BasketsPage.cs rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/PluginsPage.cs index ac37a402..e1d0decc 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/BasketsPage.cs +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/PluginsPage.cs @@ -1,16 +1,16 @@ using Microsoft.AspNetCore.Mvc.Localization; using Microsoft.AspNetCore.Mvc.Razor.Internal; -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Localization; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; -namespace EasyAbp.EShop.Baskets.Web.Pages +namespace EasyAbp.EShop.Plugins.Web.Pages { /* Inherit your UI Pages from this class. To do that, add this line to your Pages (.cshtml files under the Page folder): - * @inherits EasyAbp.EShop.Baskets.Web.Pages.BasketsPage + * @inherits EasyAbp.EShop.Plugins.Web.Pages.PluginsPage */ - public abstract class BasketsPage : AbpPage + public abstract class PluginsPage : AbpPage { [RazorInject] - public IHtmlLocalizer L { get; set; } + public IHtmlLocalizer L { get; set; } } } diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/PluginsPageModel.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/PluginsPageModel.cs new file mode 100644 index 00000000..fe52e5a8 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Pages/PluginsPageModel.cs @@ -0,0 +1,16 @@ +using EasyAbp.EShop.Plugins.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace EasyAbp.EShop.Plugins.Web.Pages +{ + /* Inherit your PageModel classes from this class. + */ + public abstract class PluginsPageModel : AbpPageModel + { + protected PluginsPageModel() + { + LocalizationResourceType = typeof(PluginsResource); + ObjectMapperContext = typeof(EShopPluginsWebModule); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/PluginsMenuContributor.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/PluginsMenuContributor.cs new file mode 100644 index 00000000..7b2f09b2 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/PluginsMenuContributor.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Volo.Abp.UI.Navigation; + +namespace EasyAbp.EShop.Plugins.Web +{ + public class PluginsMenuContributor : IMenuContributor + { + public async Task ConfigureMenuAsync(MenuConfigurationContext context) + { + if (context.Menu.Name == StandardMenus.Main) + { + await ConfigureMainMenu(context); + } + } + + private Task ConfigureMainMenu(MenuConfigurationContext context) + { + //Add main menu items. + + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/PluginsWebAutoMapperProfile.cs b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/PluginsWebAutoMapperProfile.cs new file mode 100644 index 00000000..ee95af25 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/PluginsWebAutoMapperProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; + +namespace EasyAbp.EShop.Plugins.Web +{ + public class PluginsWebAutoMapperProfile : Profile + { + public PluginsWebAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Properties/launchSettings.json b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Properties/launchSettings.json similarity index 94% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Properties/launchSettings.json rename to modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Properties/launchSettings.json index f2ad42d6..bdc7b2e2 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Properties/launchSettings.json +++ b/modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/Properties/launchSettings.json @@ -15,7 +15,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "EasyAbp.EShop.Baskets.Web": { + "EasyAbp.EShop.Plugins.Web": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EShopPluginsApplicationTestModule.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EShopPluginsApplicationTestModule.cs new file mode 100644 index 00000000..8d3f32a9 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EShopPluginsApplicationTestModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins +{ + [DependsOn( + typeof(EShopPluginsApplicationModule), + typeof(EShopPluginsDomainTestModule) + )] + public class EShopPluginsApplicationTestModule : AbpModule + { + + } +} diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj new file mode 100644 index 00000000..fab4933b --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/EasyAbp.EShop.Plugins.Application.Tests.csproj @@ -0,0 +1,16 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins + + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/PluginsApplicationTestBase.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/PluginsApplicationTestBase.cs new file mode 100644 index 00000000..88d804b6 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Application.Tests/PluginsApplicationTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins +{ + /* Inherit from this class for your application layer tests. + * See SampleAppService_Tests for example. + */ + public abstract class PluginsApplicationTestBase : PluginsTestBase + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/EShopBasketsDomainTestModule.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EShopPluginsDomainTestModule.cs similarity index 56% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/EShopBasketsDomainTestModule.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EShopPluginsDomainTestModule.cs index 7d73b7da..a7a32bae 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/EShopBasketsDomainTestModule.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EShopPluginsDomainTestModule.cs @@ -1,16 +1,16 @@ -using EasyAbp.EShop.Baskets.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.EntityFrameworkCore; using Volo.Abp.Modularity; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins { /* Domain tests are configured to use the EF Core provider. * You can switch to MongoDB, however your domain tests should be * database independent anyway. */ [DependsOn( - typeof(EShopBasketsEntityFrameworkCoreTestModule) + typeof(EShopPluginsEntityFrameworkCoreTestModule) )] - public class EShopBasketsDomainTestModule : AbpModule + public class EShopPluginsDomainTestModule : AbpModule { } diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/EasyAbp.EShop.Baskets.Domain.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj similarity index 62% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/EasyAbp.EShop.Baskets.Domain.Tests.csproj rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj index b47cdf29..480a3ee8 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/EasyAbp.EShop.Baskets.Domain.Tests.csproj +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/EasyAbp.EShop.Plugins.Domain.Tests.csproj @@ -4,12 +4,12 @@ netcoreapp3.1 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/PluginsDomainTestBase.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/PluginsDomainTestBase.cs new file mode 100644 index 00000000..71cd13a4 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.Domain.Tests/PluginsDomainTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins +{ + /* Inherit from this class for your domain layer tests. + * See SampleManager_Tests for example. + */ + public abstract class PluginsDomainTestBase : PluginsTestBase + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj similarity index 65% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests.csproj rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj index 1bf713e9..2aae23e4 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests.csproj +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj @@ -4,7 +4,7 @@ netcoreapp3.1 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins @@ -12,8 +12,8 @@ - - + + diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreTestModule.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreTestModule.cs new file mode 100644 index 00000000..40e31822 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopPluginsEntityFrameworkCoreTestModule.cs @@ -0,0 +1,41 @@ +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.EntityFrameworkCore +{ + [DependsOn( + typeof(EShopPluginsTestBaseModule), + typeof(EShopPluginsEntityFrameworkCoreModule) + )] + public class EShopPluginsEntityFrameworkCoreTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new SqliteConnection("Data Source=:memory:"); + connection.Open(); + + new PluginsDbContext( + new DbContextOptionsBuilder().UseSqlite(connection).Options + ).GetService().CreateTables(); + + return connection; + } + } +} diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EntityFrameworkCore/PluginsEntityFrameworkCoreTestBase.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EntityFrameworkCore/PluginsEntityFrameworkCoreTestBase.cs new file mode 100644 index 00000000..14428263 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/EntityFrameworkCore/PluginsEntityFrameworkCoreTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins.EntityFrameworkCore +{ + /* This class can be used as a base class for EF Core integration tests, + * while SampleRepository_Tests uses a different approach. + */ + public abstract class PluginsEntityFrameworkCoreTestBase : PluginsTestBase + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs similarity index 95% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs index 050e2ded..c4194a04 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Configuration; using Volo.Abp.DependencyInjection; using Volo.Abp.IdentityModel; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins { public class ClientDemoService : ITransientDependency { @@ -66,8 +66,8 @@ namespace EasyAbp.EShop.Baskets { httpClient.SetBearerToken(accessToken); - var url = _configuration["RemoteServices:Baskets:BaseUrl"] + - "api/Baskets/sample/authorized"; + var url = _configuration["RemoteServices:Plugins:BaseUrl"] + + "api/Plugins/sample/authorized"; var responseMessage = await httpClient.GetAsync(url); if (responseMessage.IsSuccessStatusCode) @@ -127,8 +127,8 @@ namespace EasyAbp.EShop.Baskets { httpClient.SetBearerToken(tokenResponse.AccessToken); - var url = _configuration["RemoteServices:Baskets:BaseUrl"] + - "api/Baskets/sample/authorized"; + var url = _configuration["RemoteServices:Plugins:BaseUrl"] + + "api/Plugins/sample/authorized"; var responseMessage = await httpClient.GetAsync(url); if (responseMessage.IsSuccessStatusCode) diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs similarity index 87% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs index fa428bee..bd2c6d68 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -4,13 +4,13 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Volo.Abp; -namespace EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp +namespace EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp { public class ConsoleTestAppHostedService : IHostedService { public async Task StartAsync(CancellationToken cancellationToken) { - using (var application = AbpApplicationFactory.Create()) + using (var application = AbpApplicationFactory.Create()) { application.Initialize(); diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/EShopBasketsConsoleApiClientModule.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EShopPluginsConsoleApiClientModule.cs similarity index 54% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/EShopBasketsConsoleApiClientModule.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EShopPluginsConsoleApiClientModule.cs index 7431ba15..df560df8 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/EShopBasketsConsoleApiClientModule.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EShopPluginsConsoleApiClientModule.cs @@ -1,13 +1,13 @@ using Volo.Abp.Http.Client.IdentityModel; using Volo.Abp.Modularity; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins { [DependsOn( - typeof(EShopBasketsHttpApiClientModule), + typeof(EShopPluginsHttpApiClientModule), typeof(AbpHttpClientIdentityModelModule) )] - public class EShopBasketsConsoleApiClientModule : AbpModule + public class EShopPluginsConsoleApiClientModule : AbpModule { } diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj similarity index 78% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp.csproj rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj index c88e0173..8264e2ef 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp.csproj +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj @@ -3,12 +3,12 @@ Exe netcoreapp3.1 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - + diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/Program.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/Program.cs similarity index 90% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/Program.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/Program.cs index b08288f4..54669415 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/Program.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/Program.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -namespace EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp +namespace EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp { class Program { diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/appsettings.json b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/appsettings.json similarity index 81% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/appsettings.json rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/appsettings.json index 1a228896..8dee43b5 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp/appsettings.json +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp/appsettings.json @@ -3,19 +3,19 @@ "Default": { "BaseUrl": "https://localhost:44377/" }, - "Baskets": { + "Plugins": { "BaseUrl": "https://localhost:44373/" } }, "IdentityClients": { "Default": { "GrantType": "password", - "ClientId": "Baskets_ConsoleTestApp", + "ClientId": "Plugins_ConsoleTestApp", "ClientSecret": "1q2w3e*", "UserName": "admin", "UserPassword": "1q2w3E*", "Authority": "https://localhost:44377/", - "Scope": "Baskets" + "Scope": "Plugins" } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/EasyAbp.EShop.Baskets.MongoDB.Tests.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj similarity index 56% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/EasyAbp.EShop.Baskets.MongoDB.Tests.csproj rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj index 18ef6ceb..eda8177a 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/EasyAbp.EShop.Baskets.MongoDB.Tests.csproj +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/EasyAbp.EShop.Plugins.MongoDB.Tests.csproj @@ -4,14 +4,14 @@ netcoreapp3.1 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins - - + + diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/MongoDB/EShopBasketsMongoDbTestModule.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/EShopPluginsMongoDbTestModule.cs similarity index 78% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/MongoDB/EShopBasketsMongoDbTestModule.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/EShopPluginsMongoDbTestModule.cs index 0f39ed6e..5aa46625 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/MongoDB/EShopBasketsMongoDbTestModule.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/EShopPluginsMongoDbTestModule.cs @@ -4,13 +4,13 @@ using Volo.Abp; using Volo.Abp.Data; using Volo.Abp.Modularity; -namespace EasyAbp.EShop.Baskets.MongoDB +namespace EasyAbp.EShop.Plugins.MongoDB { [DependsOn( - typeof(EShopBasketsTestBaseModule), - typeof(EShopBasketsMongoDbModule) + typeof(EShopPluginsTestBaseModule), + typeof(EShopPluginsMongoDbModule) )] - public class EShopBasketsMongoDbTestModule : AbpModule + public class EShopPluginsMongoDbTestModule : AbpModule { private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/PluginsMongoDbTestBase.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/PluginsMongoDbTestBase.cs new file mode 100644 index 00000000..0a793dae --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.MongoDB.Tests/MongoDB/PluginsMongoDbTestBase.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins.MongoDB +{ + /* This class can be used as a base class for MongoDB integration tests, + * while SampleRepository_Tests uses a different approach. + */ + public abstract class PluginsMongoDbTestBase : PluginsTestBase + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/EShopBasketsTestBaseModule.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EShopPluginsTestBaseModule.cs similarity index 89% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/EShopBasketsTestBaseModule.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EShopPluginsTestBaseModule.cs index ef4e9584..cad58c8a 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/EShopBasketsTestBaseModule.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EShopPluginsTestBaseModule.cs @@ -6,15 +6,15 @@ using Volo.Abp.Data; using Volo.Abp.Modularity; using Volo.Abp.Threading; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins { [DependsOn( typeof(AbpAutofacModule), typeof(AbpTestBaseModule), typeof(AbpAuthorizationModule), - typeof(EShopBasketsDomainModule) + typeof(EShopPluginsDomainModule) )] - public class EShopBasketsTestBaseModule : AbpModule + public class EShopPluginsTestBaseModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/EasyAbp.EShop.Baskets.TestBase.csproj b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj similarity index 83% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/EasyAbp.EShop.Baskets.TestBase.csproj rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj index 5d24f6c6..4fa0ece4 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/EasyAbp.EShop.Baskets.TestBase.csproj +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/EasyAbp.EShop.Plugins.TestBase.csproj @@ -4,7 +4,7 @@ netcoreapp3.1 - EasyAbp.EShop.Baskets + EasyAbp.EShop.Plugins @@ -17,7 +17,7 @@ - + diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/FodyWeavers.xml b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/FodyWeavers.xml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/FodyWeavers.xml rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/FodyWeavers.xml diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/FodyWeavers.xsd b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/FodyWeavers.xsd similarity index 100% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/FodyWeavers.xsd rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/FodyWeavers.xsd diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/PluginsDataSeedContributor.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/PluginsDataSeedContributor.cs new file mode 100644 index 00000000..50b8e5ad --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/PluginsDataSeedContributor.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; + +namespace EasyAbp.EShop.Plugins +{ + public class PluginsDataSeedContributor : IDataSeedContributor, ITransientDependency + { + private readonly IGuidGenerator _guidGenerator; + + public PluginsDataSeedContributor( + IGuidGenerator guidGenerator) + { + _guidGenerator = guidGenerator; + } + + public Task SeedAsync(DataSeedContext context) + { + /* Instead of returning the Task.CompletedTask, you can insert your test data + * at this point! + */ + + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/PluginsTestBase.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/PluginsTestBase.cs new file mode 100644 index 00000000..d412ab27 --- /dev/null +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/PluginsTestBase.cs @@ -0,0 +1,60 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; +using Volo.Abp.Testing; + +namespace EasyAbp.EShop.Plugins +{ + /* All test classes are derived from this class, directly or indirectly. */ + public abstract class PluginsTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + protected virtual Task WithUnitOfWorkAsync(Func func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + await action(); + + await uow.CompleteAsync(); + } + } + } + + protected virtual Task WithUnitOfWorkAsync(Func> func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + var result = await func(); + await uow.CompleteAsync(); + return result; + } + } + } + } +} diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/Security/FakeCurrentPrincipalAccessor.cs similarity index 96% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/Security/FakeCurrentPrincipalAccessor.cs rename to modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/Security/FakeCurrentPrincipalAccessor.cs index a598f152..d9b24fa1 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/Security/FakeCurrentPrincipalAccessor.cs +++ b/modules/EasyAbp.EShop.Plugins/test/EasyAbp.EShop.Plugins.TestBase/Security/FakeCurrentPrincipalAccessor.cs @@ -3,7 +3,7 @@ using System.Security.Claims; using Volo.Abp.DependencyInjection; using Volo.Abp.Security.Claims; -namespace EasyAbp.EShop.Baskets.Security +namespace EasyAbp.EShop.Plugins.Security { [Dependency(ReplaceServices = true)] public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor diff --git a/plugins/Baskets/.gitattributes b/plugins/Baskets/.gitattributes new file mode 100644 index 00000000..c941e526 --- /dev/null +++ b/plugins/Baskets/.gitattributes @@ -0,0 +1 @@ +**/wwwroot/libs/** linguist-vendored diff --git a/plugins/Baskets/.gitignore b/plugins/Baskets/.gitignore new file mode 100644 index 00000000..3a7a2133 --- /dev/null +++ b/plugins/Baskets/.gitignore @@ -0,0 +1,258 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# Baskets +host/EasyAbp.EShop.Plugins.Baskets.IdentityServer/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Baskets.HttpApi.Host/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Baskets.Web.Host/Logs/logs.txt +host/EasyAbp.EShop.Plugins.Baskets.Web.Unified/Logs/logs.txt diff --git a/plugins/Baskets/EasyAbp.EShop.Plugins.Baskets.sln b/plugins/Baskets/EasyAbp.EShop.Plugins.Baskets.sln new file mode 100644 index 00000000..b53ab27d --- /dev/null +++ b/plugins/Baskets/EasyAbp.EShop.Plugins.Baskets.sln @@ -0,0 +1,167 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29001.49 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Domain.Shared", "src\EasyAbp.EShop.Plugins.Baskets.Domain.Shared\EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Domain", "src\EasyAbp.EShop.Plugins.Baskets.Domain\EasyAbp.EShop.Plugins.Baskets.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Application.Contracts", "src\EasyAbp.EShop.Plugins.Baskets.Application.Contracts\EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Application", "src\EasyAbp.EShop.Plugins.Baskets.Application\EasyAbp.EShop.Plugins.Baskets.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{E400416D-2895-4512-9D17-90681EEC7E0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore", "src\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.MongoDB", "src\EasyAbp.EShop.Plugins.Baskets.MongoDB\EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.HttpApi", "src\EasyAbp.EShop.Plugins.Baskets.HttpApi\EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.HttpApi.Client", "src\EasyAbp.EShop.Plugins.Baskets.HttpApi.Client\EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.TestBase", "test\EasyAbp.EShop.Plugins.Baskets.TestBase\EasyAbp.EShop.Plugins.Baskets.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests", "test\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests", "test\EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests\EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj", "{D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Domain.Tests", "test\EasyAbp.EShop.Plugins.Baskets.Domain.Tests\EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Application.Tests", "test\EasyAbp.EShop.Plugins.Baskets.Application.Tests\EasyAbp.EShop.Plugins.Baskets.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.HttpApi.Host", "host\EasyAbp.EShop.Plugins.Baskets.HttpApi.Host\EasyAbp.EShop.Plugins.Baskets.HttpApi.Host.csproj", "{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Web", "src\EasyAbp.EShop.Plugins.Baskets.Web\EasyAbp.EShop.Plugins.Baskets.Web.csproj", "{3B7B6317-1B85-4164-8E11-75574F80AE17}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp", "test\EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Web.Host", "host\EasyAbp.EShop.Plugins.Baskets.Web.Host\EasyAbp.EShop.Plugins.Baskets.Web.Host.csproj", "{73513786-B6C6-4A21-89C5-0FBDD0A46107}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.IdentityServer", "host\EasyAbp.EShop.Plugins.Baskets.IdentityServer\EasyAbp.EShop.Plugins.Baskets.IdentityServer.csproj", "{690203F4-3CD5-4569-88D9-EE831EEA5F5F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Host.Shared", "host\EasyAbp.EShop.Plugins.Baskets.Host.Shared\EasyAbp.EShop.Plugins.Baskets.Host.Shared.csproj", "{F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Baskets.Web.Unified", "host\EasyAbp.EShop.Plugins.Baskets.Web.Unified\EasyAbp.EShop.Plugins.Baskets.Web.Unified.csproj", "{3D872C41-E226-45C8-89C1-9D3DBD7C73F2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.Build.0 = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.Build.0 = Release|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.Build.0 = Release|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73513786-B6C6-4A21-89C5-0FBDD0A46107}.Release|Any CPU.Build.0 = Release|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {690203F4-3CD5-4569-88D9-EE831EEA5F5F}.Release|Any CPU.Build.0 = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.Build.0 = Release|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F1C58097-4C08-4D88-8976-6B3389391481} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {E60895E5-79C4-447D-88B7-85CB5BA336A4} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {90CB5DC4-C040-45C7-8900-9688B26405BC} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {3B7B6317-1B85-4164-8E11-75574F80AE17} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {73513786-B6C6-4A21-89C5-0FBDD0A46107} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {690203F4-3CD5-4569-88D9-EE831EEA5F5F} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {3D872C41-E226-45C8-89C1-9D3DBD7C73F2} = {E400416D-2895-4512-9D17-90681EEC7E0A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} + EndGlobalSection +EndGlobal diff --git a/plugins/Baskets/EasyAbp.EShop.Plugins.Baskets.sln.DotSettings b/plugins/Baskets/EasyAbp.EShop.Plugins.Baskets.sln.DotSettings new file mode 100644 index 00000000..cb0b2c91 --- /dev/null +++ b/plugins/Baskets/EasyAbp.EShop.Plugins.Baskets.sln.DotSettings @@ -0,0 +1,23 @@ + + True + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + Required + Required + Required + Required + False + True + False + False + True + False + False + SQL + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/docker-compose.migrations.yml b/plugins/Baskets/docker-compose.migrations.yml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/docker-compose.migrations.yml rename to plugins/Baskets/docker-compose.migrations.yml diff --git a/modules/EasyAbp.EShop.Baskets/docker-compose.override.yml b/plugins/Baskets/docker-compose.override.yml similarity index 100% rename from modules/EasyAbp.EShop.Baskets/docker-compose.override.yml rename to plugins/Baskets/docker-compose.override.yml diff --git a/plugins/Baskets/docker-compose.yml b/plugins/Baskets/docker-compose.yml new file mode 100644 index 00000000..f3c1f420 --- /dev/null +++ b/plugins/Baskets/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.4' + +services: + sqlserver: + image: mcr.microsoft.com/mssql/server + volumes: + - dbdata:/var/opt/mssql + + identity-server: + build: + context: ../../ + dockerfile: templates/service/host/IdentityServerHost/Dockerfile + depends_on: + - sqlserver + + baskets: + build: + context: ../../ + dockerfile: templates/service/host/EasyAbp.EShop.Plugins.Baskets.Host/Dockerfile + depends_on: + - sqlserver + - identity-server + +volumes: + dbdata: \ No newline at end of file diff --git a/plugins/Baskets/host/EasyAbp.EShop.Plugins.Baskets.Host.Shared/EasyAbp.EShop.Plugins.Baskets.Host.Shared.csproj b/plugins/Baskets/host/EasyAbp.EShop.Plugins.Baskets.Host.Shared/EasyAbp.EShop.Plugins.Baskets.Host.Shared.csproj new file mode 100644 index 00000000..99d28ac5 --- /dev/null +++ b/plugins/Baskets/host/EasyAbp.EShop.Plugins.Baskets.Host.Shared/EasyAbp.EShop.Plugins.Baskets.Host.Shared.csproj @@ -0,0 +1,10 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Baskets + + + diff --git a/plugins/Baskets/host/EasyAbp.EShop.Plugins.Baskets.Host.Shared/MultiTenancy/MultiTenancyConsts.cs b/plugins/Baskets/host/EasyAbp.EShop.Plugins.Baskets.Host.Shared/MultiTenancy/MultiTenancyConsts.cs new file mode 100644 index 00000000..ac1111ff --- /dev/null +++ b/plugins/Baskets/host/EasyAbp.EShop.Plugins.Baskets.Host.Shared/MultiTenancy/MultiTenancyConsts.cs @@ -0,0 +1,10 @@ +namespace EasyAbp.EShop.Plugins.Baskets.MultiTenancy +{ + public static class MultiTenancyConsts + { + /* Enable/disable multi-tenancy in a single point + * to test your module with multi-tenancy. + */ + public const bool IsEnabled = false; + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/BasketsApplicationContractsModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/BasketsApplicationContractsModule.cs new file mode 100644 index 00000000..2ce50989 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/BasketsApplicationContractsModule.cs @@ -0,0 +1,16 @@ +using Volo.Abp.Application; +using Volo.Abp.Modularity; +using Volo.Abp.Authorization; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + [DependsOn( + typeof(BasketsDomainSharedModule), + typeof(AbpDddApplicationContractsModule), + typeof(AbpAuthorizationModule) + )] + public class BasketsApplicationContractsModule : AbpModule + { + + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj new file mode 100644 index 00000000..49ddd868 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj @@ -0,0 +1,16 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/Authorization/BasketsPermissionDefinitionProvider.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Permissions/BasketsPermissionDefinitionProvider.cs similarity index 66% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/Authorization/BasketsPermissionDefinitionProvider.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Permissions/BasketsPermissionDefinitionProvider.cs index 9920d8cf..d3972cab 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/Authorization/BasketsPermissionDefinitionProvider.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Permissions/BasketsPermissionDefinitionProvider.cs @@ -1,14 +1,14 @@ -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Localization; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Localization; -namespace EasyAbp.EShop.Baskets.Authorization +namespace EasyAbp.EShop.Plugins.Baskets.Permissions { public class BasketsPermissionDefinitionProvider : PermissionDefinitionProvider { public override void Define(IPermissionDefinitionContext context) { - //var moduleGroup = context.AddGroup(BasketsPermissions.GroupName, L("Permission:Baskets")); + var myGroup = context.AddGroup(BasketsPermissions.GroupName, L("Permission:Baskets")); } private static LocalizableString L(string name) diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/Authorization/BasketsPermissions.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Permissions/BasketsPermissions.cs similarity index 67% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/Authorization/BasketsPermissions.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Permissions/BasketsPermissions.cs index 0fbd6b2b..7c918e05 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application.Contracts/Authorization/BasketsPermissions.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Permissions/BasketsPermissions.cs @@ -1,10 +1,10 @@ using Volo.Abp.Reflection; -namespace EasyAbp.EShop.Baskets.Authorization +namespace EasyAbp.EShop.Plugins.Baskets.Permissions { public class BasketsPermissions { - public const string GroupName = "EasyAbp.EShop.Baskets"; + public const string GroupName = "Baskets"; public static string[] GetAll() { diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Samples/ISampleAppService.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Samples/ISampleAppService.cs new file mode 100644 index 00000000..a99651a9 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Samples/ISampleAppService.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Plugins.Baskets.Samples +{ + public interface ISampleAppService : IApplicationService + { + Task GetAsync(); + + Task GetAuthorizedAsync(); + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Samples/SampleDto.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Samples/SampleDto.cs new file mode 100644 index 00000000..6687989f --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/Samples/SampleDto.cs @@ -0,0 +1,7 @@ +namespace EasyAbp.EShop.Plugins.Baskets.Samples +{ + public class SampleDto + { + public int Value { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/BasketsAppService.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsAppService.cs similarity index 59% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/BasketsAppService.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsAppService.cs index 8c99d7d9..86b879a0 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/BasketsAppService.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsAppService.cs @@ -1,14 +1,14 @@ -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Localization; using Volo.Abp.Application.Services; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { public abstract class BasketsAppService : ApplicationService { protected BasketsAppService() { LocalizationResource = typeof(BasketsResource); - ObjectMapperContext = typeof(EShopBasketsApplicationModule); + ObjectMapperContext = typeof(BasketsApplicationModule); } } } diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/BasketsApplicationAutoMapperProfile.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsApplicationAutoMapperProfile.cs similarity index 90% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/BasketsApplicationAutoMapperProfile.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsApplicationAutoMapperProfile.cs index ff0c046c..da35d1b4 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Application/BasketsApplicationAutoMapperProfile.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsApplicationAutoMapperProfile.cs @@ -1,6 +1,6 @@ using AutoMapper; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { public class BasketsApplicationAutoMapperProfile : Profile { diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsApplicationModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsApplicationModule.cs new file mode 100644 index 00000000..dddaa4c0 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/BasketsApplicationModule.cs @@ -0,0 +1,25 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.Application; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + [DependsOn( + typeof(BasketsDomainModule), + typeof(BasketsApplicationContractsModule), + typeof(AbpDddApplicationModule), + typeof(AbpAutoMapperModule) + )] + public class BasketsApplicationModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + } + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj new file mode 100644 index 00000000..dee82201 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj @@ -0,0 +1,17 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + + + diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/Samples/SampleAppService.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/Samples/SampleAppService.cs new file mode 100644 index 00000000..44abc336 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/Samples/SampleAppService.cs @@ -0,0 +1,29 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; + +namespace EasyAbp.EShop.Plugins.Baskets.Samples +{ + public class SampleAppService : BasketsAppService, ISampleAppService + { + public Task GetAsync() + { + return Task.FromResult( + new SampleDto + { + Value = 42 + } + ); + } + + [Authorize] + public Task GetAuthorizedAsync() + { + return Task.FromResult( + new SampleDto + { + Value = 42 + } + ); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/EShopBasketsDomainSharedModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/BasketsDomainSharedModule.cs similarity index 80% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/EShopBasketsDomainSharedModule.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/BasketsDomainSharedModule.cs index 65c4b521..a29726bd 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/EShopBasketsDomainSharedModule.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/BasketsDomainSharedModule.cs @@ -1,23 +1,23 @@ using Volo.Abp.Modularity; using Volo.Abp.Localization; -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Localization; using Volo.Abp.Localization.ExceptionHandling; using Volo.Abp.Validation; using Volo.Abp.Validation.Localization; using Volo.Abp.VirtualFileSystem; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { [DependsOn( typeof(AbpValidationModule) )] - public class EShopBasketsDomainSharedModule : AbpModule + public class BasketsDomainSharedModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => { - options.FileSets.AddEmbedded("EasyAbp.EShop.Baskets"); + options.FileSets.AddEmbedded(); }); Configure(options => diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/BasketsErrorCodes.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/BasketsErrorCodes.cs similarity index 72% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/BasketsErrorCodes.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/BasketsErrorCodes.cs index 6b00c37f..b69a5e16 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain.Shared/BasketsErrorCodes.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/BasketsErrorCodes.cs @@ -1,4 +1,4 @@ -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { public static class BasketsErrorCodes { diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj new file mode 100644 index 00000000..d1ce5054 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj @@ -0,0 +1,24 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Baskets + true + + + + + + + + + + + + + + + + diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/cs.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/cs.json new file mode 100644 index 00000000..7e0fbb38 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/cs.json @@ -0,0 +1,6 @@ +{ + "culture": "cs", + "texts": { + "ManageYourProfile": "Spravovat profil" + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/en.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/en.json new file mode 100644 index 00000000..45fdf4c7 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/en.json @@ -0,0 +1,7 @@ +{ + "culture": "en", + "texts": { + "ManageYourProfile": "Manage your profile", + "SamplePageMessage": "A sample page for the Baskets module" + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/pl-PL.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/pl-PL.json new file mode 100644 index 00000000..3ea7b190 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/pl-PL.json @@ -0,0 +1,6 @@ +{ + "culture": "pl-PL", + "texts": { + + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/pt-BR.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/pt-BR.json new file mode 100644 index 00000000..6d746df0 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/pt-BR.json @@ -0,0 +1,6 @@ +{ + "culture": "pt-BR", + "texts": { + + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/sl.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/sl.json new file mode 100644 index 00000000..687d4257 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/sl.json @@ -0,0 +1,6 @@ +{ + "culture": "sl", + "texts": { + "ManageYourProfile": "Upravljajte svojim profilom" + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/tr.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/tr.json new file mode 100644 index 00000000..931b7027 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/tr.json @@ -0,0 +1,7 @@ +{ + "culture": "tr", + "texts": { + "ManageYourProfile": "Profil yönetimi", + "SamplePageMessage": "Baskets modulünden örnek bir sayfa" + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/vi.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/vi.json new file mode 100644 index 00000000..d8eb5f3c --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/vi.json @@ -0,0 +1,6 @@ +{ + "culture": "vi", + "texts": { + + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/zh-Hans.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/zh-Hans.json new file mode 100644 index 00000000..99586f01 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + "ManageYourProfile": "管理个人资料" + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/zh-Hant.json b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/zh-Hant.json new file mode 100644 index 00000000..ceea0555 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/Baskets/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hant", + "texts": { + "ManageYourProfile": "管理個人資料" + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/BasketsResource.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/BasketsResource.cs new file mode 100644 index 00000000..ad1315a4 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/Localization/BasketsResource.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Localization; + +namespace EasyAbp.EShop.Plugins.Baskets.Localization +{ + [LocalizationResourceName("Baskets")] + public class BasketsResource + { + + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/BasketsDbProperties.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/BasketsDbProperties.cs new file mode 100644 index 00000000..c68088af --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/BasketsDbProperties.cs @@ -0,0 +1,11 @@ +namespace EasyAbp.EShop.Plugins.Baskets +{ + public static class BasketsDbProperties + { + public static string DbTablePrefix { get; set; } = "Baskets"; + + public static string DbSchema { get; set; } = null; + + public const string ConnectionStringName = "Baskets"; + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/BasketsDomainModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/BasketsDomainModule.cs new file mode 100644 index 00000000..36f437fd --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/BasketsDomainModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + [DependsOn( + typeof(BasketsDomainSharedModule) + )] + public class BasketsDomainModule : AbpModule + { + + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj new file mode 100644 index 00000000..c605738d --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj @@ -0,0 +1,15 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/Settings/BasketsSettingDefinitionProvider.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/Settings/BasketsSettingDefinitionProvider.cs similarity index 86% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/Settings/BasketsSettingDefinitionProvider.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/Settings/BasketsSettingDefinitionProvider.cs index 01267c9b..a9eff40f 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/Settings/BasketsSettingDefinitionProvider.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/Settings/BasketsSettingDefinitionProvider.cs @@ -1,6 +1,6 @@ using Volo.Abp.Settings; -namespace EasyAbp.EShop.Baskets.Settings +namespace EasyAbp.EShop.Plugins.Baskets.Settings { public class BasketsSettingDefinitionProvider : SettingDefinitionProvider { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/Settings/BasketsSettings.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/Settings/BasketsSettings.cs similarity index 64% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/Settings/BasketsSettings.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/Settings/BasketsSettings.cs index 419d2700..42787a22 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/Settings/BasketsSettings.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/Settings/BasketsSettings.cs @@ -1,8 +1,8 @@ -namespace EasyAbp.EShop.Baskets.Settings +namespace EasyAbp.EShop.Plugins.Baskets.Settings { public static class BasketsSettings { - public const string GroupName = "EasyAbp.EShop.Baskets"; + public const string GroupName = "Baskets"; /* Add constants for setting names. Example: * public const string MySettingName = GroupName + ".MySettingName"; diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj new file mode 100644 index 00000000..03723037 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj @@ -0,0 +1,15 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContext.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContext.cs similarity index 86% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContext.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContext.cs index ecb5d12e..96f4e1e7 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContext.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContext.cs @@ -2,7 +2,7 @@ using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -namespace EasyAbp.EShop.Baskets.EntityFrameworkCore +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore { [ConnectionStringName(BasketsDbProperties.ConnectionStringName)] public class BasketsDbContext : AbpDbContext, IBasketsDbContext @@ -21,7 +21,7 @@ namespace EasyAbp.EShop.Baskets.EntityFrameworkCore { base.OnModelCreating(builder); - builder.ConfigureEShopBaskets(); + builder.ConfigureBaskets(); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContextModelCreatingExtensions.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContextModelCreatingExtensions.cs similarity index 92% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContextModelCreatingExtensions.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContextModelCreatingExtensions.cs index 04158e96..cd7da715 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContextModelCreatingExtensions.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsDbContextModelCreatingExtensions.cs @@ -2,11 +2,11 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp; -namespace EasyAbp.EShop.Baskets.EntityFrameworkCore +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore { public static class BasketsDbContextModelCreatingExtensions { - public static void ConfigureEShopBaskets( + public static void ConfigureBaskets( this ModelBuilder builder, Action optionsAction = null) { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/EShopBasketsEntityFrameworkCoreModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsEntityFrameworkCoreModule.cs similarity index 77% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/EShopBasketsEntityFrameworkCoreModule.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsEntityFrameworkCoreModule.cs index 7f52cc07..1aeb25d0 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/EShopBasketsEntityFrameworkCoreModule.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsEntityFrameworkCoreModule.cs @@ -2,13 +2,13 @@ using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Modularity; -namespace EasyAbp.EShop.Baskets.EntityFrameworkCore +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore { [DependsOn( - typeof(EShopBasketsDomainModule), + typeof(BasketsDomainModule), typeof(AbpEntityFrameworkCoreModule) )] - public class EShopBasketsEntityFrameworkCoreModule : AbpModule + public class BasketsEntityFrameworkCoreModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsModelBuilderConfigurationOptions.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsModelBuilderConfigurationOptions.cs similarity index 87% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsModelBuilderConfigurationOptions.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsModelBuilderConfigurationOptions.cs index d5c7ccaf..d48fb4bf 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsModelBuilderConfigurationOptions.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/BasketsModelBuilderConfigurationOptions.cs @@ -1,7 +1,7 @@ using JetBrains.Annotations; using Volo.Abp.EntityFrameworkCore.Modeling; -namespace EasyAbp.EShop.Baskets.EntityFrameworkCore +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore { public class BasketsModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/IBasketsDbContext.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/IBasketsDbContext.cs similarity index 83% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/IBasketsDbContext.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/IBasketsDbContext.cs index 493466f3..afcd92f3 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.EntityFrameworkCore/EntityFrameworkCore/IBasketsDbContext.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EntityFrameworkCore/IBasketsDbContext.cs @@ -1,7 +1,7 @@ using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; -namespace EasyAbp.EShop.Baskets.EntityFrameworkCore +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore { [ConnectionStringName(BasketsDbProperties.ConnectionStringName)] public interface IBasketsDbContext : IEfCoreDbContext diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/BasketsHttpApiClientModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/BasketsHttpApiClientModule.cs new file mode 100644 index 00000000..4b15927e --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/BasketsHttpApiClientModule.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + [DependsOn( + typeof(BasketsApplicationContractsModule), + typeof(AbpHttpClientModule))] + public class BasketsHttpApiClientModule : AbpModule + { + public const string RemoteServiceName = "Baskets"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies( + typeof(BasketsApplicationContractsModule).Assembly, + RemoteServiceName + ); + } + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj new file mode 100644 index 00000000..32172139 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.csproj @@ -0,0 +1,15 @@ + + + + + + netstandard2.0 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/BasketsController.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/BasketsController.cs similarity index 70% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/BasketsController.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/BasketsController.cs index 65c77ccf..eda99e5c 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/BasketsController.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/BasketsController.cs @@ -1,7 +1,7 @@ -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Localization; using Volo.Abp.AspNetCore.Mvc; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { public abstract class BasketsController : AbpController { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/EShopBasketsHttpApiModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/BasketsHttpApiModule.cs similarity index 78% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/EShopBasketsHttpApiModule.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/BasketsHttpApiModule.cs index 36aee377..f5973ac6 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.HttpApi/EShopBasketsHttpApiModule.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/BasketsHttpApiModule.cs @@ -1,22 +1,22 @@ using Localization.Resources.AbpUi; -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Localization; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Microsoft.Extensions.DependencyInjection; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { [DependsOn( - typeof(EShopBasketsApplicationContractsModule), + typeof(BasketsApplicationContractsModule), typeof(AbpAspNetCoreMvcModule))] - public class EShopBasketsHttpApiModule : AbpModule + public class BasketsHttpApiModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { PreConfigure(mvcBuilder => { - mvcBuilder.AddApplicationPartIfNotExists(typeof(EShopBasketsHttpApiModule).Assembly); + mvcBuilder.AddApplicationPartIfNotExists(typeof(BasketsHttpApiModule).Assembly); }); } diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj new file mode 100644 index 00000000..08b50f11 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj @@ -0,0 +1,15 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/Samples/SampleController.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/Samples/SampleController.cs new file mode 100644 index 00000000..ba72662d --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/Samples/SampleController.cs @@ -0,0 +1,33 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.Baskets.Samples +{ + [RemoteService] + [Route("api/Baskets/sample")] + public class SampleController : BasketsController, ISampleAppService + { + private readonly ISampleAppService _sampleAppService; + + public SampleController(ISampleAppService sampleAppService) + { + _sampleAppService = sampleAppService; + } + + [HttpGet] + public async Task GetAsync() + { + return await _sampleAppService.GetAsync(); + } + + [HttpGet] + [Route("authorized")] + [Authorize] + public async Task GetAuthorizedAsync() + { + return await _sampleAppService.GetAsync(); + } + } +} diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj new file mode 100644 index 00000000..6f789b89 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/EasyAbp.EShop.Plugins.Baskets.MongoDB.csproj @@ -0,0 +1,15 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoDbContext.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbContext.cs similarity index 84% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoDbContext.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbContext.cs index 970bdca7..a7aa6cb1 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoDbContext.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbContext.cs @@ -1,7 +1,7 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; -namespace EasyAbp.EShop.Baskets.MongoDB +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB { [ConnectionStringName(BasketsDbProperties.ConnectionStringName)] public class BasketsMongoDbContext : AbpMongoDbContext, IBasketsMongoDbContext @@ -14,7 +14,7 @@ namespace EasyAbp.EShop.Baskets.MongoDB { base.CreateModel(modelBuilder); - modelBuilder.ConfigureEShopBaskets(); + modelBuilder.ConfigureBaskets(); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoDbContextExtensions.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbContextExtensions.cs similarity index 84% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoDbContextExtensions.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbContextExtensions.cs index bd18b8e1..96127865 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoDbContextExtensions.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbContextExtensions.cs @@ -2,11 +2,11 @@ using Volo.Abp; using Volo.Abp.MongoDB; -namespace EasyAbp.EShop.Baskets.MongoDB +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB { public static class BasketsMongoDbContextExtensions { - public static void ConfigureEShopBaskets( + public static void ConfigureBaskets( this IMongoModelBuilder builder, Action optionsAction = null) { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/EShopBasketsMongoDbModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbModule.cs similarity index 80% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/EShopBasketsMongoDbModule.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbModule.cs index 04a9e705..86b1321c 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/EShopBasketsMongoDbModule.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoDbModule.cs @@ -2,13 +2,13 @@ using Volo.Abp.Modularity; using Volo.Abp.MongoDB; -namespace EasyAbp.EShop.Baskets.MongoDB +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB { [DependsOn( - typeof(EShopBasketsDomainModule), + typeof(BasketsDomainModule), typeof(AbpMongoDbModule) )] - public class EShopBasketsMongoDbModule : AbpModule + public class BasketsMongoDbModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoModelBuilderConfigurationOptions.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoModelBuilderConfigurationOptions.cs similarity index 87% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoModelBuilderConfigurationOptions.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoModelBuilderConfigurationOptions.cs index 4f0ee3b3..2dc7bbac 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/BasketsMongoModelBuilderConfigurationOptions.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/BasketsMongoModelBuilderConfigurationOptions.cs @@ -1,7 +1,7 @@ using JetBrains.Annotations; using Volo.Abp.MongoDB; -namespace EasyAbp.EShop.Baskets.MongoDB +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB { public class BasketsMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/IBasketsMongoDbContext.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/IBasketsMongoDbContext.cs similarity index 86% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/IBasketsMongoDbContext.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/IBasketsMongoDbContext.cs index 35781f52..6501ded5 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.MongoDB/MongoDB/IBasketsMongoDbContext.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.MongoDB/MongoDB/IBasketsMongoDbContext.cs @@ -1,7 +1,7 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; -namespace EasyAbp.EShop.Baskets.MongoDB +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB { [ConnectionStringName(BasketsDbProperties.ConnectionStringName)] public interface IBasketsMongoDbContext : IAbpMongoDbContext diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/BasketsWebAutoMapperProfile.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/BasketsWebAutoMapperProfile.cs similarity index 89% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/BasketsWebAutoMapperProfile.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/BasketsWebAutoMapperProfile.cs index c057f25f..d82206f3 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/BasketsWebAutoMapperProfile.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/BasketsWebAutoMapperProfile.cs @@ -1,6 +1,6 @@ using AutoMapper; -namespace EasyAbp.EShop.Baskets.Web +namespace EasyAbp.EShop.Plugins.Baskets.Web { public class BasketsWebAutoMapperProfile : Profile { diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/EShopBasketsWebModule.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/BasketsWebModule.cs similarity index 72% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/EShopBasketsWebModule.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/BasketsWebModule.cs index a21a835e..6464cacf 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/EShopBasketsWebModule.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/BasketsWebModule.cs @@ -1,32 +1,34 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Web.Menus; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; +using EasyAbp.EShop.Plugins.Baskets.Permissions; -namespace EasyAbp.EShop.Baskets.Web +namespace EasyAbp.EShop.Plugins.Baskets.Web { [DependsOn( - typeof(EShopBasketsHttpApiModule), + typeof(BasketsHttpApiModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpAutoMapperModule) )] - public class EShopBasketsWebModule : AbpModule + public class BasketsWebModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) { context.Services.PreConfigure(options => { - options.AddAssemblyResource(typeof(BasketsResource), typeof(EShopBasketsWebModule).Assembly); + options.AddAssemblyResource(typeof(BasketsResource), typeof(BasketsWebModule).Assembly); }); PreConfigure(mvcBuilder => { - mvcBuilder.AddApplicationPartIfNotExists(typeof(EShopBasketsWebModule).Assembly); + mvcBuilder.AddApplicationPartIfNotExists(typeof(BasketsWebModule).Assembly); }); } @@ -39,13 +41,13 @@ namespace EasyAbp.EShop.Baskets.Web Configure(options => { - options.FileSets.AddEmbedded("EasyAbp.EShop.Baskets.Web"); + options.FileSets.AddEmbedded(); }); - context.Services.AddAutoMapperObjectMapper(); + context.Services.AddAutoMapperObjectMapper(); Configure(options => { - options.AddMaps(validate: true); + options.AddMaps(validate: true); }); Configure(options => diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj new file mode 100644 index 00000000..edb04221 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj @@ -0,0 +1,40 @@ + + + + + + netcoreapp3.1 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + true + Library + EasyAbp.EShop.Plugins.Baskets.Web + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/BasketsMenuContributor.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs similarity index 91% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/BasketsMenuContributor.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs index 82a20fa6..73f21193 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/BasketsMenuContributor.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using Volo.Abp.UI.Navigation; -namespace EasyAbp.EShop.Baskets.Web +namespace EasyAbp.EShop.Plugins.Baskets.Web.Menus { public class BasketsMenuContributor : IMenuContributor { diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenus.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenus.cs new file mode 100644 index 00000000..ceafecf2 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenus.cs @@ -0,0 +1,11 @@ +namespace EasyAbp.EShop.Plugins.Baskets.Web.Menus +{ + public class BasketsMenus + { + private const string Prefix = "Baskets"; + + //Add your menu items here... + //public const string Home = Prefix + ".MyNewMenuItem"; + + } +} \ No newline at end of file diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/Index.cshtml b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/Index.cshtml new file mode 100644 index 00000000..9b68dd59 --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/Index.cshtml @@ -0,0 +1,9 @@ +@page +@using Microsoft.Extensions.Localization +@using EasyAbp.EShop.Plugins.Baskets.Localization +@model EasyAbp.EShop.Plugins.Baskets.Web.Pages.Baskets.IndexModel +@inject IStringLocalizer L +@{ +} +

Baskets

+

@L["SamplePageMessage"]

diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/Index.cshtml.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/Index.cshtml.cs similarity index 64% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/Index.cshtml.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/Index.cshtml.cs index 532d3256..ed55f79c 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/EShop/Baskets/Index.cshtml.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/Index.cshtml.cs @@ -1,4 +1,4 @@ -namespace EasyAbp.EShop.Baskets.Web.Pages.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets.Web.Pages.Baskets { public class IndexModel : BasketsPageModel { diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/_ViewImports.cshtml b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/_ViewImports.cshtml new file mode 100644 index 00000000..c1da1f5f --- /dev/null +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/Baskets/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/BasketsPageModel.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/BasketsPageModel.cs similarity index 64% rename from modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/BasketsPageModel.cs rename to plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/BasketsPageModel.cs index 8d59ef94..ba95da76 100644 --- a/modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Web/Pages/BasketsPageModel.cs +++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Pages/BasketsPageModel.cs @@ -1,7 +1,7 @@ -using EasyAbp.EShop.Baskets.Localization; +using EasyAbp.EShop.Plugins.Baskets.Localization; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; -namespace EasyAbp.EShop.Baskets.Web.Pages +namespace EasyAbp.EShop.Plugins.Baskets.Web.Pages { /* Inherit your PageModel classes from this class. */ @@ -10,7 +10,7 @@ namespace EasyAbp.EShop.Baskets.Web.Pages protected BasketsPageModel() { LocalizationResourceType = typeof(BasketsResource); - ObjectMapperContext = typeof(EShopBasketsWebModule); + ObjectMapperContext = typeof(BasketsWebModule); } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/BasketsApplicationTestBase.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/BasketsApplicationTestBase.cs similarity index 71% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/BasketsApplicationTestBase.cs rename to plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/BasketsApplicationTestBase.cs index 75033e73..ef7d76c8 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Application.Tests/BasketsApplicationTestBase.cs +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/BasketsApplicationTestBase.cs @@ -1,9 +1,9 @@ -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { /* Inherit from this class for your application layer tests. * See SampleAppService_Tests for example. */ - public abstract class BasketsApplicationTestBase : BasketsTestBase + public abstract class BasketsApplicationTestBase : BasketsTestBase { } diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/BasketsApplicationTestModule.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/BasketsApplicationTestModule.cs new file mode 100644 index 00000000..767da374 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/BasketsApplicationTestModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + [DependsOn( + typeof(BasketsApplicationModule), + typeof(BasketsDomainTestModule) + )] + public class BasketsApplicationTestModule : AbpModule + { + + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/EasyAbp.EShop.Plugins.Baskets.Application.Tests.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/EasyAbp.EShop.Plugins.Baskets.Application.Tests.csproj new file mode 100644 index 00000000..c06c1827 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/EasyAbp.EShop.Plugins.Baskets.Application.Tests.csproj @@ -0,0 +1,16 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + + diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/Samples/SampleAppService_Tests.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/Samples/SampleAppService_Tests.cs new file mode 100644 index 00000000..36de476a --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Application.Tests/Samples/SampleAppService_Tests.cs @@ -0,0 +1,30 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Baskets.Samples +{ + public class SampleAppService_Tests : BasketsApplicationTestBase + { + private readonly ISampleAppService _sampleAppService; + + public SampleAppService_Tests() + { + _sampleAppService = GetRequiredService(); + } + + [Fact] + public async Task GetAsync() + { + var result = await _sampleAppService.GetAsync(); + result.Value.ShouldBe(42); + } + + [Fact] + public async Task GetAuthorizedAsync() + { + var result = await _sampleAppService.GetAuthorizedAsync(); + result.Value.ShouldBe(42); + } + } +} diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/BasketsDomainTestBase.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/BasketsDomainTestBase.cs similarity index 72% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/BasketsDomainTestBase.cs rename to plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/BasketsDomainTestBase.cs index d31d6242..99788d81 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.Domain.Tests/BasketsDomainTestBase.cs +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/BasketsDomainTestBase.cs @@ -1,9 +1,9 @@ -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { /* Inherit from this class for your domain layer tests. * See SampleManager_Tests for example. */ - public abstract class BasketsDomainTestBase : BasketsTestBase + public abstract class BasketsDomainTestBase : BasketsTestBase { } diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/BasketsDomainTestModule.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/BasketsDomainTestModule.cs new file mode 100644 index 00000000..98dca46f --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/BasketsDomainTestModule.cs @@ -0,0 +1,17 @@ +using EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + /* Domain tests are configured to use the EF Core provider. + * You can switch to MongoDB, however your domain tests should be + * database independent anyway. + */ + [DependsOn( + typeof(BasketsEntityFrameworkCoreTestModule) + )] + public class BasketsDomainTestModule : AbpModule + { + + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj new file mode 100644 index 00000000..7df70f66 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/EasyAbp.EShop.Plugins.Baskets.Domain.Tests.csproj @@ -0,0 +1,15 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/Samples/SampleManager_Tests.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/Samples/SampleManager_Tests.cs new file mode 100644 index 00000000..28ff298e --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.Domain.Tests/Samples/SampleManager_Tests.cs @@ -0,0 +1,21 @@ +using System.Threading.Tasks; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Baskets.Samples +{ + public class SampleManager_Tests : BasketsDomainTestBase + { + //private readonly SampleManager _sampleManager; + + public SampleManager_Tests() + { + //_sampleManager = GetRequiredService(); + } + + [Fact] + public async Task Method1Async() + { + + } + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj new file mode 100644 index 00000000..a7682ae9 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests.csproj @@ -0,0 +1,18 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestBase.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestBase.cs similarity index 65% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestBase.cs rename to plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestBase.cs index 2b86c662..4eb9f9b8 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestBase.cs +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestBase.cs @@ -1,9 +1,9 @@ -namespace EasyAbp.EShop.Baskets.EntityFrameworkCore +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore { /* This class can be used as a base class for EF Core integration tests, * while SampleRepository_Tests uses a different approach. */ - public abstract class BasketsEntityFrameworkCoreTestBase : BasketsTestBase + public abstract class BasketsEntityFrameworkCoreTestBase : BasketsTestBase { } diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopBasketsEntityFrameworkCoreTestModule.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestModule.cs similarity index 79% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopBasketsEntityFrameworkCoreTestModule.cs rename to plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestModule.cs index d2b84b4e..ae4d1373 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopBasketsEntityFrameworkCoreTestModule.cs +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/BasketsEntityFrameworkCoreTestModule.cs @@ -3,15 +3,17 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Sqlite; using Volo.Abp.Modularity; -namespace EasyAbp.EShop.Baskets.EntityFrameworkCore +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore { [DependsOn( - typeof(EShopBasketsTestBaseModule), - typeof(EShopBasketsEntityFrameworkCoreModule) + typeof(BasketsTestBaseModule), + typeof(BasketsEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreSqliteModule) )] - public class EShopBasketsEntityFrameworkCoreTestModule : AbpModule + public class BasketsEntityFrameworkCoreTestModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs new file mode 100644 index 00000000..0a7c1c04 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs @@ -0,0 +1,12 @@ +using EasyAbp.EShop.Plugins.Baskets.Samples; + +namespace EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.Samples +{ + public class SampleRepository_Tests : SampleRepository_Tests + { + /* Don't write custom repository tests here, instead write to + * the base class. + * One exception can be some specific tests related to EF core. + */ + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/BasketsConsoleApiClientModule.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/BasketsConsoleApiClientModule.cs new file mode 100644 index 00000000..b7d52b54 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/BasketsConsoleApiClientModule.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + [DependsOn( + typeof(BasketsHttpApiClientModule), + typeof(AbpHttpClientIdentityModelModule) + )] + public class BasketsConsoleApiClientModule : AbpModule + { + + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs new file mode 100644 index 00000000..323691f0 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs @@ -0,0 +1,156 @@ +using System; +using System.Net.Http; +using System.Threading.Tasks; +using IdentityModel.Client; +using Microsoft.Extensions.Configuration; +using EasyAbp.EShop.Plugins.Baskets.Samples; +using Volo.Abp.DependencyInjection; +using Volo.Abp.IdentityModel; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + public class ClientDemoService : ITransientDependency + { + private readonly ISampleAppService _sampleAppService; + private readonly IIdentityModelAuthenticationService _authenticationService; + private readonly IConfiguration _configuration; + + public ClientDemoService( + ISampleAppService sampleAppService, + IIdentityModelAuthenticationService authenticationService, + IConfiguration configuration) + { + _sampleAppService = sampleAppService; + _authenticationService = authenticationService; + _configuration = configuration; + } + + public async Task RunAsync() + { + await TestWithDynamicProxiesAsync(); + await TestWithHttpClientAndIdentityModelAuthenticationServiceAsync(); + await TestAllManuallyAsync(); + } + + /* Shows how to perform an HTTP request to the API using ABP's dynamic c# proxy + * feature. It is just simple as calling a local service method. + * Authorization and HTTP request details are handled by the ABP framework. + */ + private async Task TestWithDynamicProxiesAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithDynamicProxiesAsync)} *****"); + + var result = await _sampleAppService.GetAsync(); + Console.WriteLine("Result: " + result.Value); + + result = await _sampleAppService.GetAuthorizedAsync(); + Console.WriteLine("Result (authorized): " + result.Value); + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + * It uses ABP's IIdentityModelAuthenticationService to simplify obtaining access tokens. + */ + private async Task TestWithHttpClientAndIdentityModelAuthenticationServiceAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithHttpClientAndIdentityModelAuthenticationServiceAsync)} *****"); + + //Get access token using ABP's IIdentityModelAuthenticationService + + var accessToken = await _authenticationService.GetAccessTokenAsync( + new IdentityClientConfiguration( + _configuration["IdentityClients:Default:Authority"], + _configuration["IdentityClients:Default:Scope"], + _configuration["IdentityClients:Default:ClientId"], + _configuration["IdentityClients:Default:ClientSecret"], + _configuration["IdentityClients:Default:GrantType"], + _configuration["IdentityClients:Default:UserName"], + _configuration["IdentityClients:Default:UserPassword"] + ) + ); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(accessToken); + + var url = _configuration["RemoteServices:Baskets:BaseUrl"] + + "api/Baskets/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + * It obtains access token using IdentityServer's API. See its documentation: + * https://identityserver4.readthedocs.io/en/latest/quickstarts/2_resource_owner_passwords.html + */ + private async Task TestAllManuallyAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestAllManuallyAsync)} *****"); + + //Obtain access token from the IDS4 server + + // discover endpoints from metadata + var client = new HttpClient(); + var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]); + if (disco.IsError) + { + Console.WriteLine(disco.Error); + return; + } + + // request token + var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest + { + Address = disco.TokenEndpoint, + ClientId = _configuration["IdentityClients:Default:ClientId"], + ClientSecret = _configuration["IdentityClients:Default:ClientSecret"], + UserName = _configuration["IdentityClients:Default:UserName"], + Password = _configuration["IdentityClients:Default:UserPassword"], + Scope = _configuration["IdentityClients:Default:Scope"] + }); + + if (tokenResponse.IsError) + { + Console.WriteLine(tokenResponse.Error); + return; + } + + Console.WriteLine(tokenResponse.Json); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(tokenResponse.AccessToken); + + var url = _configuration["RemoteServices:Baskets:BaseUrl"] + + "api/Baskets/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } + } +} \ No newline at end of file diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 00000000..ac9128a0 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp +{ + public class ConsoleTestAppHostedService : IHostedService + { + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = AbpApplicationFactory.Create()) + { + application.Initialize(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + application.Shutdown(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj new file mode 100644 index 00000000..a9a9510c --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp.csproj @@ -0,0 +1,26 @@ + + + + Exe + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + + + + PreserveNewest + Always + + + + + + + + diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/Program.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/Program.cs new file mode 100644 index 00000000..c3c4807a --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/Program.cs @@ -0,0 +1,21 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp +{ + class Program + { + static async Task Main(string[] args) + { + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/appsettings.json b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/appsettings.json new file mode 100644 index 00000000..f1b6c18a --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.HttpApi.Client.ConsoleTestApp/appsettings.json @@ -0,0 +1,21 @@ +{ + "RemoteServices": { + "Default": { + "BaseUrl": "https://localhost:44387/" + }, + "Baskets": { + "BaseUrl": "https://localhost:44311/" + } + }, + "IdentityClients": { + "Default": { + "GrantType": "password", + "ClientId": "Baskets_ConsoleTestApp", + "ClientSecret": "1q2w3e*", + "UserName": "admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44387/", + "Scope": "Baskets" + } + } +} \ No newline at end of file diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj new file mode 100644 index 00000000..90c433a8 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests.csproj @@ -0,0 +1,17 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + + + diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestBase.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestBase.cs similarity index 73% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestBase.cs rename to plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestBase.cs index 83febc80..ce33ed60 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestBase.cs +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestBase.cs @@ -1,9 +1,9 @@ -namespace EasyAbp.EShop.Baskets.MongoDB +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB { /* This class can be used as a base class for MongoDB integration tests, * while SampleRepository_Tests uses a different approach. */ - public abstract class BasketsMongoDbTestBase : BasketsTestBase + public abstract class BasketsMongoDbTestBase : BasketsTestBase { } diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestModule.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestModule.cs new file mode 100644 index 00000000..505356e1 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/BasketsMongoDbTestModule.cs @@ -0,0 +1,25 @@ +using System; +using Volo.Abp.Data; +using Volo.Abp.Modularity; + +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB +{ + [DependsOn( + typeof(BasketsTestBaseModule), + typeof(BasketsMongoDbModule) + )] + public class BasketsMongoDbTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') + + "Db_" + + Guid.NewGuid().ToString("N"); + + Configure(options => + { + options.ConnectionStrings.Default = connectionString; + }); + } + } +} \ No newline at end of file diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/MongoDbFixture.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/MongoDbFixture.cs new file mode 100644 index 00000000..14c0bcef --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/MongoDbFixture.cs @@ -0,0 +1,22 @@ +using System; +using Mongo2Go; + +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB +{ + public class MongoDbFixture : IDisposable + { + private static readonly MongoDbRunner MongoDbRunner; + public static readonly string ConnectionString; + + static MongoDbFixture() + { + MongoDbRunner = MongoDbRunner.Start(); + ConnectionString = MongoDbRunner.ConnectionString; + } + + public void Dispose() + { + MongoDbRunner?.Dispose(); + } + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/MongoTestCollection.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/MongoTestCollection.cs new file mode 100644 index 00000000..973aab7a --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/MongoTestCollection.cs @@ -0,0 +1,10 @@ +using Xunit; + +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB +{ + [CollectionDefinition(Name)] + public class MongoTestCollection : ICollectionFixture + { + public const string Name = "MongoDB Collection"; + } +} \ No newline at end of file diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs new file mode 100644 index 00000000..21ad0560 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs @@ -0,0 +1,14 @@ +using EasyAbp.EShop.Plugins.Baskets.Samples; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Baskets.MongoDB.Samples +{ + [Collection(MongoTestCollection.Name)] + public class SampleRepository_Tests : SampleRepository_Tests + { + /* Don't write custom repository tests here, instead write to + * the base class. + * One exception can be some specific tests related to MongoDB. + */ + } +} diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/BasketsDataSeedContributor.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsDataSeedContributor.cs similarity index 94% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/BasketsDataSeedContributor.cs rename to plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsDataSeedContributor.cs index a7e2951e..615334a8 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/BasketsDataSeedContributor.cs +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsDataSeedContributor.cs @@ -3,7 +3,7 @@ using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { public class BasketsDataSeedContributor : IDataSeedContributor, ITransientDependency { diff --git a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/BasketsTestBase.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsTestBase.cs similarity index 98% rename from modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/BasketsTestBase.cs rename to plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsTestBase.cs index 20ffedf1..cc5a0758 100644 --- a/modules/EasyAbp.EShop.Baskets/test/EasyAbp.EShop.Baskets.TestBase/BasketsTestBase.cs +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsTestBase.cs @@ -6,7 +6,7 @@ using Volo.Abp.Modularity; using Volo.Abp.Uow; using Volo.Abp.Testing; -namespace EasyAbp.EShop.Baskets +namespace EasyAbp.EShop.Plugins.Baskets { /* All test classes are derived from this class, directly or indirectly. */ public abstract class BasketsTestBase : AbpIntegratedTest diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsTestBaseModule.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsTestBaseModule.cs new file mode 100644 index 00000000..2ca6280b --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/BasketsTestBaseModule.cs @@ -0,0 +1,42 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Authorization; +using Volo.Abp.Autofac; +using Volo.Abp.Data; +using Volo.Abp.Modularity; +using Volo.Abp.Threading; + +namespace EasyAbp.EShop.Plugins.Baskets +{ + [DependsOn( + typeof(AbpAutofacModule), + typeof(AbpTestBaseModule), + typeof(AbpAuthorizationModule), + typeof(BasketsDomainModule) + )] + public class BasketsTestBaseModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysAllowAuthorization(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + SeedTestData(context); + } + + private static void SeedTestData(ApplicationInitializationContext context) + { + AsyncHelper.RunSync(async () => + { + using (var scope = context.ServiceProvider.CreateScope()) + { + await scope.ServiceProvider + .GetRequiredService() + .SeedAsync(); + } + }); + } + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj new file mode 100644 index 00000000..e2eab95c --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/EasyAbp.EShop.Plugins.Baskets.TestBase.csproj @@ -0,0 +1,23 @@ + + + + + + netcoreapp3.1 + EasyAbp.EShop.Plugins.Baskets + + + + + + + + + + + + + + + + diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/Samples/SampleRepository_Tests.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/Samples/SampleRepository_Tests.cs new file mode 100644 index 00000000..555b4eed --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/Samples/SampleRepository_Tests.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; +using Volo.Abp.Modularity; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Baskets.Samples +{ + /* Write your custom repository tests like that, in this project, as abstract classes. + * Then inherit these abstract classes from EF Core & MongoDB test projects. + * In this way, both database providers are tests with the same set tests. + */ + public abstract class SampleRepository_Tests : BasketsTestBase + where TStartupModule : IAbpModule + { + //private readonly ISampleRepository _sampleRepository; + + protected SampleRepository_Tests() + { + //_sampleRepository = GetRequiredService(); + } + + [Fact] + public async Task Method1Async() + { + + } + } +} diff --git a/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/Security/FakeCurrentPrincipalAccessor.cs new file mode 100644 index 00000000..b8dbf914 --- /dev/null +++ b/plugins/Baskets/test/EasyAbp.EShop.Plugins.Baskets.TestBase/Security/FakeCurrentPrincipalAccessor.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using System.Security.Claims; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Security.Claims; + +namespace EasyAbp.EShop.Plugins.Baskets.Security +{ + [Dependency(ReplaceServices = true)] + public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor + { + protected override ClaimsPrincipal GetClaimsPrincipal() + { + return GetPrincipal(); + } + + private ClaimsPrincipal _principal; + + private ClaimsPrincipal GetPrincipal() + { + if (_principal == null) + { + lock (this) + { + if (_principal == null) + { + _principal = new ClaimsPrincipal( + new ClaimsIdentity( + new List + { + new Claim(AbpClaimTypes.UserId,"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"), + new Claim(AbpClaimTypes.UserName,"admin"), + new Claim(AbpClaimTypes.Email,"admin@abp.io") + } + ) + ); + } + } + } + + return _principal; + } + } +} diff --git a/samples/EShopSample/aspnet-core/EShopSample.sln b/samples/EShopSample/aspnet-core/EShopSample.sln index 741e7dfd..e453e858 100644 --- a/samples/EShopSample/aspnet-core/EShopSample.sln +++ b/samples/EShopSample/aspnet-core/EShopSample.sln @@ -81,25 +81,25 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Stores.MongoD EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Stores.Web", "..\..\..\modules\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Web\EasyAbp.EShop.Stores.Web.csproj", "{20E6571D-9BAF-4BE7-B7CC-7F5F32D682F8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Baskets", "Baskets", "{83C515D3-9811-4428-9401-17B1AF5406EF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{83C515D3-9811-4428-9401-17B1AF5406EF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Application", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.Application\EasyAbp.EShop.Baskets.Application.csproj", "{F11833F9-83D7-44C6-BE12-2402DFF85E54}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Application", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Application\EasyAbp.EShop.Plugins.Application.csproj", "{F11833F9-83D7-44C6-BE12-2402DFF85E54}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Application.Contracts", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.Application.Contracts\EasyAbp.EShop.Baskets.Application.Contracts.csproj", "{911CAA20-A5CA-4FFC-B7F2-F5B5B485EACA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Application.Contracts", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Application.Contracts\EasyAbp.EShop.Plugins.Application.Contracts.csproj", "{911CAA20-A5CA-4FFC-B7F2-F5B5B485EACA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Domain", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.Domain\EasyAbp.EShop.Baskets.Domain.csproj", "{046AA12C-4DCF-43D2-990C-831D344039DB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Domain", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Domain\EasyAbp.EShop.Plugins.Domain.csproj", "{046AA12C-4DCF-43D2-990C-831D344039DB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Domain.Shared", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.Domain.Shared\EasyAbp.EShop.Baskets.Domain.Shared.csproj", "{494B7797-6CFB-49D6-976A-4466FB8348E2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Domain.Shared", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Domain.Shared\EasyAbp.EShop.Plugins.Domain.Shared.csproj", "{494B7797-6CFB-49D6-976A-4466FB8348E2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.EntityFrameworkCore", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.EntityFrameworkCore\EasyAbp.EShop.Baskets.EntityFrameworkCore.csproj", "{8D53DAA3-A999-45AB-A349-0E917DF01ADC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.EntityFrameworkCore", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.EntityFrameworkCore\EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj", "{8D53DAA3-A999-45AB-A349-0E917DF01ADC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.HttpApi", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.HttpApi\EasyAbp.EShop.Baskets.HttpApi.csproj", "{03E56BB2-AB95-4589-A6EF-EB8FB12D7EDD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.HttpApi", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.HttpApi\EasyAbp.EShop.Plugins.HttpApi.csproj", "{03E56BB2-AB95-4589-A6EF-EB8FB12D7EDD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.HttpApi.Client", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.HttpApi.Client\EasyAbp.EShop.Baskets.HttpApi.Client.csproj", "{6C54DD23-9F05-4FE1-B96C-BC5DC8260115}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.HttpApi.Client", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.HttpApi.Client\EasyAbp.EShop.Plugins.HttpApi.Client.csproj", "{6C54DD23-9F05-4FE1-B96C-BC5DC8260115}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.MongoDB", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.MongoDB\EasyAbp.EShop.Baskets.MongoDB.csproj", "{FB7E2381-138D-4675-AC9C-E7320B6DED8F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.MongoDB", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.MongoDB\EasyAbp.EShop.Plugins.MongoDB.csproj", "{FB7E2381-138D-4675-AC9C-E7320B6DED8F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Web", "..\..\..\modules\EasyAbp.EShop.Baskets\src\EasyAbp.EShop.Baskets.Web\EasyAbp.EShop.Baskets.Web.csproj", "{4209B3D2-A337-4B18-BE1A-30557EEE402C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Web", "..\..\..\modules\EasyAbp.EShop.Plugins\src\EasyAbp.EShop.Plugins.Web\EasyAbp.EShop.Plugins.Web.csproj", "{4209B3D2-A337-4B18-BE1A-30557EEE402C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Orders", "Orders", "{081297DF-C052-4468-9B0D-9094C7D7D427}" EndProject @@ -145,17 +145,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BE3E0AEA-37C EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8E979EEC-F9B0-4167-9A68-757A87C6B6CF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Application.Tests", "..\..\..\modules\EasyAbp.EShop.Baskets\test\EasyAbp.EShop.Baskets.Application.Tests\EasyAbp.EShop.Baskets.Application.Tests.csproj", "{57A12322-85F2-4166-A569-BA18EED3D9BB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Application.Tests", "..\..\..\modules\EasyAbp.EShop.Plugins\test\EasyAbp.EShop.Plugins.Application.Tests\EasyAbp.EShop.Plugins.Application.Tests.csproj", "{57A12322-85F2-4166-A569-BA18EED3D9BB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.Domain.Tests", "..\..\..\modules\EasyAbp.EShop.Baskets\test\EasyAbp.EShop.Baskets.Domain.Tests\EasyAbp.EShop.Baskets.Domain.Tests.csproj", "{4FABE9F3-78B0-4737-A4D1-90BCCFE4283A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.Domain.Tests", "..\..\..\modules\EasyAbp.EShop.Plugins\test\EasyAbp.EShop.Plugins.Domain.Tests\EasyAbp.EShop.Plugins.Domain.Tests.csproj", "{4FABE9F3-78B0-4737-A4D1-90BCCFE4283A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests", "..\..\..\modules\EasyAbp.EShop.Baskets\test\EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests\EasyAbp.EShop.Baskets.EntityFrameworkCore.Tests.csproj", "{40D7BD93-0022-4286-AF58-DA9A9062A819}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests", "..\..\..\modules\EasyAbp.EShop.Plugins\test\EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests\EasyAbp.EShop.Plugins.EntityFrameworkCore.Tests.csproj", "{40D7BD93-0022-4286-AF58-DA9A9062A819}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp", "..\..\..\modules\EasyAbp.EShop.Baskets\test\EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.Baskets.HttpApi.Client.ConsoleTestApp.csproj", "{56C958AA-8C7A-4D3B-99C4-6924F5C84C67}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp", "..\..\..\modules\EasyAbp.EShop.Plugins\test\EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp\EasyAbp.EShop.Plugins.HttpApi.Client.ConsoleTestApp.csproj", "{56C958AA-8C7A-4D3B-99C4-6924F5C84C67}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.MongoDB.Tests", "..\..\..\modules\EasyAbp.EShop.Baskets\test\EasyAbp.EShop.Baskets.MongoDB.Tests\EasyAbp.EShop.Baskets.MongoDB.Tests.csproj", "{E6BF4905-854D-4682-891B-2B945572F9EA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.MongoDB.Tests", "..\..\..\modules\EasyAbp.EShop.Plugins\test\EasyAbp.EShop.Plugins.MongoDB.Tests\EasyAbp.EShop.Plugins.MongoDB.Tests.csproj", "{E6BF4905-854D-4682-891B-2B945572F9EA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Baskets.TestBase", "..\..\..\modules\EasyAbp.EShop.Baskets\test\EasyAbp.EShop.Baskets.TestBase\EasyAbp.EShop.Baskets.TestBase.csproj", "{1AE2272F-1898-450E-B81C-F7BD779654D8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyAbp.EShop.Plugins.TestBase", "..\..\..\modules\EasyAbp.EShop.Plugins\test\EasyAbp.EShop.Plugins.TestBase\EasyAbp.EShop.Plugins.TestBase.csproj", "{1AE2272F-1898-450E-B81C-F7BD779654D8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D6ECFB54-7735-40F5-BA10-F102AF7B5BE7}" EndProject @@ -259,6 +259,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.MongoDB.Tests EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAbp.EShop.TestBase", "..\..\..\integration\EasyAbp.EShop\test\EasyAbp.EShop.TestBase\EasyAbp.EShop.TestBase.csproj", "{45B6591E-6517-4F57-9AFA-F28AF880B725}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{94CC5A11-DA0F-413C-96CA-01DB0FC426E0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Baskets", "Baskets", "{C93BAB01-7D07-4C47-B19A-B91987D10F94}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Coupons", "Coupons", "{6D9A736A-DE07-4517-A40A-B26D6ECD1A93}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ExpressDelivery", "ExpressDelivery", "{04F47882-9E52-4555-A2DC-1A5164EA04DB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -818,6 +826,10 @@ Global {6ADE7CAF-260E-4E71-B4FA-E96819A0F43A} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} {65B43722-08F5-4F0D-ADAE-E7C6768E59BC} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} {45B6591E-6517-4F57-9AFA-F28AF880B725} = {4995F694-3DE4-4678-BED4-3C5D8B5F0158} + {F043A268-ED7C-452B-ADA1-6A62F00D9D79} = {7FA8569F-8D62-4C13-9C8A-98DADA1F09A0} + {C93BAB01-7D07-4C47-B19A-B91987D10F94} = {94CC5A11-DA0F-413C-96CA-01DB0FC426E0} + {6D9A736A-DE07-4517-A40A-B26D6ECD1A93} = {94CC5A11-DA0F-413C-96CA-01DB0FC426E0} + {04F47882-9E52-4555-A2DC-1A5164EA04DB} = {94CC5A11-DA0F-413C-96CA-01DB0FC426E0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs index f290abd6..fe1c876f 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs @@ -1,8 +1,8 @@ using System; using System.IO; using EasyAbp.EShop; -using EasyAbp.EShop.Baskets; -using EasyAbp.EShop.Baskets.Web; +using EasyAbp.EShop.Plugins; +using EasyAbp.EShop.Plugins.Web; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Orders.Web; using EasyAbp.EShop.Payments; @@ -107,15 +107,15 @@ namespace EShopSample.Web { Configure(options => { - options.ConventionalControllers.Create(typeof(EShopBasketsApplicationModule).Assembly, opt => + options.ConventionalControllers.Create(typeof(EShopOrdersApplicationModule).Assembly, opt => { opt.RootPath = "eShop"; }); - options.ConventionalControllers.Create(typeof(EShopOrdersApplicationModule).Assembly, opt => + options.ConventionalControllers.Create(typeof(EShopPaymentsApplicationModule).Assembly, opt => { opt.RootPath = "eShop"; }); - options.ConventionalControllers.Create(typeof(EShopPaymentsApplicationModule).Assembly, opt => + options.ConventionalControllers.Create(typeof(EShopPluginsApplicationModule).Assembly, opt => { opt.RootPath = "eShop"; }); @@ -185,12 +185,6 @@ namespace EShopSample.Web options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}integration{Path.DirectorySeparatorChar}EasyAbp.EShop{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Application")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}integration{Path.DirectorySeparatorChar}EasyAbp.EShop{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Web")); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Domain.Shared")); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Domain")); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Application.Contracts")); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Application")); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Web")); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Domain")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Application.Contracts")); @@ -203,6 +197,12 @@ namespace EShopSample.Web options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payments{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payments.Application")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payments{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payments.Web")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Web")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Domain")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Application.Contracts"));