From 1044ff21b394709d229a38c0161f28bcd29e448b Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Tue, 17 May 2022 03:11:37 +0800 Subject: [PATCH] Generate CRUD for the booking module --- ...EShopPluginsBookingRemoteServiceConsts.cs} | 2 +- .../BookingPermissionDefinitionProvider.cs | 12 +- .../Booking/Permissions/BookingPermissions.cs | 18 +- .../Dtos/CreateProductAssetCategoryDto.cs | 25 + .../CreateProductAssetCategoryPeriodDto.cs | 15 + .../Dtos/ProductAssetCategoryDto.cs | 26 + .../Dtos/ProductAssetCategoryPeriodDto.cs | 13 + .../Dtos/UpdateProductAssetCategoryDto.cs | 17 + .../UpdateProductAssetCategoryPeriodDto.cs | 13 + .../IProductAssetCategoryAppService.cs | 23 + .../Dtos/CreateProductAssetDto.cs | 24 + .../Dtos/CreateProductAssetPeriodDto.cs | 14 + .../ProductAssets/Dtos/ProductAssetDto.cs | 26 + .../Dtos/ProductAssetPeriodDto.cs | 13 + .../Dtos/UpdateProductAssetDto.cs | 18 + .../Dtos/UpdateProductAssetPeriodDto.cs | 12 + .../ProductAssets/IProductAssetAppService.cs | 23 + .../BookingApplicationAutoMapperProfile.cs | 23 +- .../ProductAssetCategoryAppService.cs | 67 + .../ProductAssets/ProductAssetAppService.cs | 67 + .../EShop/Plugins/Booking/BookingConsts.cs | 7 + .../Plugins/Booking/BookingErrorCodes.cs | 3 +- .../Plugins/Booking/Localization/en.json | 51 +- .../Plugins/Booking/Localization/zh-Hans.json | 51 +- .../Plugins/Booking/Localization/zh-Hant.json | 51 +- .../IProductAssetCategoryRepository.cs | 9 + .../ProductAssetCategory.cs | 58 +- .../ProductAssetCategoryPeriod.cs | 16 +- .../ProductAssets/IProductAssetRepository.cs | 9 + .../Booking/ProductAssets/ProductAsset.cs | 75 +- .../ProductAssets/ProductAssetPeriod.cs | 16 +- .../Shared/DuplicatePeriodException.cs | 12 + .../Booking/Shared/PeriodNotFoundException.cs | 12 + .../EntityFrameworkCore/BookingDbContext.cs | 8 +- ...BookingDbContextModelCreatingExtensions.cs | 41 +- ...PluginsBookingEntityFrameworkCoreModule.cs | 6 +- .../EntityFrameworkCore/IBookingDbContext.cs | 9 +- ...ctAssetCategoryEfCoreQuerableExtensions.cs | 18 + .../ProductAssetCategoryRepository.cs | 21 + .../ProductAssetEfCoreQuerableExtensions.cs | 18 + .../ProductAssets/ProductAssetRepository.cs | 21 + .../EShopPluginsBookingHttpApiClientModule.cs | 2 +- .../Plugins/Booking/BookingController.cs | 2 +- .../ProductAssetCategoryController.cs | 78 + .../ProductAssets/ProductAssetController.cs | 77 + .../BookingWebAutoMapperProfile.cs | 27 +- .../Menus/BookingMenuContributor.cs | 36 +- .../Menus/BookingMenus.cs | 6 +- .../ProductAssetCategory/CreateModal.cshtml | 18 + .../CreateModal.cshtml.cs | 28 + .../ProductAssetCategory/EditModal.cshtml | 19 + .../ProductAssetCategory/EditModal.cshtml.cs | 39 + .../ProductAssetCategory/Index.cshtml | 48 + .../ProductAssetCategory/Index.cshtml.cs | 12 + .../CreateProductAssetCategoryViewModel.cs | 30 + .../EditProductAssetCategoryViewModel.cs | 18 + .../ProductAssetCategory/index.css | 0 .../ProductAssetCategory/index.js | 96 + .../CreateModal.cshtml | 19 + .../CreateModal.cshtml.cs | 33 + .../EditModal.cshtml | 20 + .../EditModal.cshtml.cs | 45 + .../ProductAssetCategoryPeriod/Index.cshtml | 52 + .../Index.cshtml.cs | 17 + ...eateProductAssetCategoryPeriodViewModel.cs | 15 + ...EditProductAssetCategoryPeriodViewModel.cs | 12 + .../ProductAssetCategoryPeriod/index.css | 0 .../ProductAssetCategoryPeriod/index.js | 80 + .../ProductAsset/CreateModal.cshtml | 18 + .../ProductAsset/CreateModal.cshtml.cs | 28 + .../ProductAsset/EditModal.cshtml | 19 + .../ProductAsset/EditModal.cshtml.cs | 39 + .../ProductAssets/ProductAsset/Index.cshtml | 48 + .../ProductAsset/Index.cshtml.cs | 12 + .../ViewModels/CreateProductAssetViewModel.cs | 31 + .../ViewModels/EditProductAssetViewModel.cs | 19 + .../ProductAssets/ProductAsset/index.css | 0 .../ProductAssets/ProductAsset/index.js | 96 + .../ProductAssetPeriod/CreateModal.cshtml | 19 + .../ProductAssetPeriod/CreateModal.cshtml.cs | 33 + .../ProductAssetPeriod/EditModal.cshtml | 20 + .../ProductAssetPeriod/EditModal.cshtml.cs | 45 + .../ProductAssetPeriod/Index.cshtml | 52 + .../ProductAssetPeriod/Index.cshtml.cs | 17 + .../CreateProductAssetPeriodViewModel.cs | 16 + .../EditProductAssetPeriodViewModel.cs | 13 + .../ProductAssetPeriod/index.css | 0 .../ProductAssets/ProductAssetPeriod/index.js | 80 + .../ProductAssetCategoryAppServiceTests.cs | 28 + .../ProductAssetAppServiceTests.cs | 28 + .../ProductAssetCategoryDomainTests.cs | 25 + .../ProductAssets/ProductAssetDomainTests.cs | 25 + .../ProductAssetCategoryRepositoryTests.cs | 33 + .../ProductAssetRepositoryTests.cs | 33 + .../EShopSample.Application.Contracts.csproj | 1 + .../EShopSampleApplicationContractsModule.cs | 2 + .../EShopSample.Application.csproj | 1 + .../EShopSampleApplicationModule.cs | 2 + .../EShopSample.Domain.Shared.csproj | 1 + .../EShopSampleDomainSharedModule.cs | 2 + .../EShopSample.Domain.csproj | 1 + .../EShopSampleDomainModule.cs | 2 + .../EShopSample.EntityFrameworkCore.csproj | 1 + .../EShopSampleDbContext.cs | 2 + .../EShopSampleEntityFrameworkCoreModule.cs | 2 + ..._AddedEntitiesInBookingPlugins.Designer.cs | 5363 +++++++++++++++++ ...516160609_AddedEntitiesInBookingPlugins.cs | 126 + .../EShopSampleDbContextModelSnapshot.cs | 202 +- .../EShopSample.HttpApi.Client.csproj | 1 + .../EShopSampleHttpApiClientModule.cs | 2 + .../EShopSample.HttpApi.csproj | 1 + .../EShopSampleHttpApiModule.cs | 2 + .../EShopSample.Web/EShopSample.Web.csproj | 1 + .../EShopSample.Web/EShopSampleWebModule.cs | 9 + .../src/EShopSample.Web/Program.cs | 3 + 115 files changed, 8254 insertions(+), 42 deletions(-) rename plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/{BookingRemoteServiceConsts.cs => EShopPluginsBookingRemoteServiceConsts.cs} (78%) create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryPeriodDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryPeriodDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryPeriodDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryAppService.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetPeriodDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetPeriodDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetPeriodDto.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetAppService.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryAppService.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetAppService.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingConsts.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryRepository.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetRepository.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/DuplicatePeriodException.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/PeriodNotFoundException.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryEfCoreQuerableExtensions.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryRepository.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetEfCoreQuerableExtensions.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetRepository.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryController.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetController.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/CreateProductAssetCategoryViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/EditProductAssetCategoryViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/index.css create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/index.js create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/CreateProductAssetCategoryPeriodViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/EditProductAssetCategoryPeriodViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/index.css create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/index.js create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/CreateProductAssetViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/EditProductAssetViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/index.css create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/index.js create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/CreateProductAssetPeriodViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/EditProductAssetPeriodViewModel.cs create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/index.css create mode 100644 plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/index.js create mode 100644 plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssetCategories/ProductAssetCategoryAppServiceTests.cs create mode 100644 plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssets/ProductAssetAppServiceTests.cs create mode 100644 plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssetCategories/ProductAssetCategoryDomainTests.cs create mode 100644 plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssets/ProductAssetDomainTests.cs create mode 100644 plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssetCategories/ProductAssetCategoryRepositoryTests.cs create mode 100644 plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssets/ProductAssetRepositoryTests.cs create mode 100644 samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.Designer.cs create mode 100644 samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.cs diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingRemoteServiceConsts.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingRemoteServiceConsts.cs similarity index 78% rename from plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingRemoteServiceConsts.cs rename to plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingRemoteServiceConsts.cs index cd1db9a6..fe705f76 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/BookingRemoteServiceConsts.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingRemoteServiceConsts.cs @@ -1,6 +1,6 @@ namespace EasyAbp.EShop.Plugins.Booking; -public class BookingRemoteServiceConsts +public class EShopPluginsBookingRemoteServiceConsts { public const string RemoteServiceName = "EasyAbpEShopPluginsBooking"; diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissionDefinitionProvider.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissionDefinitionProvider.cs index 1225112d..849eb9b9 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissionDefinitionProvider.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissionDefinitionProvider.cs @@ -1,4 +1,4 @@ -using EasyAbp.EShop.Plugins.Booking.Localization; +using EasyAbp.EShop.Plugins.Booking.Localization; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Localization; @@ -9,6 +9,16 @@ public class BookingPermissionDefinitionProvider : PermissionDefinitionProvider public override void Define(IPermissionDefinitionContext context) { var myGroup = context.AddGroup(BookingPermissions.GroupName, L("Permission:Booking")); + + var productAssetPermission = myGroup.AddPermission(BookingPermissions.ProductAsset.Default, L("Permission:ProductAsset")); + productAssetPermission.AddChild(BookingPermissions.ProductAsset.Create, L("Permission:Create")); + productAssetPermission.AddChild(BookingPermissions.ProductAsset.Update, L("Permission:Update")); + productAssetPermission.AddChild(BookingPermissions.ProductAsset.Delete, L("Permission:Delete")); + + var productAssetCategoryPermission = myGroup.AddPermission(BookingPermissions.ProductAssetCategory.Default, L("Permission:ProductAssetCategory")); + productAssetCategoryPermission.AddChild(BookingPermissions.ProductAssetCategory.Create, L("Permission:Create")); + productAssetCategoryPermission.AddChild(BookingPermissions.ProductAssetCategory.Update, L("Permission:Update")); + productAssetCategoryPermission.AddChild(BookingPermissions.ProductAssetCategory.Delete, L("Permission:Delete")); } private static LocalizableString L(string name) diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissions.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissions.cs index 27aaab2d..c0ceaa96 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissions.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/Permissions/BookingPermissions.cs @@ -1,4 +1,4 @@ -using Volo.Abp.Reflection; +using Volo.Abp.Reflection; namespace EasyAbp.EShop.Plugins.Booking.Permissions; @@ -10,4 +10,20 @@ public class BookingPermissions { return ReflectionHelper.GetPublicConstantsRecursively(typeof(BookingPermissions)); } + + public class ProductAsset + { + public const string Default = GroupName + ".ProductAsset"; + public const string Update = Default + ".Update"; + public const string Create = Default + ".Create"; + public const string Delete = Default + ".Delete"; + } + + public class ProductAssetCategory + { + public const string Default = GroupName + ".ProductAssetCategory"; + public const string Update = Default + ".Update"; + public const string Create = Default + ".Create"; + public const string Delete = Default + ".Delete"; + } } diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryDto.cs new file mode 100644 index 00000000..1814223f --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryDto.cs @@ -0,0 +1,25 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos +{ + [Serializable] + public class CreateProductAssetCategoryDto + { + public Guid ProductId { get; set; } + + public Guid ProductSkuId { get; set; } + + public Guid AssetCategoryId { get; set; } + + public Guid PeriodSchemeId { get; set; } + + public DateTime FromTime { get; set; } + + public DateTime? ToTime { get; set; } + + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryPeriodDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryPeriodDto.cs new file mode 100644 index 00000000..5dd19a47 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/CreateProductAssetCategoryPeriodDto.cs @@ -0,0 +1,15 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos +{ + [Serializable] + public class CreateProductAssetCategoryPeriodDto + { + public Guid PeriodId { get; set; } + + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryDto.cs new file mode 100644 index 00000000..babb1f05 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryDto.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos +{ + [Serializable] + public class ProductAssetCategoryDto : AuditedEntityDto + { + public Guid ProductId { get; set; } + + public Guid ProductSkuId { get; set; } + + public Guid AssetCategoryId { get; set; } + + public Guid PeriodSchemeId { get; set; } + + public DateTime FromTime { get; set; } + + public DateTime? ToTime { get; set; } + + public decimal? Price { get; set; } + + public List Periods { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryPeriodDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryPeriodDto.cs new file mode 100644 index 00000000..70578b57 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/ProductAssetCategoryPeriodDto.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos +{ + [Serializable] + public class ProductAssetCategoryPeriodDto : EntityDto + { + public Guid PeriodId { get; set; } + + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryDto.cs new file mode 100644 index 00000000..920d5eb5 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryDto.cs @@ -0,0 +1,17 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos +{ + [Serializable] + public class UpdateProductAssetCategoryDto + { + public DateTime FromTime { get; set; } + + public DateTime? ToTime { get; set; } + + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryPeriodDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryPeriodDto.cs new file mode 100644 index 00000000..2dddac69 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/Dtos/UpdateProductAssetCategoryPeriodDto.cs @@ -0,0 +1,13 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos +{ + [Serializable] + public class UpdateProductAssetCategoryPeriodDto + { + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryAppService.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryAppService.cs new file mode 100644 index 00000000..e0e8c63a --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryAppService.cs @@ -0,0 +1,23 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + public interface IProductAssetCategoryAppService : + ICrudAppService< + ProductAssetCategoryDto, + Guid, + PagedAndSortedResultRequestDto, + CreateProductAssetCategoryDto, + UpdateProductAssetCategoryDto> + { + Task CreatePeriodAsync(Guid productAssetCategoryId, CreateProductAssetCategoryPeriodDto input); + + Task UpdatePeriodAsync(Guid productAssetCategoryId, Guid periodId, UpdateProductAssetCategoryPeriodDto input); + + Task DeletePeriodAsync(Guid productAssetCategoryId, Guid periodId); + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetDto.cs new file mode 100644 index 00000000..bea61ce6 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetDto.cs @@ -0,0 +1,24 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos +{ + [Serializable] + public class CreateProductAssetDto + { + public Guid ProductId { get; set; } + + public Guid ProductSkuId { get; set; } + + public Guid AssetId { get; set; } + + public Guid PeriodSchemeId { get; set; } + + public DateTime FromTime { get; set; } + + public DateTime? ToTime { get; set; } + + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetPeriodDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetPeriodDto.cs new file mode 100644 index 00000000..e6fb5b80 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/CreateProductAssetPeriodDto.cs @@ -0,0 +1,14 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos +{ + [Serializable] + public class CreateProductAssetPeriodDto + { + public Guid PeriodId { get; set; } + + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetDto.cs new file mode 100644 index 00000000..7e0d4c47 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetDto.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos +{ + [Serializable] + public class ProductAssetDto : AuditedEntityDto + { + public Guid ProductId { get; set; } + + public Guid ProductSkuId { get; set; } + + public Guid AssetId { get; set; } + + public Guid PeriodSchemeId { get; set; } + + public DateTime FromTime { get; set; } + + public DateTime? ToTime { get; set; } + + public decimal? Price { get; set; } + + public List Periods { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetPeriodDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetPeriodDto.cs new file mode 100644 index 00000000..b631fe39 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/ProductAssetPeriodDto.cs @@ -0,0 +1,13 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos +{ + [Serializable] + public class ProductAssetPeriodDto : EntityDto + { + public Guid PeriodId { get; set; } + + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetDto.cs new file mode 100644 index 00000000..fb1626fe --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos +{ + [Serializable] + public class UpdateProductAssetDto + { + public DateTime FromTime { get; set; } + + public DateTime? ToTime { get; set; } + + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetPeriodDto.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetPeriodDto.cs new file mode 100644 index 00000000..baed2f99 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/Dtos/UpdateProductAssetPeriodDto.cs @@ -0,0 +1,12 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos +{ + [Serializable] + public class UpdateProductAssetPeriodDto + { + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetAppService.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetAppService.cs new file mode 100644 index 00000000..c1c77b52 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application.Contracts/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetAppService.cs @@ -0,0 +1,23 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + public interface IProductAssetAppService : + ICrudAppService< + ProductAssetDto, + Guid, + PagedAndSortedResultRequestDto, + CreateProductAssetDto, + UpdateProductAssetDto> + { + Task CreatePeriodAsync(Guid productAssetId, CreateProductAssetPeriodDto input); + + Task UpdatePeriodAsync(Guid productAssetId, Guid periodId, UpdateProductAssetPeriodDto input); + + Task DeletePeriodAsync(Guid productAssetId, Guid periodId); + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationAutoMapperProfile.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationAutoMapperProfile.cs index e1b8199b..e27482dc 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationAutoMapperProfile.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/BookingApplicationAutoMapperProfile.cs @@ -1,4 +1,8 @@ -using AutoMapper; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using AutoMapper; namespace EasyAbp.EShop.Plugins.Booking; @@ -9,5 +13,20 @@ public class BookingApplicationAutoMapperProfile : Profile /* You can configure your AutoMapper mapping configuration here. * Alternatively, you can split your mapping configurations * into multiple profile classes for a better organization. */ + CreateMap(); + CreateMap(MemberList.Source); + CreateMap(MemberList.Source); + + CreateMap(); + CreateMap(MemberList.Source); + CreateMap(MemberList.Source); + + CreateMap(); + CreateMap(MemberList.Source); + CreateMap(MemberList.Source); + + CreateMap(); + CreateMap(MemberList.Source); + CreateMap(MemberList.Source); } -} +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryAppService.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryAppService.cs new file mode 100644 index 00000000..ad693760 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryAppService.cs @@ -0,0 +1,67 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.Permissions; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + public class ProductAssetCategoryAppService : CrudAppService, + IProductAssetCategoryAppService + { + protected override string GetPolicyName { get; set; } = BookingPermissions.ProductAssetCategory.Default; + protected override string GetListPolicyName { get; set; } = BookingPermissions.ProductAssetCategory.Default; + protected override string CreatePolicyName { get; set; } = BookingPermissions.ProductAssetCategory.Create; + protected override string UpdatePolicyName { get; set; } = BookingPermissions.ProductAssetCategory.Update; + protected override string DeletePolicyName { get; set; } = BookingPermissions.ProductAssetCategory.Delete; + + private readonly IProductAssetCategoryRepository _repository; + + public ProductAssetCategoryAppService(IProductAssetCategoryRepository repository) : base(repository) + { + _repository = repository; + } + + public virtual async Task CreatePeriodAsync(Guid productAssetCategoryId, CreateProductAssetCategoryPeriodDto input) + { + await CheckUpdatePolicyAsync(); + + var productAsset = await GetEntityByIdAsync(productAssetCategoryId); + + productAsset.AddPeriod(ObjectMapper.Map(input)); + + await _repository.UpdateAsync(productAsset, true); + + return await MapToGetOutputDtoAsync(productAsset); + } + + public virtual async Task UpdatePeriodAsync(Guid productAssetCategoryId, Guid periodId, UpdateProductAssetCategoryPeriodDto input) + { + await CheckUpdatePolicyAsync(); + + var productAsset = await GetEntityByIdAsync(productAssetCategoryId); + + var productAssetCategoryPeriod = productAsset.GetPeriod(periodId); + + ObjectMapper.Map(input, productAssetCategoryPeriod); + + await _repository.UpdateAsync(productAsset, true); + + return await MapToGetOutputDtoAsync(productAsset); + } + + public virtual async Task DeletePeriodAsync(Guid productAssetCategoryId, Guid periodId) + { + await CheckUpdatePolicyAsync(); + + var productAsset = await GetEntityByIdAsync(productAssetCategoryId); + + productAsset.RemovePeriod(periodId); + + await _repository.UpdateAsync(productAsset, true); + + return await MapToGetOutputDtoAsync(productAsset); + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetAppService.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetAppService.cs new file mode 100644 index 00000000..14fd2a89 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Application/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetAppService.cs @@ -0,0 +1,67 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.Permissions; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + public class ProductAssetAppService : CrudAppService, + IProductAssetAppService + { + protected override string GetPolicyName { get; set; } = BookingPermissions.ProductAsset.Default; + protected override string GetListPolicyName { get; set; } = BookingPermissions.ProductAsset.Default; + protected override string CreatePolicyName { get; set; } = BookingPermissions.ProductAsset.Create; + protected override string UpdatePolicyName { get; set; } = BookingPermissions.ProductAsset.Update; + protected override string DeletePolicyName { get; set; } = BookingPermissions.ProductAsset.Delete; + + private readonly IProductAssetRepository _repository; + + public ProductAssetAppService(IProductAssetRepository repository) : base(repository) + { + _repository = repository; + } + + public virtual async Task CreatePeriodAsync(Guid productAssetId, CreateProductAssetPeriodDto input) + { + await CheckUpdatePolicyAsync(); + + var productAsset = await GetEntityByIdAsync(productAssetId); + + productAsset.AddPeriod(ObjectMapper.Map(input)); + + await _repository.UpdateAsync(productAsset, true); + + return await MapToGetOutputDtoAsync(productAsset); + } + + public virtual async Task UpdatePeriodAsync(Guid productAssetId, Guid periodId, UpdateProductAssetPeriodDto input) + { + await CheckUpdatePolicyAsync(); + + var productAsset = await GetEntityByIdAsync(productAssetId); + + var productAssetPeriod = productAsset.GetPeriod(periodId); + + ObjectMapper.Map(input, productAssetPeriod); + + await _repository.UpdateAsync(productAsset, true); + + return await MapToGetOutputDtoAsync(productAsset); + } + + public virtual async Task DeletePeriodAsync(Guid productAssetId, Guid periodId) + { + await CheckUpdatePolicyAsync(); + + var productAsset = await GetEntityByIdAsync(productAssetId); + + productAsset.RemovePeriod(periodId); + + await _repository.UpdateAsync(productAsset, true); + + return await MapToGetOutputDtoAsync(productAsset); + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingConsts.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingConsts.cs new file mode 100644 index 00000000..b481429d --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingConsts.cs @@ -0,0 +1,7 @@ +namespace EasyAbp.EShop.Plugins.Booking; + +public class BookingConsts +{ + public const double MinimumPrice = 0f; + public const double MaximumPrice = 999999999999.99999999f; +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingErrorCodes.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingErrorCodes.cs index 6a972ee9..457046d8 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingErrorCodes.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/BookingErrorCodes.cs @@ -2,5 +2,6 @@ public static class BookingErrorCodes { - //Add your business exception error codes here... + public const string PeriodNotFound = "EasyAbp.EShop.Plugins.Booking:PeriodNotFound"; + public const string DuplicatePeriod = "EasyAbp.EShop.Plugins.Booking:DuplicatePeriod"; } diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/en.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/en.json index fa424c46..63a3861d 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/en.json +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/en.json @@ -1,7 +1,54 @@ { "culture": "en", "texts": { - "MyAccount": "My account", - "SamplePageMessage": "A sample page for the Booking module" + "Menu:Booking": "Booking business", + "Permission:ProductAsset": "Asset prices", + "Permission:Create": "Create", + "Permission:Update": "Update", + "Permission:Delete": "Delete", + "Menu:ProductAsset": "Asset prices", + "ProductAsset": "Asset prices", + "ProductAssetProductId": "Product ID", + "ProductAssetProductSkuId": "Product SKU ID", + "ProductAssetAssetId": "Asset ID", + "ProductAssetPeriodSchemeId": "Period Scheme ID", + "ProductAssetFromTime": "From time", + "ProductAssetToTime": "To time", + "ProductAssetPrice": "Price", + "ProductAssetPeriods": "Period prices", + "CreateProductAsset": "New", + "EditProductAsset": "Edit", + "ProductAssetDeletionConfirmationMessage": "Are you sure to delete the product asset {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:ProductAssetPeriod": "Asset period prices", + "ProductAssetPeriod": "Asset period prices", + "ProductAssetPeriodPeriodId": "Period ID", + "ProductAssetPeriodPrice": "Price", + "CreateProductAssetPeriod": "New", + "EditProductAssetPeriod": "Edit", + "ProductAssetPeriodDeletionConfirmationMessage": "Are you sure to delete the product asset period {0}?", + "Permission:ProductAssetCategory": "Asset category prices", + "Menu:ProductAssetCategory": "Asset category prices", + "ProductAssetCategory": "Asset category prices", + "ProductAssetCategoryProductId": "Product ID", + "ProductAssetCategoryProductSkuId": "Product SKU ID", + "ProductAssetCategoryAssetCategoryId": "Asset Category ID", + "ProductAssetCategoryPeriodSchemeId": "Period Scheme ID", + "ProductAssetCategoryFromTime": "From time", + "ProductAssetCategoryToTime": "To time", + "ProductAssetCategoryPrice": "Price", + "ProductAssetCategoryPeriods": "Period prices", + "CreateProductAssetCategory": "New", + "EditProductAssetCategory": "Edit", + "ProductAssetCategoryDeletionConfirmationMessage": "Are you sure to delete the product asset category {0}?", + "Menu:ProductAssetCategoryPeriod": "Asset category period prices", + "ProductAssetCategoryPeriod": "Asset category period prices", + "ProductAssetCategoryPeriodPeriodId": "Period ID", + "ProductAssetCategoryPeriodPrice": "Price", + "CreateProductAssetCategoryPeriod": "New", + "EditProductAssetCategoryPeriod": "Edit", + "ProductAssetCategoryPeriodDeletionConfirmationMessage": "Are you sure to delete the product asset category period {0}?", + "EasyAbp.EShop.Plugins.Booking:PeriodNotFound": "Period {id} not found.", + "EasyAbp.EShop.Plugins.Booking:DuplicatePeriod": "Period {id} exists." } } \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hans.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hans.json index 8811773c..ec1d96d3 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hans.json +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hans.json @@ -1,7 +1,54 @@ { "culture": "zh-Hans", "texts": { - "MyAccount": "我的账户", - "SamplePageMessage": "Booking模块的示例页面" + "Menu:Booking": "预约业务", + "Permission:ProductAsset": "资产价格", + "Permission:Create": "新建", + "Permission:Update": "更新", + "Permission:Delete": "删除", + "Menu:ProductAsset": "资产价格", + "ProductAsset": "资产价格", + "ProductAssetProductId": "产品 ID", + "ProductAssetProductSkuId": "产品 SKU ID", + "ProductAssetAssetId": "资产 ID", + "ProductAssetPeriodSchemeId": "时段方案 ID", + "ProductAssetFromTime": "生效时间", + "ProductAssetToTime": "结束时间", + "ProductAssetPrice": "价格", + "ProductAssetPeriods": "时段价格", + "CreateProductAsset": "新建", + "EditProductAsset": "编辑", + "ProductAssetDeletionConfirmationMessage": "确认删除资产价格 {0}?", + "SuccessfullyDeleted": "删除成功", + "Menu:ProductAssetPeriod": "资产时段价格", + "ProductAssetPeriod": "资产时段价格", + "ProductAssetPeriodPeriodId": "时段 ID", + "ProductAssetPeriodPrice": "价格", + "CreateProductAssetPeriod": "新建", + "EditProductAssetPeriod": "编辑", + "ProductAssetPeriodDeletionConfirmationMessage": "确认删除资产时段价格 {0}?", + "Permission:ProductAssetCategory": "资产类目价格", + "Menu:ProductAssetCategory": "资产类目价格", + "ProductAssetCategory": "资产类目价格", + "ProductAssetCategoryProductId": "产品 ID", + "ProductAssetCategoryProductSkuId": "产品 SKU ID", + "ProductAssetCategoryAssetCategoryId": "资产目录 ID", + "ProductAssetCategoryPeriodSchemeId": "时段方案 ID", + "ProductAssetCategoryFromTime": "生效时间", + "ProductAssetCategoryToTime": "结束时间", + "ProductAssetCategoryPrice": "价格", + "ProductAssetCategoryPeriods": "时段价格", + "CreateProductAssetCategory": "新建", + "EditProductAssetCategory": "编辑", + "ProductAssetCategoryDeletionConfirmationMessage": "确认删除资产类目价格 {0}?", + "Menu:ProductAssetCategoryPeriod": "资产类目时段价格", + "ProductAssetCategoryPeriod": "资产类目时段价格", + "ProductAssetCategoryPeriodPeriodId": "时段 ID", + "ProductAssetCategoryPeriodPrice": "价格", + "CreateProductAssetCategoryPeriod": "新建", + "EditProductAssetCategoryPeriod": "编辑", + "ProductAssetCategoryPeriodDeletionConfirmationMessage": "确认删除资产类目时段价格 {0}?", + "EasyAbp.EShop.Plugins.Booking:PeriodNotFound": "时段 {id} 不存在。", + "EasyAbp.EShop.Plugins.Booking:DuplicatePeriod": "时段 {id} 已存在。" } } \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hant.json b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hant.json index e74219bd..0e10c811 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hant.json +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain.Shared/EasyAbp/EShop/Plugins/Booking/Localization/zh-Hant.json @@ -1,7 +1,54 @@ { "culture": "zh-Hant", "texts": { - "MyAccount": "我的賬戶", - "SamplePageMessage": "Booking 模塊的示例頁面" + "Menu:Booking": "預約業務", + "Permission:ProductAsset": "資產價格", + "Permission:Create": "新建", + "Permission:Update": "更新", + "Permission:Delete": "刪除", + "Menu:ProductAsset": "資產價格", + "ProductAsset": "資產價格", + "ProductAssetProductId": "產品 ID", + "ProductAssetProductSkuId": "產品 SKU ID", + "ProductAssetAssetId": "資產 ID", + "ProductAssetPeriodSchemeId": "時段方案 ID", + "ProductAssetFromTime": "生效時間", + "ProductAssetToTime": "結束時間", + "ProductAssetPrice": "價格", + "ProductAssetPeriods": "時段價格", + "CreateProductAsset": "新建", + "EditProductAsset": "編輯", + "ProductAssetDeletionConfirmationMessage": "確認刪除資產價格 {0}?", + "SuccessfullyDeleted": "刪除成功", + "Menu:ProductAssetPeriod": "資產時段價格", + "ProductAssetPeriod": "資產時段價格", + "ProductAssetPeriodPeriodId": "時段 ID", + "ProductAssetPeriodPrice": "價格", + "CreateProductAssetPeriod": "新建", + "EditProductAssetPeriod": "編輯", + "ProductAssetPeriodDeletionConfirmationMessage": "確認刪除資產時段價格 {0}?", + "Permission:ProductAssetCategory": "資產類目價格", + "Menu:ProductAssetCategory": "資產類目價格", + "ProductAssetCategory": "資產類目價格", + "ProductAssetCategoryProductId": "產品 ID", + "ProductAssetCategoryProductSkuId": "產品 SKU ID", + "ProductAssetCategoryAssetCategoryId": "資產目錄 ID", + "ProductAssetCategoryPeriodSchemeId": "時段方案 ID", + "ProductAssetCategoryFromTime": "生效時間", + "ProductAssetCategoryToTime": "結束時間", + "ProductAssetCategoryPrice": "價格", + "ProductAssetCategoryPeriods": "時段價格", + "CreateProductAssetCategory": "新建", + "EditProductAssetCategory": "編輯", + "ProductAssetCategoryDeletionConfirmationMessage": "確認刪除資產類目價格 {0}?", + "Menu:ProductAssetCategoryPeriod": "資產類目時段價格", + "ProductAssetCategoryPeriod": "資產類目時段價格", + "ProductAssetCategoryPeriodPeriodId": "時段 ID", + "ProductAssetCategoryPeriodPrice": "價格", + "CreateProductAssetCategoryPeriod": "新建", + "EditProductAssetCategoryPeriod": "編輯", + "ProductAssetCategoryPeriodDeletionConfirmationMessage": "確認刪除資產類目時段價格 {0}?", + "EasyAbp.EShop.Plugins.Booking:PeriodNotFound": "時段 {id} 不存在。", + "EasyAbp.EShop.Plugins.Booking:DuplicatePeriod": "時段 {id} 已存在。" } } \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryRepository.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryRepository.cs new file mode 100644 index 00000000..6ed3f163 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/IProductAssetCategoryRepository.cs @@ -0,0 +1,9 @@ +using System; +using Volo.Abp.Domain.Repositories; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + public interface IProductAssetCategoryRepository : IRepository + { + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory.cs index 4b496c29..8de38269 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Linq; +using EasyAbp.EShop.Plugins.Booking.Shared; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -43,4 +45,58 @@ public class ProductAssetCategory : AuditedAggregateRoot, IMultiTenant /// Customize prices for specified periods. /// public List Periods { get; protected set; } -} \ No newline at end of file + + protected ProductAssetCategory() + { + Periods = new List(); + } + + public ProductAssetCategory( + Guid id, + Guid? tenantId, + Guid productId, + Guid productSkuId, + Guid assetCategoryId, + Guid periodSchemeId, + DateTime fromTime, + DateTime? toTime, + decimal? price, + List periods + ) : base(id) + { + TenantId = tenantId; + ProductId = productId; + ProductSkuId = productSkuId; + AssetCategoryId = assetCategoryId; + PeriodSchemeId = periodSchemeId; + FromTime = fromTime; + ToTime = toTime; + Price = price; + Periods = periods ?? new List(); + } + + public void AddPeriod(ProductAssetCategoryPeriod productAssetCategoryPeriod) + { + if (FindPeriod(productAssetCategoryPeriod.PeriodId) is not null) + { + throw new DuplicatePeriodException(productAssetCategoryPeriod.PeriodId); + } + + Periods.Add(productAssetCategoryPeriod); + } + + public void RemovePeriod(Guid periodId) + { + Periods.Remove(GetPeriod(periodId)); + } + + public ProductAssetCategoryPeriod GetPeriod(Guid periodId) + { + return FindPeriod(periodId) ?? throw new PeriodNotFoundException(periodId); + } + + public ProductAssetCategoryPeriod FindPeriod(Guid periodId) + { + return Periods.FirstOrDefault(x => x.PeriodId == periodId); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod.cs index 0a830e61..bcb71f03 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod.cs @@ -8,4 +8,18 @@ public class ProductAssetCategoryPeriod : Entity public virtual Guid PeriodId { get; protected set; } public virtual decimal Price { get; protected set; } -} \ No newline at end of file + + protected ProductAssetCategoryPeriod() + { + } + + public ProductAssetCategoryPeriod( + Guid id, + Guid periodId, + decimal price + ) : base(id) + { + PeriodId = periodId; + Price = price; + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetRepository.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetRepository.cs new file mode 100644 index 00000000..a695211b --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/IProductAssetRepository.cs @@ -0,0 +1,9 @@ +using System; +using Volo.Abp.Domain.Repositories; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + public interface IProductAssetRepository : IRepository + { + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAsset.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAsset.cs index 41b7d213..88890b0f 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAsset.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAsset.cs @@ -1,6 +1,8 @@ using System; using System.Collections.Generic; +using System.Linq; using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.Shared; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -15,34 +17,89 @@ namespace EasyAbp.EShop.Plugins.Booking.ProductAssets; public class ProductAsset : AuditedAggregateRoot, IMultiTenant { public virtual Guid? TenantId { get; protected set; } - + public virtual Guid ProductId { get; protected set; } - + public virtual Guid ProductSkuId { get; protected set; } - + public virtual Guid AssetId { get; protected set; } - + public virtual Guid PeriodSchemeId { get; protected set; } - + /// /// When will this mapping start taking effect. /// public virtual DateTime FromTime { get; protected set; } - + /// /// When will this mapping stop taking effect. /// Setting to null means until forever. /// public virtual DateTime? ToTime { get; protected set; } - + /// /// Price for any period. /// Fall back to the price of ProductSku if null. /// public virtual decimal? Price { get; protected set; } - + /// /// Customize prices for specified periods. /// public List Periods { get; protected set; } -} \ No newline at end of file + + protected ProductAsset() + { + Periods = new List(); + } + + public ProductAsset( + Guid id, + Guid? tenantId, + Guid productId, + Guid productSkuId, + Guid assetId, + Guid periodSchemeId, + DateTime fromTime, + DateTime? toTime, + decimal? price, + List periods + ) : base(id) + { + TenantId = tenantId; + ProductId = productId; + ProductSkuId = productSkuId; + AssetId = assetId; + PeriodSchemeId = periodSchemeId; + FromTime = fromTime; + ToTime = toTime; + Price = price; + + Periods = periods ?? new List(); + } + + public void AddPeriod(ProductAssetPeriod productAssetPeriod) + { + if (FindPeriod(productAssetPeriod.PeriodId) is not null) + { + throw new DuplicatePeriodException(productAssetPeriod.PeriodId); + } + + Periods.Add(productAssetPeriod); + } + + public void RemovePeriod(Guid periodId) + { + Periods.Remove(GetPeriod(periodId)); + } + + public ProductAssetPeriod GetPeriod(Guid periodId) + { + return FindPeriod(periodId) ?? throw new PeriodNotFoundException(periodId); + } + + public ProductAssetPeriod FindPeriod(Guid periodId) + { + return Periods.FirstOrDefault(x => x.PeriodId == periodId); + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod.cs index 42ad6990..06243d5e 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod.cs @@ -8,4 +8,18 @@ public class ProductAssetPeriod : Entity public virtual Guid PeriodId { get; protected set; } public virtual decimal Price { get; protected set; } -} \ No newline at end of file + + protected ProductAssetPeriod() + { + } + + public ProductAssetPeriod( + Guid id, + Guid periodId, + decimal price + ) : base(id) + { + PeriodId = periodId; + Price = price; + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/DuplicatePeriodException.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/DuplicatePeriodException.cs new file mode 100644 index 00000000..7a491415 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/DuplicatePeriodException.cs @@ -0,0 +1,12 @@ +using System; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.Booking.Shared; + +public class DuplicatePeriodException : BusinessException +{ + public DuplicatePeriodException(Guid id) : base(BookingErrorCodes.DuplicatePeriod) + { + WithData(nameof(id), id); + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/PeriodNotFoundException.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/PeriodNotFoundException.cs new file mode 100644 index 00000000..a98ffe5c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/Shared/PeriodNotFoundException.cs @@ -0,0 +1,12 @@ +using System; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.Booking.Shared; + +public class PeriodNotFoundException : BusinessException +{ + public PeriodNotFoundException(Guid id) : base(BookingErrorCodes.PeriodNotFound) + { + WithData(nameof(id), id); + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContext.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContext.cs index 293cfced..7126bcfd 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContext.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContext.cs @@ -1,6 +1,8 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; @@ -10,6 +12,10 @@ public class BookingDbContext : AbpDbContext, IBookingDbContex /* Add DbSet for each Aggregate Root here. Example: * public DbSet Questions { get; set; } */ + public DbSet ProductAssets { get; set; } + public DbSet ProductAssetPeriods { get; set; } + public DbSet ProductAssetCategoryPeriods { get; set; } + public DbSet ProductAssetCategories { get; set; } public BookingDbContext(DbContextOptions options) : base(options) diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContextModelCreatingExtensions.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContextModelCreatingExtensions.cs index 9fbc0198..bbdde2a5 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContextModelCreatingExtensions.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/BookingDbContextModelCreatingExtensions.cs @@ -1,5 +1,8 @@ -using Microsoft.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using Microsoft.EntityFrameworkCore; using Volo.Abp; +using Volo.Abp.EntityFrameworkCore.Modeling; namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; @@ -29,5 +32,41 @@ public static class BookingDbContextModelCreatingExtensions b.HasIndex(q => q.CreationTime); }); */ + + builder.Entity(b => + { + b.ToTable(BookingDbProperties.DbTablePrefix + "ProductAssets", BookingDbProperties.DbSchema); + b.ConfigureByConvention(); + + /* Configure more properties here */ + b.Property(x => x.Price).HasColumnType("decimal(20,8)"); + }); + + builder.Entity(b => + { + b.ToTable(BookingDbProperties.DbTablePrefix + "ProductAssetPeriods", BookingDbProperties.DbSchema); + b.ConfigureByConvention(); + + /* Configure more properties here */ + b.Property(x => x.Price).HasColumnType("decimal(20,8)"); + }); + + builder.Entity(b => + { + b.ToTable(BookingDbProperties.DbTablePrefix + "ProductAssetCategoryPeriods", BookingDbProperties.DbSchema); + b.ConfigureByConvention(); + + /* Configure more properties here */ + b.Property(x => x.Price).HasColumnType("decimal(20,8)"); + }); + + builder.Entity(b => + { + b.ToTable(BookingDbProperties.DbTablePrefix + "ProductAssetCategories", BookingDbProperties.DbSchema); + b.ConfigureByConvention(); + + /* Configure more properties here */ + b.Property(x => x.Price).HasColumnType("decimal(20,8)"); + }); } } diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/EShopPluginsBookingEntityFrameworkCoreModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/EShopPluginsBookingEntityFrameworkCoreModule.cs index d50bb01a..2ef60a8b 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/EShopPluginsBookingEntityFrameworkCoreModule.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/EShopPluginsBookingEntityFrameworkCoreModule.cs @@ -1,4 +1,6 @@ -using Microsoft.Extensions.DependencyInjection; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Modularity; @@ -17,6 +19,8 @@ public class EShopPluginsBookingEntityFrameworkCoreModule : AbpModule /* Add custom repositories here. Example: * options.AddRepository(); */ + options.AddRepository(); + options.AddRepository(); }); } } diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/IBookingDbContext.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/IBookingDbContext.cs index 5542513f..654d1d54 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/IBookingDbContext.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/EntityFrameworkCore/IBookingDbContext.cs @@ -1,5 +1,8 @@ -using Volo.Abp.Data; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; @@ -9,4 +12,8 @@ public interface IBookingDbContext : IEfCoreDbContext /* Add DbSet for each Aggregate Root here. Example: * DbSet Questions { get; } */ + DbSet ProductAssets { get; set; } + DbSet ProductAssetPeriods { get; set; } + DbSet ProductAssetCategoryPeriods { get; set; } + DbSet ProductAssetCategories { get; set; } } diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryEfCoreQuerableExtensions.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryEfCoreQuerableExtensions.cs new file mode 100644 index 00000000..8e492583 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryEfCoreQuerableExtensions.cs @@ -0,0 +1,18 @@ +using System.Linq; +using Microsoft.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + public static class ProductAssetCategoryEfCoreQueryableExtensions + { + public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) + { + if (!include) + { + return queryable; + } + + return queryable.Include(x => x.Periods); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryRepository.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryRepository.cs new file mode 100644 index 00000000..de6f9bd8 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryRepository.cs @@ -0,0 +1,21 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + public class ProductAssetCategoryRepository : EfCoreRepository, IProductAssetCategoryRepository + { + public ProductAssetCategoryRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetEfCoreQuerableExtensions.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetEfCoreQuerableExtensions.cs new file mode 100644 index 00000000..ace46a94 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetEfCoreQuerableExtensions.cs @@ -0,0 +1,18 @@ +using System.Linq; +using Microsoft.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + public static class ProductAssetEfCoreQueryableExtensions + { + public static IQueryable IncludeDetails(this IQueryable queryable, bool include = true) + { + if (!include) + { + return queryable; + } + + return queryable.Include(x => x.Periods); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetRepository.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetRepository.cs new file mode 100644 index 00000000..80c035a5 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetRepository.cs @@ -0,0 +1,21 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + public class ProductAssetRepository : EfCoreRepository, IProductAssetRepository + { + public ProductAssetRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingHttpApiClientModule.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingHttpApiClientModule.cs index cc3fb09f..01141509 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingHttpApiClientModule.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi.Client/EasyAbp/EShop/Plugins/Booking/EShopPluginsBookingHttpApiClientModule.cs @@ -14,7 +14,7 @@ public class EShopPluginsBookingHttpApiClientModule : AbpModule { context.Services.AddHttpClientProxies( typeof(EShopPluginsBookingApplicationContractsModule).Assembly, - BookingRemoteServiceConsts.RemoteServiceName + EShopPluginsBookingRemoteServiceConsts.RemoteServiceName ); Configure(options => diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingController.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingController.cs index 8c1e84b2..e070f398 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingController.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/BookingController.cs @@ -4,7 +4,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace EasyAbp.EShop.Plugins.Booking; -[Area(BookingRemoteServiceConsts.ModuleName)] +[Area(EShopPluginsBookingRemoteServiceConsts.ModuleName)] public abstract class BookingController : AbpControllerBase { protected BookingController() diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryController.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryController.cs new file mode 100644 index 00000000..a5c57998 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryController.cs @@ -0,0 +1,78 @@ +using System; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using Volo.Abp.Application.Dtos; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + [RemoteService(Name = EShopPluginsBookingRemoteServiceConsts.RemoteServiceName)] + [Route("/api/e-shop/plugins/booking/product-asset-category")] + public class ProductAssetCategoryController : BookingController, IProductAssetCategoryAppService + { + private readonly IProductAssetCategoryAppService _service; + + public ProductAssetCategoryController(IProductAssetCategoryAppService service) + { + _service = service; + } + + [HttpPost] + [Route("period/{productAssetCategoryId}")] + public virtual Task CreatePeriodAsync(Guid productAssetCategoryId, CreateProductAssetCategoryPeriodDto input) + { + return _service.CreatePeriodAsync(productAssetCategoryId, input); + } + + [HttpPut] + [Route("period")] + public virtual Task UpdatePeriodAsync(Guid productAssetCategoryId, Guid periodId, UpdateProductAssetCategoryPeriodDto input) + { + return _service.UpdatePeriodAsync(productAssetCategoryId, periodId, input); + } + + [HttpDelete] + [Route("period")] + public virtual Task DeletePeriodAsync(Guid productAssetCategoryId, Guid periodId) + { + return _service.DeletePeriodAsync(productAssetCategoryId, periodId); + } + + [HttpPost] + [Route("")] + public virtual Task CreateAsync(CreateProductAssetCategoryDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + public virtual Task UpdateAsync(Guid id, UpdateProductAssetCategoryDto input) + { + return _service.UpdateAsync(id, input); + } + + [HttpDelete] + [Route("{id}")] + public virtual Task DeleteAsync(Guid id) + { + return _service.DeleteAsync(id); + } + + [HttpGet] + [Route("{id}")] + public virtual Task GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + [Route("")] + public virtual Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + return _service.GetListAsync(input); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetController.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetController.cs new file mode 100644 index 00000000..f1b1d8dc --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.HttpApi/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAssetController.cs @@ -0,0 +1,77 @@ +using System; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using Volo.Abp.Application.Dtos; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + [RemoteService(Name = EShopPluginsBookingRemoteServiceConsts.RemoteServiceName)] + [Route("/api/e-shop/plugins/booking/product-asset")] + public class ProductAssetController : BookingController, IProductAssetAppService + { + private readonly IProductAssetAppService _service; + + public ProductAssetController(IProductAssetAppService service) + { + _service = service; + } + + [HttpPost] + [Route("period/{productAssetId}")] + public virtual Task CreatePeriodAsync(Guid productAssetId, CreateProductAssetPeriodDto input) + { + return _service.CreatePeriodAsync(productAssetId, input); + } + + [HttpPut] + [Route("period")] + public virtual Task UpdatePeriodAsync(Guid productAssetId, Guid periodId, UpdateProductAssetPeriodDto input) + { + return _service.UpdatePeriodAsync(productAssetId, periodId, input); + } + + [HttpDelete] + [Route("period")] + public virtual Task DeletePeriodAsync(Guid productAssetId, Guid periodId) + { + return _service.DeletePeriodAsync(productAssetId, periodId); + } + + [HttpPost] + [Route("")] + public virtual Task CreateAsync(CreateProductAssetDto input) + { + return _service.CreateAsync(input); + } + + [HttpPut] + [Route("{id}")] + public virtual Task UpdateAsync(Guid id, UpdateProductAssetDto input) + { + return _service.UpdateAsync(id, input); + } + + [HttpDelete] + [Route("{id}")] + public virtual Task DeleteAsync(Guid id) + { + return _service.DeleteAsync(id); + } + + [HttpGet] + [Route("{id}")] + public virtual Task GetAsync(Guid id) + { + return _service.GetAsync(id); + } + + [HttpGet] + [Route("")] + public virtual Task> GetListAsync(PagedAndSortedResultRequestDto input) + { + return _service.GetListAsync(input); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs index 66a205bb..dafd9a44 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/BookingWebAutoMapperProfile.cs @@ -1,4 +1,12 @@ -using AutoMapper; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.ViewModels; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.ViewModels; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using AutoMapper; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.ViewModels; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod.ViewModels; namespace EasyAbp.EShop.Plugins.Booking.Web; @@ -9,5 +17,20 @@ public class BookingWebAutoMapperProfile : Profile /* You can configure your AutoMapper mapping configuration here. * Alternatively, you can split your mapping configurations * into multiple profile classes for a better organization. */ + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); } -} +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenuContributor.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenuContributor.cs index 56d862ba..e888e8a1 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenuContributor.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenuContributor.cs @@ -1,4 +1,7 @@ -using System.Threading.Tasks; +using System.Collections.Generic; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.Localization; +using EasyAbp.EShop.Plugins.Booking.Permissions; using Volo.Abp.UI.Navigation; namespace EasyAbp.EShop.Plugins.Booking.Web.Menus; @@ -13,11 +16,36 @@ public class BookingMenuContributor : IMenuContributor } } - private Task ConfigureMainMenuAsync(MenuConfigurationContext context) + private async Task ConfigureMainMenuAsync(MenuConfigurationContext context) { + var l = context.GetLocalizer(); + //Add main menu items. - context.Menu.AddItem(new ApplicationMenuItem(BookingMenus.Prefix, displayName: "Booking", "~/Booking", icon: "fa fa-globe")); + + var bookingMenuItem = new ApplicationMenuItem(BookingMenus.Prefix, l["Menu:Booking"]); - return Task.CompletedTask; + if (await context.IsGrantedAsync(BookingPermissions.ProductAsset.Default)) + { + bookingMenuItem.AddItem( + new ApplicationMenuItem(BookingMenus.ProductAsset, l["Menu:ProductAsset"], + "~/EShop/Plugins/Booking/ProductAssets/ProductAsset") + ); + } + + if (await context.IsGrantedAsync(BookingPermissions.ProductAssetCategory.Default)) + { + bookingMenuItem.AddItem( + new ApplicationMenuItem(BookingMenus.ProductAssetCategory, l["Menu:ProductAssetCategory"], + "~/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory") + ); + } + + if (!bookingMenuItem.Items.IsNullOrEmpty()) + { + var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == BookingMenus.ModuleGroupPrefix, + () => new ApplicationMenuItem(BookingMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"])); + + eShopMenuItem.Items.Add(bookingMenuItem); + } } } diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenus.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenus.cs index 5ea2537d..57a43fbc 100644 --- a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenus.cs +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Menus/BookingMenus.cs @@ -2,9 +2,13 @@ public class BookingMenus { - public const string Prefix = "EasyAbp.EShop.Plugins.Booking"; + public const string ModuleGroupPrefix = "EasyAbp.EShop"; + + public const string Prefix = ModuleGroupPrefix + ".Plugins.Booking"; //Add your menu items here... //public const string Home = Prefix + ".MyNewMenuItem"; + public const string ProductAsset = Prefix + ".ProductAsset"; + public const string ProductAssetCategory = Prefix + ".ProductAssetCategory"; } diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml new file mode 100644 index 00000000..a161ba19 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml @@ -0,0 +1,18 @@ +@page +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@using EasyAbp.EShop.Plugins.Booking.Localization +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.CreateModalModel +@{ + Layout = null; +} + + + + + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml.cs new file mode 100644 index 00000000..27c2616d --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal.cshtml.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.ViewModels; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory +{ + public class CreateModalModel : BookingPageModel + { + [BindProperty] + public CreateProductAssetCategoryViewModel ViewModel { get; set; } + + private readonly IProductAssetCategoryAppService _service; + + public CreateModalModel(IProductAssetCategoryAppService service) + { + _service = service; + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.CreateAsync(dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml new file mode 100644 index 00000000..9a04bee4 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml @@ -0,0 +1,19 @@ +@page +@using EasyAbp.EShop.Plugins.Booking.Localization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.EditModalModel +@{ + Layout = null; +} + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml.cs new file mode 100644 index 00000000..0dee727f --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal.cshtml.cs @@ -0,0 +1,39 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.ViewModels; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory +{ + public class EditModalModel : BookingPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid Id { get; set; } + + [BindProperty] + public EditProductAssetCategoryViewModel ViewModel { get; set; } + + private readonly IProductAssetCategoryAppService _service; + + public EditModalModel(IProductAssetCategoryAppService service) + { + _service = service; + } + + public virtual async Task OnGetAsync() + { + var dto = await _service.GetAsync(Id); + ViewModel = ObjectMapper.Map(dto); + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.UpdateAsync(Id, dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml new file mode 100644 index 00000000..b220601e --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml @@ -0,0 +1,48 @@ +@page +@using EasyAbp.EShop.Plugins.Booking.Permissions +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory +@using EasyAbp.EShop.Plugins.Booking.Localization +@using EasyAbp.EShop.Plugins.Booking.Web.Menus +@model IndexModel +@inject IPageLayout PageLayout +@inject IHtmlLocalizer L +@inject IAuthorizationService Authorization +@{ + PageLayout.Content.Title = L["ProductAssetCategory"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:ProductAssetCategory"].Value); + PageLayout.Content.MenuItemName = BookingMenus.ProductAssetCategory; +} + +@section scripts +{ + +} +@section styles +{ + +} + + + + + + @L["ProductAssetCategory"] + + + @if (await Authorization.IsGrantedAsync(BookingPermissions.ProductAssetCategory.Create)) + { + + } + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml.cs new file mode 100644 index 00000000..6c00d8d3 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/Index.cshtml.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory +{ + public class IndexModel : BookingPageModel + { + public virtual async Task OnGetAsync() + { + await Task.CompletedTask; + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/CreateProductAssetCategoryViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/CreateProductAssetCategoryViewModel.cs new file mode 100644 index 00000000..4a681a86 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/CreateProductAssetCategoryViewModel.cs @@ -0,0 +1,30 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.ViewModels +{ + public class CreateProductAssetCategoryViewModel + { + [Display(Name = "ProductAssetCategoryProductId")] + public Guid ProductId { get; set; } + + [Display(Name = "ProductAssetCategoryProductSkuId")] + public Guid ProductSkuId { get; set; } + + [Display(Name = "ProductAssetCategoryAssetCategoryId")] + public Guid AssetCategoryId { get; set; } + + [Display(Name = "ProductAssetCategoryPeriodSchemeId")] + public Guid PeriodSchemeId { get; set; } + + [Display(Name = "ProductAssetCategoryFromTime")] + public DateTime FromTime { get; set; } + + [Display(Name = "ProductAssetCategoryToTime")] + public DateTime? ToTime { get; set; } + + [Display(Name = "ProductAssetCategoryPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/EditProductAssetCategoryViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/EditProductAssetCategoryViewModel.cs new file mode 100644 index 00000000..139b5dc6 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/ViewModels/EditProductAssetCategoryViewModel.cs @@ -0,0 +1,18 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory.ViewModels +{ + public class EditProductAssetCategoryViewModel + { + [Display(Name = "ProductAssetCategoryFromTime")] + public DateTime FromTime { get; set; } + + [Display(Name = "ProductAssetCategoryToTime")] + public DateTime? ToTime { get; set; } + + [Display(Name = "ProductAssetCategoryPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/index.css b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/index.css new file mode 100644 index 00000000..e69de29b diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/index.js b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/index.js new file mode 100644 index 00000000..ee88efeb --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/index.js @@ -0,0 +1,96 @@ +$(function () { + + var l = abp.localization.getResource('EasyAbpEShopPluginsBooking'); + + var service = easyAbp.eShop.plugins.booking.productAssetCategories.productAssetCategory; + var createModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/CreateModal'); + var editModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory/EditModal'); + + var dataTable = $('#ProductAssetCategoryTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, + order: [[0, "asc"]], + ajax: abp.libs.datatables.createAjax(service.getList), + columnDefs: [ + { + rowAction: { + items: + [ + { + text: l('ProductAssetCategoryPeriods'), + action: function (data) { + document.location.href = abp.appPath + 'EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod?ProductAssetCategoryId=' + data.record.id; + } + }, + { + text: l('Edit'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAssetCategory.Update'), + action: function (data) { + editModal.open({ id: data.record.id }); + } + }, + { + text: l('Delete'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAssetCategory.Delete'), + confirmMessage: function (data) { + return l('ProductAssetCategoryDeletionConfirmationMessage', data.record.id); + }, + action: function (data) { + service.delete(data.record.id) + .then(function () { + abp.notify.info(l('SuccessfullyDeleted')); + dataTable.ajax.reload(); + }); + } + } + ] + } + }, + { + title: l('ProductAssetCategoryAssetCategoryId'), + data: "assetCategoryId" + }, + { + title: l('ProductAssetCategoryPrice'), + data: "price" + }, + { + title: l('ProductAssetCategoryPeriodSchemeId'), + data: "periodSchemeId" + }, + { + title: l('ProductAssetCategoryFromTime'), + data: "fromTime" + }, + { + title: l('ProductAssetCategoryToTime'), + data: "toTime" + }, + { + title: l('ProductAssetCategoryProductId'), + data: "productId" + }, + { + title: l('ProductAssetCategoryProductSkuId'), + data: "productSkuId" + }, + ] + })); + + createModal.onResult(function () { + dataTable.ajax.reload(); + }); + + editModal.onResult(function () { + dataTable.ajax.reload(); + }); + + $('#NewProductAssetCategoryButton').click(function (e) { + e.preventDefault(); + createModal.open(); + }); +}); diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml new file mode 100644 index 00000000..707aabee --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml @@ -0,0 +1,19 @@ +@page +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@using EasyAbp.EShop.Plugins.Booking.Localization +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod.CreateModalModel +@{ + Layout = null; +} + + + + + + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml.cs new file mode 100644 index 00000000..39283e00 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal.cshtml.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod.ViewModels; +using Microsoft.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod +{ + public class CreateModalModel : BookingPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid ProductAssetCategoryId { get; set; } + + [BindProperty] + public CreateProductAssetCategoryPeriodViewModel ViewModel { get; set; } + + private readonly IProductAssetCategoryAppService _service; + + public CreateModalModel(IProductAssetCategoryAppService service) + { + _service = service; + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.CreatePeriodAsync(ProductAssetCategoryId, dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml new file mode 100644 index 00000000..354c1266 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml @@ -0,0 +1,20 @@ +@page +@using EasyAbp.EShop.Plugins.Booking.Localization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod.EditModalModel +@{ + Layout = null; +} + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml.cs new file mode 100644 index 00000000..a92297fb --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal.cshtml.cs @@ -0,0 +1,45 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod.ViewModels; +using Microsoft.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod +{ + public class EditModalModel : BookingPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid ProductAssetCategoryId { get; set; } + + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid PeriodId { get; set; } + + [BindProperty] + public EditProductAssetCategoryPeriodViewModel ViewModel { get; set; } + + private readonly IProductAssetCategoryAppService _service; + + public EditModalModel(IProductAssetCategoryAppService service) + { + _service = service; + } + + public virtual async Task OnGetAsync() + { + var dto = await _service.GetAsync(ProductAssetCategoryId); + ViewModel = ObjectMapper.Map( + dto.Periods.Single(x => x.PeriodId == PeriodId)); + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.UpdatePeriodAsync(ProductAssetCategoryId, PeriodId, dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml new file mode 100644 index 00000000..5095bfe4 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml @@ -0,0 +1,52 @@ +@page +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod +@using EasyAbp.EShop.Plugins.Booking.Localization +@using EasyAbp.EShop.Plugins.Booking.Permissions +@using EasyAbp.EShop.Plugins.Booking.Web.Menus +@model IndexModel +@inject IPageLayout PageLayout +@inject IHtmlLocalizer L +@inject IAuthorizationService Authorization +@{ + PageLayout.Content.Title = L["ProductAssetCategoryPeriod"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:ProductAssetCategoryPeriod"].Value); + PageLayout.Content.MenuItemName = BookingMenus.ProductAssetCategory; +} + +@section scripts +{ + +} +@section styles +{ + +} + + + + + + + + @L["ProductAssetCategoryPeriod"] + + + @if (await Authorization.IsGrantedAsync(BookingPermissions.ProductAssetCategory.Update)) + { + + } + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml.cs new file mode 100644 index 00000000..8f98a16a --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/Index.cshtml.cs @@ -0,0 +1,17 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod +{ + public class IndexModel : BookingPageModel + { + [BindProperty(SupportsGet = true)] + public Guid ProductAssetCategoryId { get; set; } + + public virtual async Task OnGetAsync() + { + await Task.CompletedTask; + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/CreateProductAssetCategoryPeriodViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/CreateProductAssetCategoryPeriodViewModel.cs new file mode 100644 index 00000000..1a66c3d3 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/CreateProductAssetCategoryPeriodViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod.ViewModels +{ + public class CreateProductAssetCategoryPeriodViewModel + { + [Display(Name = "ProductAssetCategoryPeriodPeriodId")] + public Guid PeriodId { get; set; } + + [Display(Name = "ProductAssetCategoryPeriodPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/EditProductAssetCategoryPeriodViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/EditProductAssetCategoryPeriodViewModel.cs new file mode 100644 index 00000000..fee8cab0 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/ViewModels/EditProductAssetCategoryPeriodViewModel.cs @@ -0,0 +1,12 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod.ViewModels +{ + public class EditProductAssetCategoryPeriodViewModel + { + [Display(Name = "ProductAssetCategoryPeriodPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/index.css b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/index.css new file mode 100644 index 00000000..e69de29b diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/index.js b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/index.js new file mode 100644 index 00000000..564bcc3e --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/index.js @@ -0,0 +1,80 @@ +$(function () { + + var l = abp.localization.getResource('EasyAbpEShopPluginsBooking'); + + var service = easyAbp.eShop.plugins.booking.productAssetCategories.productAssetCategory; + var createModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/CreateModal'); + var editModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategoryPeriod/EditModal'); + + var dataTable = $('#ProductAssetCategoryPeriodTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, + order: [[0, "asc"]], + ajax: function (requestData, callback, settings) { + if (callback) { + service.get(productAssetCategoryId).then(function (result) { + callback({ + recordsTotal: result.periods.length, + recordsFiltered: result.periods.length, + data: result.periods + }); + }); + } + }, + columnDefs: [ + { + rowAction: { + items: + [ + { + text: l('Edit'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAssetCategory.Update'), + action: function (data) { + editModal.open({ productAssetCategoryId: productAssetCategoryId, periodId: data.record.periodId }); + } + }, + { + text: l('Delete'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAssetCategory.Update'), + confirmMessage: function (data) { + return l('ProductAssetCategoryPeriodDeletionConfirmationMessage', data.record.periodId); + }, + action: function (data) { + service.deletePeriod(productAssetCategoryId, data.record.periodId) + .then(function () { + abp.notify.info(l('SuccessfullyDeleted')); + dataTable.ajax.reload(); + }); + } + } + ] + } + }, + { + title: l('ProductAssetCategoryPeriodPeriodId'), + data: "periodId" + }, + { + title: l('ProductAssetCategoryPeriodPrice'), + data: "price" + }, + ] + })); + + createModal.onResult(function () { + dataTable.ajax.reload(); + }); + + editModal.onResult(function () { + dataTable.ajax.reload(); + }); + + $('#NewProductAssetCategoryPeriodButton').click(function (e) { + e.preventDefault(); + createModal.open({ productAssetCategoryId: productAssetCategoryId }); + }); +}); diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml new file mode 100644 index 00000000..432013ac --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml @@ -0,0 +1,18 @@ +@page +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@using EasyAbp.EShop.Plugins.Booking.Localization +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.CreateModalModel +@{ + Layout = null; +} + + + + + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml.cs new file mode 100644 index 00000000..0117e8af --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal.cshtml.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.ViewModels; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset +{ + public class CreateModalModel : BookingPageModel + { + [BindProperty] + public CreateProductAssetViewModel ViewModel { get; set; } + + private readonly IProductAssetAppService _service; + + public CreateModalModel(IProductAssetAppService service) + { + _service = service; + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.CreateAsync(dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml new file mode 100644 index 00000000..055305bb --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml @@ -0,0 +1,19 @@ +@page +@using EasyAbp.EShop.Plugins.Booking.Localization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.EditModalModel +@{ + Layout = null; +} + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml.cs new file mode 100644 index 00000000..e2a52d5d --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal.cshtml.cs @@ -0,0 +1,39 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.ViewModels; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset +{ + public class EditModalModel : BookingPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid Id { get; set; } + + [BindProperty] + public EditProductAssetViewModel ViewModel { get; set; } + + private readonly IProductAssetAppService _service; + + public EditModalModel(IProductAssetAppService service) + { + _service = service; + } + + public virtual async Task OnGetAsync() + { + var dto = await _service.GetAsync(Id); + ViewModel = ObjectMapper.Map(dto); + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.UpdateAsync(Id, dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml new file mode 100644 index 00000000..7ef4f82c --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml @@ -0,0 +1,48 @@ +@page +@using EasyAbp.EShop.Plugins.Booking.Permissions +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset +@using EasyAbp.EShop.Plugins.Booking.Localization +@using EasyAbp.EShop.Plugins.Booking.Web.Menus +@model IndexModel +@inject IPageLayout PageLayout +@inject IHtmlLocalizer L +@inject IAuthorizationService Authorization +@{ + PageLayout.Content.Title = L["ProductAsset"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:ProductAsset"].Value); + PageLayout.Content.MenuItemName = BookingMenus.ProductAsset; +} + +@section scripts +{ + +} +@section styles +{ + +} + + + + + + @L["ProductAsset"] + + + @if (await Authorization.IsGrantedAsync(BookingPermissions.ProductAsset.Create)) + { + + } + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml.cs new file mode 100644 index 00000000..eacd9bbb --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/Index.cshtml.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset +{ + public class IndexModel : BookingPageModel + { + public virtual async Task OnGetAsync() + { + await Task.CompletedTask; + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/CreateProductAssetViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/CreateProductAssetViewModel.cs new file mode 100644 index 00000000..5121254e --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/CreateProductAssetViewModel.cs @@ -0,0 +1,31 @@ +using System; + +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.ViewModels +{ + public class CreateProductAssetViewModel + { + [Display(Name = "ProductAssetProductId")] + public Guid ProductId { get; set; } + + [Display(Name = "ProductAssetProductSkuId")] + public Guid ProductSkuId { get; set; } + + [Display(Name = "ProductAssetAssetId")] + public Guid AssetId { get; set; } + + [Display(Name = "ProductAssetPeriodSchemeId")] + public Guid PeriodSchemeId { get; set; } + + [Display(Name = "ProductAssetFromTime")] + public DateTime FromTime { get; set; } + + [Display(Name = "ProductAssetToTime")] + public DateTime? ToTime { get; set; } + + [Display(Name = "ProductAssetPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/EditProductAssetViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/EditProductAssetViewModel.cs new file mode 100644 index 00000000..32505fd4 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/ViewModels/EditProductAssetViewModel.cs @@ -0,0 +1,19 @@ +using System; + +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAsset.ViewModels +{ + public class EditProductAssetViewModel + { + [Display(Name = "ProductAssetFromTime")] + public DateTime FromTime { get; set; } + + [Display(Name = "ProductAssetToTime")] + public DateTime? ToTime { get; set; } + + [Display(Name = "ProductAssetPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal? Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/index.css b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/index.css new file mode 100644 index 00000000..e69de29b diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/index.js b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/index.js new file mode 100644 index 00000000..3a3b3a70 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAsset/index.js @@ -0,0 +1,96 @@ +$(function () { + + var l = abp.localization.getResource('EasyAbpEShopPluginsBooking'); + + var service = easyAbp.eShop.plugins.booking.productAssets.productAsset; + var createModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssets/ProductAsset/CreateModal'); + var editModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssets/ProductAsset/EditModal'); + + var dataTable = $('#ProductAssetTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, + order: [[0, "asc"]], + ajax: abp.libs.datatables.createAjax(service.getList), + columnDefs: [ + { + rowAction: { + items: + [ + { + text: l('ProductAssetPeriods'), + action: function (data) { + document.location.href = abp.appPath + 'EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod?ProductAssetId=' + data.record.id; + } + }, + { + text: l('Edit'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAsset.Update'), + action: function (data) { + editModal.open({ id: data.record.id }); + } + }, + { + text: l('Delete'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAsset.Delete'), + confirmMessage: function (data) { + return l('ProductAssetDeletionConfirmationMessage', data.record.id); + }, + action: function (data) { + service.delete(data.record.id) + .then(function () { + abp.notify.info(l('SuccessfullyDeleted')); + dataTable.ajax.reload(); + }); + } + } + ] + } + }, + { + title: l('ProductAssetAssetId'), + data: "assetId" + }, + { + title: l('ProductAssetPrice'), + data: "price" + }, + { + title: l('ProductAssetPeriodSchemeId'), + data: "periodSchemeId" + }, + { + title: l('ProductAssetFromTime'), + data: "fromTime" + }, + { + title: l('ProductAssetToTime'), + data: "toTime" + }, + { + title: l('ProductAssetProductId'), + data: "productId" + }, + { + title: l('ProductAssetProductSkuId'), + data: "productSkuId" + }, + ] + })); + + createModal.onResult(function () { + dataTable.ajax.reload(); + }); + + editModal.onResult(function () { + dataTable.ajax.reload(); + }); + + $('#NewProductAssetButton').click(function (e) { + e.preventDefault(); + createModal.open(); + }); +}); diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml new file mode 100644 index 00000000..2a5dfb44 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml @@ -0,0 +1,19 @@ +@page +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@using EasyAbp.EShop.Plugins.Booking.Localization +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.CreateModalModel +@{ + Layout = null; +} + + + + + + + + + + \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml.cs new file mode 100644 index 00000000..ce6f4057 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal.cshtml.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.ViewModels; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod +{ + public class CreateModalModel : BookingPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid ProductAssetId { get; set; } + + [BindProperty] + public CreateProductAssetPeriodViewModel ViewModel { get; set; } + + private readonly IProductAssetAppService _service; + + public CreateModalModel(IProductAssetAppService service) + { + _service = service; + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.CreatePeriodAsync(ProductAssetId, dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml new file mode 100644 index 00000000..5f8d03b2 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml @@ -0,0 +1,20 @@ +@page +@using EasyAbp.EShop.Plugins.Booking.Localization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; +@inject IHtmlLocalizer L +@model EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.EditModalModel +@{ + Layout = null; +} + + + + + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml.cs new file mode 100644 index 00000000..65ea08be --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal.cshtml.cs @@ -0,0 +1,45 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using EasyAbp.EShop.Plugins.Booking.ProductAssets.Dtos; +using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.ViewModels; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod +{ + public class EditModalModel : BookingPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid ProductAssetId { get; set; } + + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid PeriodId { get; set; } + + [BindProperty] + public EditProductAssetPeriodViewModel ViewModel { get; set; } + + private readonly IProductAssetAppService _service; + + public EditModalModel(IProductAssetAppService service) + { + _service = service; + } + + public virtual async Task OnGetAsync() + { + var dto = await _service.GetAsync(ProductAssetId); + ViewModel = ObjectMapper.Map( + dto.Periods.Single(x => x.PeriodId == PeriodId)); + } + + public virtual async Task OnPostAsync() + { + var dto = ObjectMapper.Map(ViewModel); + await _service.UpdatePeriodAsync(ProductAssetId, PeriodId, dto); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml new file mode 100644 index 00000000..bc34e7ad --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml @@ -0,0 +1,52 @@ +@page +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod +@using EasyAbp.EShop.Plugins.Booking.Localization +@using EasyAbp.EShop.Plugins.Booking.Permissions +@using EasyAbp.EShop.Plugins.Booking.Web.Menus +@model IndexModel +@inject IPageLayout PageLayout +@inject IHtmlLocalizer L +@inject IAuthorizationService Authorization +@{ + PageLayout.Content.Title = L["ProductAssetPeriod"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:ProductAssetPeriod"].Value); + PageLayout.Content.MenuItemName = BookingMenus.ProductAsset; +} + +@section scripts +{ + +} +@section styles +{ + +} + + + + + + + + @L["ProductAssetPeriod"] + + + @if (await Authorization.IsGrantedAsync(BookingPermissions.ProductAsset.Update)) + { + + } + + + + + + + diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml.cs new file mode 100644 index 00000000..5f2c053a --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/Index.cshtml.cs @@ -0,0 +1,17 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod +{ + public class IndexModel : BookingPageModel + { + [BindProperty(SupportsGet = true)] + public Guid ProductAssetId { get; set; } + + public virtual async Task OnGetAsync() + { + await Task.CompletedTask; + } + } +} diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/CreateProductAssetPeriodViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/CreateProductAssetPeriodViewModel.cs new file mode 100644 index 00000000..271c0c84 --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/CreateProductAssetPeriodViewModel.cs @@ -0,0 +1,16 @@ +using System; + +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.ViewModels +{ + public class CreateProductAssetPeriodViewModel + { + [Display(Name = "ProductAssetPeriodPeriodId")] + public Guid PeriodId { get; set; } + + [Display(Name = "ProductAssetPeriodPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/EditProductAssetPeriodViewModel.cs b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/EditProductAssetPeriodViewModel.cs new file mode 100644 index 00000000..03d7c18d --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/ViewModels/EditProductAssetPeriodViewModel.cs @@ -0,0 +1,13 @@ +using System; + +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Plugins.Booking.Web.Pages.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod.ViewModels +{ + public class EditProductAssetPeriodViewModel + { + [Display(Name = "ProductAssetPeriodPrice")] + [Range(BookingConsts.MinimumPrice, BookingConsts.MaximumPrice)] + public decimal Price { get; set; } + } +} \ No newline at end of file diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/index.css b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/index.css new file mode 100644 index 00000000..e69de29b diff --git a/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/index.js b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/index.js new file mode 100644 index 00000000..6f5d71fa --- /dev/null +++ b/plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Web/Pages/EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/index.js @@ -0,0 +1,80 @@ +$(function () { + + var l = abp.localization.getResource('EasyAbpEShopPluginsBooking'); + + var service = easyAbp.eShop.plugins.booking.productAssets.productAsset; + var createModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/CreateModal'); + var editModal = new abp.ModalManager(abp.appPath + 'EShop/Plugins/Booking/ProductAssets/ProductAssetPeriod/EditModal'); + + var dataTable = $('#ProductAssetPeriodTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, + order: [[0, "asc"]], + ajax: function (requestData, callback, settings) { + if (callback) { + service.get(productAssetId).then(function (result) { + callback({ + recordsTotal: result.periods.length, + recordsFiltered: result.periods.length, + data: result.periods + }); + }); + } + }, + columnDefs: [ + { + rowAction: { + items: + [ + { + text: l('Edit'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAsset.Update'), + action: function (data) { + editModal.open({ productAssetId: productAssetId, periodId: data.record.periodId }); + } + }, + { + text: l('Delete'), + visible: abp.auth.isGranted('EasyAbp.EShop.Plugins.Booking.ProductAsset.Update'), + confirmMessage: function (data) { + return l('ProductAssetPeriodDeletionConfirmationMessage', data.record.periodId); + }, + action: function (data) { + service.deletePeriod(productAssetId, data.record.periodId) + .then(function () { + abp.notify.info(l('SuccessfullyDeleted')); + dataTable.ajax.reload(); + }); + } + } + ] + } + }, + { + title: l('ProductAssetPeriodPeriodId'), + data: "periodId" + }, + { + title: l('ProductAssetPeriodPrice'), + data: "price" + }, + ] + })); + + createModal.onResult(function () { + dataTable.ajax.reload(); + }); + + editModal.onResult(function () { + dataTable.ajax.reload(); + }); + + $('#NewProductAssetPeriodButton').click(function (e) { + e.preventDefault(); + createModal.open({ productAssetId: productAssetId }); + }); +}); diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssetCategories/ProductAssetCategoryAppServiceTests.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssetCategories/ProductAssetCategoryAppServiceTests.cs new file mode 100644 index 00000000..92417d8c --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssetCategories/ProductAssetCategoryAppServiceTests.cs @@ -0,0 +1,28 @@ +using Shouldly; +using System.Threading.Tasks; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + public class ProductAssetCategoryAppServiceTests : BookingApplicationTestBase + { + private readonly IProductAssetCategoryAppService _productAssetCategoryAppService; + + public ProductAssetCategoryAppServiceTests() + { + _productAssetCategoryAppService = GetRequiredService(); + } + + /* + [Fact] + public async Task Test1() + { + // Arrange + + // Act + + // Assert + } + */ + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssets/ProductAssetAppServiceTests.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssets/ProductAssetAppServiceTests.cs new file mode 100644 index 00000000..478c4e52 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Application.Tests/ProductAssets/ProductAssetAppServiceTests.cs @@ -0,0 +1,28 @@ +using Shouldly; +using System.Threading.Tasks; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + public class ProductAssetAppServiceTests : BookingApplicationTestBase + { + private readonly IProductAssetAppService _productAssetAppService; + + public ProductAssetAppServiceTests() + { + _productAssetAppService = GetRequiredService(); + } + + /* + [Fact] + public async Task Test1() + { + // Arrange + + // Act + + // Assert + } + */ + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssetCategories/ProductAssetCategoryDomainTests.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssetCategories/ProductAssetCategoryDomainTests.cs new file mode 100644 index 00000000..e3ce55c5 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssetCategories/ProductAssetCategoryDomainTests.cs @@ -0,0 +1,25 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories +{ + public class ProductAssetCategoryDomainTests : BookingDomainTestBase + { + public ProductAssetCategoryDomainTests() + { + } + + /* + [Fact] + public async Task Test1() + { + // Arrange + + // Assert + + // Assert + } + */ + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssets/ProductAssetDomainTests.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssets/ProductAssetDomainTests.cs new file mode 100644 index 00000000..6592f105 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.Domain.Tests/ProductAssets/ProductAssetDomainTests.cs @@ -0,0 +1,25 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Booking.ProductAssets +{ + public class ProductAssetDomainTests : BookingDomainTestBase + { + public ProductAssetDomainTests() + { + } + + /* + [Fact] + public async Task Test1() + { + // Arrange + + // Assert + + // Assert + } + */ + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssetCategories/ProductAssetCategoryRepositoryTests.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssetCategories/ProductAssetCategoryRepositoryTests.cs new file mode 100644 index 00000000..480e93ed --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssetCategories/ProductAssetCategoryRepositoryTests.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.ProductAssetCategories; +using Volo.Abp.Domain.Repositories; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.ProductAssetCategories +{ + public class ProductAssetCategoryRepositoryTests : BookingEntityFrameworkCoreTestBase + { + private readonly IProductAssetCategoryRepository _productAssetCategoryRepository; + + public ProductAssetCategoryRepositoryTests() + { + _productAssetCategoryRepository = GetRequiredService(); + } + + /* + [Fact] + public async Task Test1() + { + await WithUnitOfWorkAsync(async () => + { + // Arrange + + // Act + + //Assert + }); + } + */ + } +} diff --git a/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssets/ProductAssetRepositoryTests.cs b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssets/ProductAssetRepositoryTests.cs new file mode 100644 index 00000000..afaaddb7 --- /dev/null +++ b/plugins/Booking/test/EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductAssets/ProductAssetRepositoryTests.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Plugins.Booking.ProductAssets; +using Volo.Abp.Domain.Repositories; +using Xunit; + +namespace EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore.ProductAssets +{ + public class ProductAssetRepositoryTests : BookingEntityFrameworkCoreTestBase + { + private readonly IProductAssetRepository _productAssetRepository; + + public ProductAssetRepositoryTests() + { + _productAssetRepository = GetRequiredService(); + } + + /* + [Fact] + public async Task Test1() + { + await WithUnitOfWorkAsync(async () => + { + // Arrange + + // Act + + //Assert + }); + } + */ + } +} diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj index c835b5b3..3ae2ee02 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSampleApplicationContractsModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSampleApplicationContractsModule.cs index 9706aad0..7d7e80d5 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSampleApplicationContractsModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSampleApplicationContractsModule.cs @@ -1,5 +1,6 @@ using EasyAbp.EShop; using EasyAbp.EShop.Plugins.Baskets; +using EasyAbp.EShop.Plugins.Booking; using EasyAbp.EShop.Plugins.Coupons; using EasyAbp.PaymentService; using EasyAbp.PaymentService.Prepayment; @@ -24,6 +25,7 @@ namespace EShopSample typeof(AbpObjectExtendingModule), typeof(EShopApplicationContractsModule), typeof(EShopPluginsBasketsApplicationContractsModule), + typeof(EShopPluginsBookingApplicationContractsModule), typeof(EShopPluginsCouponsApplicationContractsModule), typeof(PaymentServiceApplicationContractsModule), typeof(PaymentServiceWeChatPayApplicationContractsModule), diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj index 6889685b..887ab86b 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSampleApplicationModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSampleApplicationModule.cs index b6eb7520..4fbbaf6d 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSampleApplicationModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSampleApplicationModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop; using EasyAbp.EShop.Orders.Plugins.Coupons; using EasyAbp.EShop.Plugins.Baskets; +using EasyAbp.EShop.Plugins.Booking; using EasyAbp.EShop.Plugins.Coupons; using EasyAbp.PaymentService; using EasyAbp.PaymentService.Prepayment; @@ -25,6 +26,7 @@ namespace EShopSample typeof(AbpFeatureManagementApplicationModule), typeof(EShopApplicationModule), typeof(EShopPluginsBasketsApplicationModule), + typeof(EShopPluginsBookingApplicationModule), typeof(EShopPluginsCouponsApplicationModule), typeof(EShopOrdersPluginsCouponsModule), typeof(PaymentServiceApplicationModule), diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj index 011d48d8..2bdc577e 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj @@ -22,6 +22,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs index e62aabb9..2815b4f4 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSampleDomainSharedModule.cs @@ -1,5 +1,6 @@ using EasyAbp.EShop; using EasyAbp.EShop.Plugins.Baskets; +using EasyAbp.EShop.Plugins.Booking; using EasyAbp.EShop.Plugins.Coupons; using EasyAbp.PaymentService; using EasyAbp.PaymentService.Prepayment; @@ -31,6 +32,7 @@ namespace EShopSample typeof(AbpTenantManagementDomainSharedModule), typeof(EShopDomainSharedModule), typeof(EShopPluginsBasketsDomainSharedModule), + typeof(EShopPluginsBookingDomainSharedModule), typeof(EShopPluginsCouponsDomainSharedModule), typeof(PaymentServiceDomainSharedModule), typeof(PaymentServiceWeChatPayDomainSharedModule), diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj index b9eb99bf..967c7ef9 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs index 4d401431..79a91734 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSampleDomainModule.cs @@ -1,5 +1,6 @@ using EasyAbp.EShop; using EasyAbp.EShop.Plugins.Baskets; +using EasyAbp.EShop.Plugins.Booking; using EasyAbp.EShop.Plugins.Coupons; using EasyAbp.PaymentService; using EasyAbp.PaymentService.Options; @@ -39,6 +40,7 @@ namespace EShopSample typeof(AbpTenantManagementDomainModule), typeof(EShopDomainModule), typeof(EShopPluginsBasketsDomainModule), + typeof(EShopPluginsBookingDomainModule), typeof(EShopPluginsCouponsDomainModule), typeof(PaymentServiceDomainModule), typeof(PaymentServiceWeChatPayDomainModule), diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj index bd724e09..849adca5 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleDbContext.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleDbContext.cs index 28d59311..48c7032c 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleDbContext.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleDbContext.cs @@ -1,5 +1,6 @@ using EasyAbp.EShop.EntityFrameworkCore; using EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; using EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore; using EasyAbp.PaymentService.EntityFrameworkCore; using EasyAbp.PaymentService.Prepayment.EntityFrameworkCore; @@ -81,6 +82,7 @@ namespace EShopSample.EntityFrameworkCore builder.ConfigureEShop(); builder.ConfigureEShopPluginsBaskets(); + builder.ConfigureEShopPluginsBooking(); builder.ConfigureEShopPluginsCoupons(); builder.ConfigurePaymentService(); builder.ConfigurePaymentServiceWeChatPay(); diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleEntityFrameworkCoreModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleEntityFrameworkCoreModule.cs index 08171e3d..4e0171cf 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleEntityFrameworkCoreModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EntityFrameworkCore/EShopSampleEntityFrameworkCoreModule.cs @@ -1,5 +1,6 @@ using EasyAbp.EShop.EntityFrameworkCore; using EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore; +using EasyAbp.EShop.Plugins.Booking.EntityFrameworkCore; using EasyAbp.EShop.Plugins.Coupons.EntityFrameworkCore; using EasyAbp.PaymentService.EntityFrameworkCore; using EasyAbp.PaymentService.Prepayment.EntityFrameworkCore; @@ -32,6 +33,7 @@ namespace EShopSample.EntityFrameworkCore typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(EShopEntityFrameworkCoreModule), typeof(EShopPluginsBasketsEntityFrameworkCoreModule), + typeof(EShopPluginsBookingEntityFrameworkCoreModule), typeof(EShopPluginsCouponsEntityFrameworkCoreModule), typeof(PaymentServiceEntityFrameworkCoreModule), typeof(PaymentServiceWeChatPayEntityFrameworkCoreModule), diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.Designer.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.Designer.cs new file mode 100644 index 00000000..adbbf81a --- /dev/null +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.Designer.cs @@ -0,0 +1,5363 @@ +// +using System; +using EShopSample.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace EShopSample.Migrations +{ + [DbContext(typeof(EShopSampleDbContext))] + [Migration("20220516160609_AddedEntitiesInBookingPlugins")] + partial class AddedEntitiesInBookingPlugins + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.Order", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActualTotalPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("CanceledTime") + .HasColumnType("datetime2"); + + b.Property("CancellationReason") + .HasColumnType("nvarchar(max)"); + + b.Property("CompletionTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OrderNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("OrderStatus") + .HasColumnType("int"); + + b.Property("PaidTime") + .HasColumnType("datetime2"); + + b.Property("PaymentExpiration") + .HasColumnType("datetime2"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductTotalPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("ReducedInventoryAfterPaymentTime") + .HasColumnType("datetime2"); + + b.Property("ReducedInventoryAfterPlacingTime") + .HasColumnType("datetime2"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("StaffRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalDiscount") + .HasColumnType("decimal(20,8)"); + + b.Property("TotalPrice") + .HasColumnType("decimal(20,8)"); + + b.HasKey("Id"); + + b.HasIndex("OrderNumber") + .IsUnique() + .HasFilter("[OrderNumber] IS NOT NULL"); + + b.ToTable("EasyAbpEShopOrdersOrders", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderExtraFee", b => + { + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Key") + .HasColumnType("nvarchar(450)"); + + b.Property("Fee") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.HasKey("OrderId", "Name", "Key"); + + b.ToTable("EasyAbpEShopOrdersOrderExtraFees", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActualTotalPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductDetailModificationTime") + .HasColumnType("datetime2"); + + b.Property("ProductDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductGroupDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductGroupName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductModificationTime") + .HasColumnType("datetime2"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductUniqueName") + .HasColumnType("nvarchar(max)"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundedQuantity") + .HasColumnType("int"); + + b.Property("SkuDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("SkuName") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalDiscount") + .HasColumnType("decimal(20,8)"); + + b.Property("TotalPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("UnitPrice") + .HasColumnType("decimal(20,8)"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.ToTable("EasyAbpEShopOrdersOrderLines", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActualPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("CanceledTime") + .HasColumnType("datetime2"); + + b.Property("CompletionTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExternalTradingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OriginalPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("PayeeAccount") + .HasColumnType("nvarchar(max)"); + + b.Property("PaymentDiscount") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentMethod") + .HasColumnType("nvarchar(max)"); + + b.Property("PendingRefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPaymentsPayments", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActualPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemKey") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemType") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OriginalPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentDiscount") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PendingRefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("PaymentId"); + + b.ToTable("EasyAbpEShopPaymentsPaymentItems", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CanceledTime") + .HasColumnType("datetime2"); + + b.Property("CompletedTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ExternalTradingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundPaymentMethod") + .HasColumnType("nvarchar(max)"); + + b.Property("StaffRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPaymentsRefunds", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentItemId") + .HasColumnType("uniqueidentifier"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundId") + .HasColumnType("uniqueidentifier"); + + b.Property("StaffRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RefundId"); + + b.ToTable("EasyAbpEShopPaymentsRefundItems", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderExtraFee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundItemId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RefundItemId"); + + b.ToTable("EasyAbpEShopPaymentsRefundItemOrderExtraFees", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderLine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("OrderLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundItemId") + .HasColumnType("uniqueidentifier"); + + b.Property("RefundedQuantity") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("RefundItemId"); + + b.ToTable("EasyAbpEShopPaymentsRefundItemOrderLines", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.BasketItems.BasketItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BasketName") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Inventory") + .HasColumnType("int"); + + b.Property("IsInvalid") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductUniqueName") + .HasColumnType("nvarchar(max)"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("SkuDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("SkuName") + .HasColumnType("nvarchar(max)"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalDiscount") + .HasColumnType("decimal(20,8)"); + + b.Property("TotalPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("UnitPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("EasyAbpEShopPluginsBasketsBasketItems", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.ProductUpdates.ProductUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ProductSkuId"); + + b.ToTable("EasyAbpEShopPluginsBasketsProductUpdates", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssetCategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromTime") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PeriodSchemeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssetCategories", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("PeriodId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductAssetCategoryId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductAssetCategoryId"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssetCategoryPeriods", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAsset", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromTime") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PeriodSchemeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssets", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("PeriodId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductAssetId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductAssetId"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssetPeriods", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.Coupons.Coupon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CouponTemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiscountedAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("ExpirationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UsedTime") + .HasColumnType("datetime2"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPluginsCouponsCoupons", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConditionAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("CouponType") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DiscountAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsUnscoped") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UniqueName") + .HasColumnType("nvarchar(max)"); + + b.Property("UsableBeginTime") + .HasColumnType("datetime2"); + + b.Property("UsableDuration") + .HasColumnType("time"); + + b.Property("UsableEndTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPluginsCouponsCouponTemplates", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplateScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CouponTemplateId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductGroupName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("CouponTemplateId"); + + b.ToTable("EasyAbpEShopPluginsCouponsCouponTemplateScopes", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHidden") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UniqueName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("EasyAbpEShopProductsCategories", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopProductsProductCategories", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetailHistories.ProductDetailHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ProductDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("SerializedEntityData") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ModificationTime"); + + b.HasIndex("ProductDetailId"); + + b.ToTable("EasyAbpEShopProductsProductDetailHistories", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetails.ProductDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopProductsProductDetails", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductHistories.ProductHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ModificationTime") + .HasColumnType("datetime2"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("SerializedEntityData") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ModificationTime"); + + b.HasIndex("ProductId"); + + b.ToTable("EasyAbpEShopProductsProductHistories", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductInventories.ProductInventory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Inventory") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("Sold") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ProductSkuId"); + + b.ToTable("EasyAbpEShopProductsProductInventories", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InventoryStrategy") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHidden") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("PaymentExpireIn") + .HasColumnType("time"); + + b.Property("ProductDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductGroupName") + .HasColumnType("nvarchar(max)"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UniqueName") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UniqueName"); + + b.ToTable("EasyAbpEShopProductsProducts", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.ToTable("EasyAbpEShopProductsProductAttributes", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProductAttributeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductAttributeId"); + + b.ToTable("EasyAbpEShopProductsProductAttributeOptions", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderMaxQuantity") + .HasColumnType("int"); + + b.Property("OrderMinQuantity") + .HasColumnType("int"); + + b.Property("OriginalPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentExpireIn") + .HasColumnType("time"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("SerializedAttributeOptionIds") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.ToTable("EasyAbpEShopProductsProductSkus", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductView", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InventoryStrategy") + .HasColumnType("int"); + + b.Property("IsHidden") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("MaximumPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("MinimumPrice") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductDetailId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductGroupDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductGroupName") + .HasColumnType("nvarchar(max)"); + + b.Property("Sold") + .HasColumnType("bigint"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UniqueName") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UniqueName"); + + b.ToTable("EasyAbpEShopProductsProductViews", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Stores.StoreOwners.StoreOwner", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OwnerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("OwnerUserId", "StoreId") + .IsUnique(); + + b.ToTable("EasyAbpEShopStoresStoreOwners", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Stores.Stores.Store", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopStoresStores", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Stores.Transactions.Transaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActionName") + .HasColumnType("nvarchar(max)"); + + b.Property("Amount") + .HasColumnType("decimal(20,8)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("OrderId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransactionType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopStoresTransactions", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Payments.Payment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActualPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("CanceledTime") + .HasColumnType("datetime2"); + + b.Property("CompletionTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExternalTradingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OriginalPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("PayeeAccount") + .HasColumnType("nvarchar(max)"); + + b.Property("PaymentDiscount") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentMethod") + .HasColumnType("nvarchar(max)"); + + b.Property("PendingRefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpPaymentServicePayments", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Payments.PaymentItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActualPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemKey") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemType") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OriginalPaymentAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentDiscount") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PendingRefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.HasKey("Id"); + + b.HasIndex("PaymentId"); + + b.ToTable("EasyAbpPaymentServicePaymentItems", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Prepayment.Accounts.Account", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountGroupName") + .HasColumnType("nvarchar(max)"); + + b.Property("Balance") + .HasColumnType("decimal(20,8)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LockedBalance") + .HasColumnType("decimal(20,8)"); + + b.Property("PendingTopUpPaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PendingWithdrawalAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("PendingWithdrawalRecordId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("EasyAbpPaymentServicePrepaymentAccounts", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Prepayment.Transactions.Transaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountId") + .HasColumnType("uniqueidentifier"); + + b.Property("AccountUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("ActionName") + .HasColumnType("nvarchar(max)"); + + b.Property("ChangedBalance") + .HasColumnType("decimal(20,8)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("ExternalTradingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("OriginalBalance") + .HasColumnType("decimal(20,8)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PaymentMethod") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransactionType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("AccountUserId"); + + b.ToTable("EasyAbpPaymentServicePrepaymentTransactions", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Prepayment.WithdrawalRecords.WithdrawalRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountId") + .HasColumnType("uniqueidentifier"); + + b.Property("Amount") + .HasColumnType("decimal(20,8)"); + + b.Property("CancellationTime") + .HasColumnType("datetime2"); + + b.Property("CompletionTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ResultErrorCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ResultErrorMessage") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WithdrawalMethod") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpPaymentServicePrepaymentWithdrawalRecords", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Prepayment.WithdrawalRequests.WithdrawalRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountId") + .HasColumnType("uniqueidentifier"); + + b.Property("AccountUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("Amount") + .HasColumnType("decimal(20,8)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsApproved") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ReviewTime") + .HasColumnType("datetime2"); + + b.Property("ReviewerUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpPaymentServicePrepaymentWithdrawalRequests", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Refunds.Refund", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CanceledTime") + .HasColumnType("datetime2"); + + b.Property("CompletedTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ExternalTradingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundPaymentMethod") + .HasColumnType("nvarchar(max)"); + + b.Property("StaffRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpPaymentServiceRefunds", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Refunds.RefundItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PaymentItemId") + .HasColumnType("uniqueidentifier"); + + b.Property("RefundAmount") + .HasColumnType("decimal(20,8)"); + + b.Property("RefundId") + .HasColumnType("uniqueidentifier"); + + b.Property("StaffRemark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("RefundId"); + + b.ToTable("EasyAbpPaymentServiceRefundItems", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.WeChatPay.PaymentRecords.PaymentRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppId") + .HasColumnType("nvarchar(max)"); + + b.Property("Attach") + .HasColumnType("nvarchar(max)"); + + b.Property("BankType") + .HasColumnType("nvarchar(max)"); + + b.Property("CashFee") + .HasColumnType("int"); + + b.Property("CashFeeType") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CouponCount") + .HasColumnType("int"); + + b.Property("CouponFee") + .HasColumnType("int"); + + b.Property("CouponFees") + .HasColumnType("nvarchar(max)"); + + b.Property("CouponIds") + .HasColumnType("nvarchar(max)"); + + b.Property("CouponTypes") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeviceInfo") + .HasColumnType("nvarchar(max)"); + + b.Property("ErrCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ErrCodeDes") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeeType") + .HasColumnType("nvarchar(max)"); + + b.Property("IsSubscribe") + .HasColumnType("nvarchar(max)"); + + b.Property("MchId") + .HasColumnType("nvarchar(max)"); + + b.Property("Openid") + .HasColumnType("nvarchar(max)"); + + b.Property("OutTradeNo") + .HasColumnType("nvarchar(max)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ResultCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnMsg") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementTotalFee") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeEnd") + .HasColumnType("nvarchar(max)"); + + b.Property("TotalFee") + .HasColumnType("int"); + + b.Property("TradeType") + .HasColumnType("nvarchar(max)"); + + b.Property("TransactionId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("PaymentId"); + + b.ToTable("EasyAbpPaymentServiceWeChatPayPaymentRecords", (string)null); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.WeChatPay.RefundRecords.RefundRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppId") + .HasColumnType("nvarchar(max)"); + + b.Property("CashFee") + .HasColumnType("int"); + + b.Property("CashFeeType") + .HasColumnType("nvarchar(max)"); + + b.Property("CashRefundFee") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CouponIds") + .HasColumnType("nvarchar(max)"); + + b.Property("CouponRefundCount") + .HasColumnType("int"); + + b.Property("CouponRefundFee") + .HasColumnType("int"); + + b.Property("CouponRefundFees") + .HasColumnType("nvarchar(max)"); + + b.Property("CouponTypes") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeeType") + .HasColumnType("nvarchar(max)"); + + b.Property("MchId") + .HasColumnType("nvarchar(max)"); + + b.Property("OutRefundNo") + .HasColumnType("nvarchar(max)"); + + b.Property("OutTradeNo") + .HasColumnType("nvarchar(max)"); + + b.Property("PaymentId") + .HasColumnType("uniqueidentifier"); + + b.Property("RefundAccount") + .HasColumnType("nvarchar(max)"); + + b.Property("RefundFee") + .HasColumnType("int"); + + b.Property("RefundId") + .HasColumnType("nvarchar(max)"); + + b.Property("RefundRecvAccout") + .HasColumnType("nvarchar(max)"); + + b.Property("RefundRequestSource") + .HasColumnType("nvarchar(max)"); + + b.Property("RefundStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnMsg") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementRefundFee") + .HasColumnType("int"); + + b.Property("SettlementTotalFee") + .HasColumnType("int"); + + b.Property("SuccessTime") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalFee") + .HasColumnType("int"); + + b.Property("TransactionId") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("PaymentId"); + + b.ToTable("EasyAbpPaymentServiceWeChatPayRefundRecords", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("nvarchar(max)"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("nvarchar(max)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime2"); + + b.Property("NextTryTime") + .HasColumnType("datetime2"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AllowedAccessTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerApiResources", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ApiResourceId", "Type"); + + b.ToTable("IdentityServerApiResourceClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ApiResourceId", "Key", "Value"); + + b.ToTable("IdentityServerApiResourceProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Scope") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ApiResourceId", "Scope"); + + b.ToTable("IdentityServerApiResourceScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ApiResourceId", "Type", "Value"); + + b.ToTable("IdentityServerApiResourceSecrets", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Emphasize") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerApiScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => + { + b.Property("ApiScopeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ApiScopeId", "Type"); + + b.ToTable("IdentityServerApiScopeClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => + { + b.Property("ApiScopeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ApiScopeId", "Key", "Value"); + + b.ToTable("IdentityServerApiScopeProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AbsoluteRefreshTokenLifetime") + .HasColumnType("int"); + + b.Property("AccessTokenLifetime") + .HasColumnType("int"); + + b.Property("AccessTokenType") + .HasColumnType("int"); + + b.Property("AllowAccessTokensViaBrowser") + .HasColumnType("bit"); + + b.Property("AllowOfflineAccess") + .HasColumnType("bit"); + + b.Property("AllowPlainTextPkce") + .HasColumnType("bit"); + + b.Property("AllowRememberConsent") + .HasColumnType("bit"); + + b.Property("AllowedIdentityTokenSigningAlgorithms") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); + + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); + + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); + + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property("BackChannelLogoutUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("ClientClaimsPrefix") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ClientName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ClientUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentLifetime") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); + + b.Property("EnableLocalLogin") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property("FrontChannelLogoutUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); + + b.Property("IncludeJwtId") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("PairWiseSubjectSalt") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ProtocolType") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("RefreshTokenExpiration") + .HasColumnType("int"); + + b.Property("RefreshTokenUsage") + .HasColumnType("int"); + + b.Property("RequireClientSecret") + .HasColumnType("bit"); + + b.Property("RequireConsent") + .HasColumnType("bit"); + + b.Property("RequirePkce") + .HasColumnType("bit"); + + b.Property("RequireRequestObject") + .HasColumnType("bit"); + + b.Property("SlidingRefreshTokenLifetime") + .HasColumnType("int"); + + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); + + b.Property("UserCodeType") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("UserSsoLifetime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("IdentityServerClients", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Origin") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.HasKey("ClientId", "Origin"); + + b.ToTable("IdentityServerClientCorsOrigins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("GrantType") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.HasKey("ClientId", "GrantType"); + + b.ToTable("IdentityServerClientGrantTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Provider") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ClientId", "Provider"); + + b.ToTable("IdentityServerClientIdPRestrictions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostLogoutRedirectUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ClientId", "PostLogoutRedirectUri"); + + b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ClientId", "Key", "Value"); + + b.ToTable("IdentityServerClientProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("RedirectUri") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("ClientId", "RedirectUri"); + + b.ToTable("IdentityServerClientRedirectUris", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Scope") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("ClientId", "Scope"); + + b.ToTable("IdentityServerClientScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("Description") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientSecrets", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Expiration") + .IsRequired() + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("UserCode") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.HasIndex("UserCode"); + + b.ToTable("IdentityServerDeviceFlowCodes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => + { + b.Property("Key") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsumedTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000) + .HasColumnType("nvarchar(max)"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SessionId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("SubjectId") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Key"); + + b.HasIndex("Expiration"); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.HasIndex("SubjectId", "SessionId", "Type"); + + b.ToTable("IdentityServerPersistedGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("DisplayName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Emphasize") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerIdentityResources", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityResourceClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Value") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.HasKey("IdentityResourceId", "Key", "Value"); + + b.ToTable("IdentityServerIdentityResourceProperties", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderExtraFee", b => + { + b.HasOne("EasyAbp.EShop.Orders.Orders.Order", null) + .WithMany("OrderExtraFees") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b => + { + b.HasOne("EasyAbp.EShop.Orders.Orders.Order", null) + .WithMany("OrderLines") + .HasForeignKey("OrderId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b => + { + b.HasOne("EasyAbp.EShop.Payments.Payments.Payment", null) + .WithMany("PaymentItems") + .HasForeignKey("PaymentId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItem", b => + { + b.HasOne("EasyAbp.EShop.Payments.Refunds.Refund", null) + .WithMany("RefundItems") + .HasForeignKey("RefundId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderExtraFee", b => + { + b.HasOne("EasyAbp.EShop.Payments.Refunds.RefundItem", null) + .WithMany("OrderExtraFees") + .HasForeignKey("RefundItemId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderLine", b => + { + b.HasOne("EasyAbp.EShop.Payments.Refunds.RefundItem", null) + .WithMany("OrderLines") + .HasForeignKey("RefundItemId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod", b => + { + b.HasOne("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory", null) + .WithMany("Periods") + .HasForeignKey("ProductAssetCategoryId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod", b => + { + b.HasOne("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAsset", null) + .WithMany("Periods") + .HasForeignKey("ProductAssetId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplateScope", b => + { + b.HasOne("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplate", null) + .WithMany("Scopes") + .HasForeignKey("CouponTemplateId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b => + { + b.HasOne("EasyAbp.EShop.Products.Categories.Category", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b => + { + b.HasOne("EasyAbp.EShop.Products.Products.Product", null) + .WithMany("ProductAttributes") + .HasForeignKey("ProductId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b => + { + b.HasOne("EasyAbp.EShop.Products.Products.ProductAttribute", null) + .WithMany("ProductAttributeOptions") + .HasForeignKey("ProductAttributeId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b => + { + b.HasOne("EasyAbp.EShop.Products.Products.Product", null) + .WithMany("ProductSkus") + .HasForeignKey("ProductId"); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Payments.PaymentItem", b => + { + b.HasOne("EasyAbp.PaymentService.Payments.Payment", null) + .WithMany("PaymentItems") + .HasForeignKey("PaymentId"); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Refunds.RefundItem", b => + { + b.HasOne("EasyAbp.PaymentService.Refunds.Refund", null) + .WithMany("RefundItems") + .HasForeignKey("RefundId"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("UserClaims") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("UserClaims") + .HasForeignKey("ApiScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null) + .WithMany("Properties") + .HasForeignKey("ApiScopeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("Claims") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("AllowedCorsOrigins") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("AllowedGrantTypes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("IdentityProviderRestrictions") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("PostLogoutRedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("RedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("AllowedScopes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.Clients.Client", null) + .WithMany("ClientSecrets") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) + .WithMany("UserClaims") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => + { + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) + .WithMany("Properties") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.Order", b => + { + b.Navigation("OrderExtraFees"); + + b.Navigation("OrderLines"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b => + { + b.Navigation("PaymentItems"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b => + { + b.Navigation("RefundItems"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItem", b => + { + b.Navigation("OrderExtraFees"); + + b.Navigation("OrderLines"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory", b => + { + b.Navigation("Periods"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAsset", b => + { + b.Navigation("Periods"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplate", b => + { + b.Navigation("Scopes"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b => + { + b.Navigation("ProductAttributes"); + + b.Navigation("ProductSkus"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b => + { + b.Navigation("ProductAttributeOptions"); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Payments.Payment", b => + { + b.Navigation("PaymentItems"); + }); + + modelBuilder.Entity("EasyAbp.PaymentService.Refunds.Refund", b => + { + b.Navigation("RefundItems"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Navigation("Properties"); + + b.Navigation("Scopes"); + + b.Navigation("Secrets"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => + { + b.Navigation("AllowedCorsOrigins"); + + b.Navigation("AllowedGrantTypes"); + + b.Navigation("AllowedScopes"); + + b.Navigation("Claims"); + + b.Navigation("ClientSecrets"); + + b.Navigation("IdentityProviderRestrictions"); + + b.Navigation("PostLogoutRedirectUris"); + + b.Navigation("Properties"); + + b.Navigation("RedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Navigation("Properties"); + + b.Navigation("UserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.cs new file mode 100644 index 00000000..ad988bd5 --- /dev/null +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/20220516160609_AddedEntitiesInBookingPlugins.cs @@ -0,0 +1,126 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EShopSample.Migrations +{ + public partial class AddedEntitiesInBookingPlugins : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "EasyAbpEShopPluginsBookingProductAssetCategories", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProductId = table.Column(type: "uniqueidentifier", nullable: false), + ProductSkuId = table.Column(type: "uniqueidentifier", nullable: false), + AssetCategoryId = table.Column(type: "uniqueidentifier", nullable: false), + PeriodSchemeId = table.Column(type: "uniqueidentifier", nullable: false), + FromTime = table.Column(type: "datetime2", nullable: false), + ToTime = table.Column(type: "datetime2", nullable: true), + Price = table.Column(type: "decimal(20,8)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EasyAbpEShopPluginsBookingProductAssetCategories", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "EasyAbpEShopPluginsBookingProductAssets", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProductId = table.Column(type: "uniqueidentifier", nullable: false), + ProductSkuId = table.Column(type: "uniqueidentifier", nullable: false), + AssetId = table.Column(type: "uniqueidentifier", nullable: false), + PeriodSchemeId = table.Column(type: "uniqueidentifier", nullable: false), + FromTime = table.Column(type: "datetime2", nullable: false), + ToTime = table.Column(type: "datetime2", nullable: true), + Price = table.Column(type: "decimal(20,8)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EasyAbpEShopPluginsBookingProductAssets", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "EasyAbpEShopPluginsBookingProductAssetCategoryPeriods", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PeriodId = table.Column(type: "uniqueidentifier", nullable: false), + Price = table.Column(type: "decimal(20,8)", nullable: false), + ProductAssetCategoryId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EasyAbpEShopPluginsBookingProductAssetCategoryPeriods", x => x.Id); + table.ForeignKey( + name: "FK_EasyAbpEShopPluginsBookingProductAssetCategoryPeriods_EasyAbpEShopPluginsBookingProductAssetCategories_ProductAssetCategoryId", + column: x => x.ProductAssetCategoryId, + principalTable: "EasyAbpEShopPluginsBookingProductAssetCategories", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "EasyAbpEShopPluginsBookingProductAssetPeriods", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PeriodId = table.Column(type: "uniqueidentifier", nullable: false), + Price = table.Column(type: "decimal(20,8)", nullable: false), + ProductAssetId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_EasyAbpEShopPluginsBookingProductAssetPeriods", x => x.Id); + table.ForeignKey( + name: "FK_EasyAbpEShopPluginsBookingProductAssetPeriods_EasyAbpEShopPluginsBookingProductAssets_ProductAssetId", + column: x => x.ProductAssetId, + principalTable: "EasyAbpEShopPluginsBookingProductAssets", + principalColumn: "Id"); + }); + + migrationBuilder.CreateIndex( + name: "IX_EasyAbpEShopPluginsBookingProductAssetCategoryPeriods_ProductAssetCategoryId", + table: "EasyAbpEShopPluginsBookingProductAssetCategoryPeriods", + column: "ProductAssetCategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_EasyAbpEShopPluginsBookingProductAssetPeriods_ProductAssetId", + table: "EasyAbpEShopPluginsBookingProductAssetPeriods", + column: "ProductAssetId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "EasyAbpEShopPluginsBookingProductAssetCategoryPeriods"); + + migrationBuilder.DropTable( + name: "EasyAbpEShopPluginsBookingProductAssetPeriods"); + + migrationBuilder.DropTable( + name: "EasyAbpEShopPluginsBookingProductAssetCategories"); + + migrationBuilder.DropTable( + name: "EasyAbpEShopPluginsBookingProductAssets"); + } + } +} diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/EShopSampleDbContextModelSnapshot.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/EShopSampleDbContextModelSnapshot.cs index 5db75ce3..ad8c61bf 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/EShopSampleDbContextModelSnapshot.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/Migrations/EShopSampleDbContextModelSnapshot.cs @@ -19,7 +19,7 @@ namespace EShopSample.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("ProductVersion", "6.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); @@ -797,6 +797,174 @@ namespace EShopSample.Migrations b.ToTable("EasyAbpEShopPluginsBasketsProductUpdates", (string)null); }); + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssetCategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromTime") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PeriodSchemeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssetCategories", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("PeriodId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductAssetCategoryId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductAssetCategoryId"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssetCategoryPeriods", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAsset", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssetId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromTime") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PeriodSchemeId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductSkuId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssets", (string)null); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("PeriodId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(20,8)"); + + b.Property("ProductAssetId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductAssetId"); + + b.ToTable("EasyAbpEShopPluginsBookingProductAssetPeriods", (string)null); + }); + modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.Coupons.Coupon", b => { b.Property("Id") @@ -4683,17 +4851,31 @@ namespace EShopSample.Migrations modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderExtraFee", b => { b.HasOne("EasyAbp.EShop.Payments.Refunds.RefundItem", null) - .WithMany("RefundItemOrderExtraFees") + .WithMany("OrderExtraFees") .HasForeignKey("RefundItemId"); }); modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderLine", b => { b.HasOne("EasyAbp.EShop.Payments.Refunds.RefundItem", null) - .WithMany("RefundItemOrderLines") + .WithMany("OrderLines") .HasForeignKey("RefundItemId"); }); + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategoryPeriod", b => + { + b.HasOne("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory", null) + .WithMany("Periods") + .HasForeignKey("ProductAssetCategoryId"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAssetPeriod", b => + { + b.HasOne("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAsset", null) + .WithMany("Periods") + .HasForeignKey("ProductAssetId"); + }); + modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplateScope", b => { b.HasOne("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplate", null) @@ -5041,9 +5223,19 @@ namespace EShopSample.Migrations modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItem", b => { - b.Navigation("RefundItemOrderExtraFees"); + b.Navigation("OrderExtraFees"); + + b.Navigation("OrderLines"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssetCategories.ProductAssetCategory", b => + { + b.Navigation("Periods"); + }); - b.Navigation("RefundItemOrderLines"); + modelBuilder.Entity("EasyAbp.EShop.Plugins.Booking.ProductAssets.ProductAsset", b => + { + b.Navigation("Periods"); }); modelBuilder.Entity("EasyAbp.EShop.Plugins.Coupons.CouponTemplates.CouponTemplate", b => diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj index 0f335bdc..ffa17b3e 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSampleHttpApiClientModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSampleHttpApiClientModule.cs index 712d8884..075e272c 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSampleHttpApiClientModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSampleHttpApiClientModule.cs @@ -1,5 +1,6 @@ using EasyAbp.EShop; using EasyAbp.EShop.Plugins.Baskets; +using EasyAbp.EShop.Plugins.Booking; using EasyAbp.EShop.Plugins.Coupons; using EasyAbp.PaymentService; using EasyAbp.PaymentService.Prepayment; @@ -24,6 +25,7 @@ namespace EShopSample typeof(AbpFeatureManagementHttpApiClientModule), typeof(EShopHttpApiClientModule), typeof(EShopPluginsBasketsHttpApiClientModule), + typeof(EShopPluginsBookingHttpApiClientModule), typeof(EShopPluginsCouponsHttpApiClientModule), typeof(PaymentServiceHttpApiClientModule), typeof(PaymentServiceWeChatPayHttpApiClientModule), diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj index bd575558..5fc4e33c 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSampleHttpApiModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSampleHttpApiModule.cs index daf52607..cef2e77a 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSampleHttpApiModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSampleHttpApiModule.cs @@ -1,5 +1,6 @@ using EasyAbp.EShop; using EasyAbp.EShop.Plugins.Baskets; +using EasyAbp.EShop.Plugins.Booking; using EasyAbp.EShop.Plugins.Coupons; using EasyAbp.PaymentService; using EasyAbp.PaymentService.Prepayment; @@ -22,6 +23,7 @@ namespace EShopSample typeof(AbpFeatureManagementHttpApiModule), typeof(EShopHttpApiModule), typeof(EShopPluginsBasketsHttpApiModule), + typeof(EShopPluginsBookingHttpApiModule), typeof(EShopPluginsCouponsHttpApiModule), typeof(PaymentServiceHttpApiModule), typeof(PaymentServiceWeChatPayHttpApiModule), diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj index 2d95a425..12e9ed86 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj @@ -40,6 +40,7 @@ + diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs index 2ae5e25a..7ed5f414 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs @@ -9,6 +9,8 @@ using EasyAbp.EShop.Payments; using EasyAbp.EShop.Payments.Web; using EasyAbp.EShop.Plugins.Baskets; using EasyAbp.EShop.Plugins.Baskets.Web; +using EasyAbp.EShop.Plugins.Booking; +using EasyAbp.EShop.Plugins.Booking.Web; using EasyAbp.EShop.Plugins.Coupons; using EasyAbp.EShop.Plugins.Coupons.Web; using EasyAbp.EShop.Products; @@ -70,6 +72,7 @@ namespace EShopSample.Web typeof(AbpAspNetCoreSerilogModule), typeof(EShopWebModule), typeof(EShopPluginsBasketsWebModule), + typeof(EShopPluginsBookingWebModule), typeof(EShopPluginsCouponsWebModule), typeof(PaymentServiceWebModule), typeof(PaymentServiceWeChatPayWebModule), @@ -197,6 +200,12 @@ namespace EShopSample.Web options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Baskets.Application.Contracts")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Baskets.Application")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Baskets.Web")); + + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Booking{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Booking.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Booking{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Booking.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Booking{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Booking.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Booking{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Booking.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Booking{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Booking.Web")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Coupons{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Coupons.Domain.Shared")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}plugins{Path.DirectorySeparatorChar}Coupons{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Plugins.Coupons.Domain")); diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Program.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Program.cs index 7c5a516e..9a93944d 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Program.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Program.cs @@ -18,6 +18,9 @@ namespace EShopSample.Web #endif .MinimumLevel.Override("Microsoft", LogEventLevel.Information) .Enrich.FromLogContext() +#if DEBUG + .WriteTo.Console() +#endif .WriteTo.Async(c => c.File("Logs/logs.txt")) .CreateLogger();