From bcd2e5ee2985121749d18be1a85bf50d3b73a85e Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Mon, 20 Apr 2020 19:20:26 +0800 Subject: [PATCH] Basic CRUD features implement for product module --- .../EasyAbp.EShop.Products.Web.Unified.csproj | 0 .../ProductsPermissionDefinitionProvider.cs | 19 - .../Authorization/ProductsPermissions.cs | 14 - ...Shop.Products.Application.Contracts.csproj | 2 +- .../ProductsPermissionDefinitionProvider.cs | 37 + .../Authorization/ProductsPermissions.cs | 40 + .../Products/Categories/Dtos/CategoryDto.cs | 16 + .../Dtos/CreateUpdateCategoryDto.cs | 22 + .../Categories/ICategoryAppService.cs | 18 + ...EShopProductsApplicationContractsModule.cs | 0 .../Dtos/CreateUpdateProductCategoryDto.cs | 23 + .../Dtos/ProductCategoryDto.cs | 16 + .../IProductCategoryAppService.cs | 18 + .../Dtos/CreateUpdateProductTypeDto.cs | 24 + .../ProductTypes/Dtos/ProductTypeDto.cs | 17 + .../ProductTypes/IProductTypeAppService.cs | 18 + .../Dtos/CreateUpdateProductDetailDto.cs | 12 + .../Products/Dtos/CreateUpdateProductDto.cs | 31 + .../Products/Dtos/GetProductListDto.cs | 12 + .../Products/Dtos/ProductAttributeDto.cs | 17 + .../Dtos/ProductAttributeOptionDto.cs | 14 + .../Products/Dtos/ProductDetailDto.cs | 9 + .../Products/Products/Dtos/ProductDto.cs | 27 + .../Products/Products/Dtos/ProductSkuDto.cs | 20 + .../Products/Products/IProductAppService.cs | 18 + .../EasyAbp.EShop.Products.Application.csproj | 2 +- .../Products/Categories/CategoryAppService.cs | 25 + .../EShopProductsApplicationModule.cs | 0 .../ProductCategoryAppService.cs | 25 + .../ProductTypes/ProductTypeAppService.cs | 25 + .../Products/Products/ProductAppService.cs | 66 + .../EShop/Products}/ProductsAppService.cs | 0 .../ProductsApplicationAutoMapperProfile.cs | 39 + .../ProductsApplicationAutoMapperProfile.cs | 14 - ...asyAbp.EShop.Products.Domain.Shared.csproj | 6 +- .../EShopProductsDomainSharedModule.cs | 6 +- .../Products/Localization/Products/cs.json | 48 + .../Products/Localization/Products/en.json | 49 + .../Products/Localization/Products/pl.json | 48 + .../Products/Localization/Products/pt-BR.json | 48 + .../Products/Localization/Products/sl.json | 49 + .../Products/Localization/Products/tr.json | 49 + .../Products/Localization/Products/vi.json | 48 + .../Localization/Products/zh-Hans.json | 49 + .../Localization/Products/zh-Hant.json | 49 + .../Localization/ProductsResource.cs | 0 .../Products}/Products/InventoryStrategy.cs | 0 .../ProductInventoryReductionFailedEto.cs | 0 .../EShop/Products}/ProductsErrorCodes.cs | 0 .../Localization/Products/cs.json | 6 - .../Localization/Products/en.json | 6 - .../Localization/Products/pl.json | 6 - .../Localization/Products/pt-BR.json | 6 - .../Localization/Products/sl.json | 6 - .../Localization/Products/tr.json | 6 - .../Localization/Products/vi.json | 6 - .../Localization/Products/zh-Hans.json | 6 - .../Localization/Products/zh-Hant.json | 6 - .../EasyAbp.EShop.Products.Domain.csproj | 2 +- .../EShop/Products}/Categories/Category.cs | 24 +- .../Categories/ICategoryRepository.cs | 9 + .../Products}/EShopProductsDomainModule.cs | 0 .../IProductCategoryRepository.cs | 15 + .../ProductCategories/ProductCategory.cs | 24 +- .../ProductTypes/IProductTypeRepository.cs | 9 + .../Products}/ProductTypes/ProductType.cs | 22 +- .../Products/IProductInventoryManager.cs | 0 .../Products/IProductPriceProvider.cs | 0 .../Products/Products/IProductRepository.cs | 9 + .../EShop/Products/Products/Product.cs | 58 + .../Products}/Products/ProductAttribute.cs | 3 + .../Products/ProductAttributeOption.cs | 0 .../EShop/Products}/Products/ProductDetail.cs | 10 + .../EShop/Products}/Products/ProductSku.cs | 2 + .../EShop/Products}/ProductsDbProperties.cs | 0 .../ProductsSettingDefinitionProvider.cs | 0 .../Products}/Settings/ProductsSettings.cs | 0 .../Products/Product.cs | 27 - ....EShop.Products.EntityFrameworkCore.csproj | 6 +- .../Products/Categories/CategoryRepository.cs | 14 + .../EShopProductsEntityFrameworkCoreModule.cs | 12 +- .../EntityFrameworkCore/IProductsDbContext.cs | 26 + .../EntityFrameworkCore/ProductsDbContext.cs | 39 + ...roductsDbContextModelCreatingExtensions.cs | 105 + ...roductsModelBuilderConfigurationOptions.cs | 0 .../ProductCategoryRepository.cs | 33 + .../ProductTypes/ProductTypeRepository.cs | 14 + .../Products/Products/ProductRepository.cs | 14 + .../EntityFrameworkCore/IProductsDbContext.cs | 13 - .../EntityFrameworkCore/ProductsDbContext.cs | 27 - ...roductsDbContextModelCreatingExtensions.cs | 43 - ...syAbp.EShop.Products.HttpApi.Client.csproj | 2 +- .../EShopProductsHttpApiClientModule.cs | 0 .../EasyAbp.EShop.Products.HttpApi.csproj | 2 +- .../Products}/EShopProductsHttpApiModule.cs | 0 .../EShop/Products}/ProductsController.cs | 0 .../EasyAbp.EShop.Products.MongoDB.csproj | 6 +- .../MongoDB/EShopProductsMongoDbModule.cs | 0 .../MongoDB/IProductsMongoDbContext.cs | 0 .../MongoDB/ProductsMongoDbContext.cs | 0 .../ProductsMongoDbContextExtensions.cs | 0 ...tsMongoModelBuilderConfigurationOptions.cs | 0 .../EasyAbp.EShop.Products.Web.csproj | 13 + .../Categories/Category/CreateModal.cshtml | 16 + .../Categories/Category/CreateModal.cshtml.cs | 26 + .../Categories/Category/EditModal.cshtml | 17 + .../Categories/Category/EditModal.cshtml.cs | 37 + .../Products/Categories/Category/Index.cshtml | 49 + .../Categories/Category/Index.cshtml.cs | 12 + .../Products/Categories/Category/index.css | 0 .../Products/Categories/Category/index.js | 70 + .../Pages/{ => EShop}/Products/Index.cshtml | 0 .../{ => EShop}/Products/Index.cshtml.cs | 2 +- .../ProductType/CreateModal.cshtml | 16 + .../ProductType/CreateModal.cshtml.cs | 26 + .../ProductTypes/ProductType/EditModal.cshtml | 17 + .../ProductType/EditModal.cshtml.cs | 37 + .../ProductTypes/ProductType/Index.cshtml | 49 + .../ProductTypes/ProductType/Index.cshtml.cs | 12 + .../ProductTypes/ProductType/index.css | 0 .../ProductTypes/ProductType/index.js | 64 + .../Products/Product/CreateModal.cshtml | 16 + .../Products/Product/CreateModal.cshtml.cs | 26 + .../Products/Product/EditModal.cshtml | 17 + .../Products/Product/EditModal.cshtml.cs | 37 + .../Products/Products/Product/Index.cshtml | 51 + .../Products/Products/Product/Index.cshtml.cs | 12 + .../EShop/Products/Products/Product/index.css | 0 .../EShop/Products/Products/Product/index.js | 66 + .../{ => EShop}/Products/_ViewImports.cshtml | 0 .../ProductsMenuContributor.cs | 53 +- .../ProductsWebAutoMapperProfile.cs | 12 +- .../Categories/CategoryAppServiceTests.cs | 26 + .../ProductCategoryAppServiceTests.cs | 26 + .../ProductTypeAppServiceTests.cs | 26 + .../Products/ProductAppServiceTests.cs | 26 + .../Categories/CategoryDomainTests.cs | 23 + .../ProductCategoryDomainTests.cs | 23 + .../ProductTypes/ProductTypeDomainTests.cs | 23 + .../Products/ProductDomainTests.cs | 23 + .../Categories/CategoryRepositoryTests.cs | 31 + .../ProductCategoryRepositoryTests.cs | 31 + .../ProductTypeRepositoryTests.cs | 31 + .../Products/ProductRepositoryTests.cs | 31 + .../aspnet-core/EasyMall.sln.DotSettings | 1 + .../EasyMall.Application.Contracts.csproj | 1 + .../EasyMallApplicationContractsModule.cs | 2 + .../EasyMall.Application.csproj | 1 + .../EasyMallApplicationModule.cs | 2 + .../EasyMall.Domain.Shared.csproj | 1 + .../EasyMallDomainSharedModule.cs | 2 + .../EasyMall.Domain/EasyMall.Domain.csproj | 1 + .../EasyMall.Domain/EasyMallDomainModule.cs | 2 + ...0420031611_AddedProductService.Designer.cs | 2028 +++++++++++++++ .../20200420031611_AddedProductService.cs | 124 + ...420110940_AddedProductEntities.Designer.cs | 2239 +++++++++++++++++ .../20200420110940_AddedProductEntities.cs | 144 ++ ...asyMallMigrationsDbContextModelSnapshot.cs | 482 +++- .../EasyMall.EntityFrameworkCore.csproj | 1 + .../EasyMallEntityFrameworkCoreModule.cs | 2 + .../EasyMall.HttpApi.Client.csproj | 1 + .../EasyMallHttpApiClientModule.cs | 2 + .../EasyMall.HttpApi/EasyMall.HttpApi.csproj | 1 + .../EasyMall.HttpApi/EasyMallHttpApiModule.cs | 2 + .../src/EasyMall.Web/EasyMall.Web.csproj | 1 + .../src/EasyMall.Web/EasyMallWebModule.cs | 58 + 166 files changed, 7642 insertions(+), 242 deletions(-) create mode 100644 modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Web.Unified/EasyAbp.EShop.Products.Web.Unified.csproj delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissionDefinitionProvider.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissions.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissionDefinitionProvider.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissions.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/ICategoryAppService.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/{ => EasyAbp/EShop/Products}/EShopProductsApplicationContractsModule.cs (100%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/CreateUpdateProductCategoryDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/IProductCategoryAppService.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/CreateUpdateProductTypeDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/ProductTypeDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/IProductTypeAppService.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDetailDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDetailDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/{ => EasyAbp/EShop/Products}/EShopProductsApplicationModule.cs (100%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductTypes/ProductTypeAppService.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/{ => EasyAbp/EShop/Products}/ProductsAppService.cs (100%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/ProductsApplicationAutoMapperProfile.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/{ => EasyAbp/EShop/Products}/EShopProductsDomainSharedModule.cs (83%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/{ => EasyAbp/EShop/Products}/Localization/ProductsResource.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/{ => EasyAbp/EShop/Products}/Products/InventoryStrategy.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/{ => EasyAbp/EShop/Products}/Products/ProductInventoryReductionFailedEto.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/{ => EasyAbp/EShop/Products}/ProductsErrorCodes.cs (100%) delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/cs.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/en.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pl.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pt-BR.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/sl.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/tr.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/vi.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hans.json delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hant.json rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Categories/Category.cs (55%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/ICategoryRepository.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/EShopProductsDomainModule.cs (100%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/IProductCategoryRepository.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/ProductCategories/ProductCategory.cs (55%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTypes/IProductTypeRepository.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/ProductTypes/ProductType.cs (55%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Products/IProductInventoryManager.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Products/IProductPriceProvider.cs (100%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Products/ProductAttribute.cs (71%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Products/ProductAttributeOption.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Products/ProductDetail.cs (64%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Products/ProductSku.cs (89%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/ProductsDbProperties.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Settings/ProductsSettingDefinitionProvider.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/{ => EasyAbp/EShop/Products}/Settings/ProductsSettings.cs (100%) delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/Product.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Categories/CategoryRepository.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/{ => EasyAbp/EShop/Products}/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs (56%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/{ => EasyAbp/EShop/Products}/EntityFrameworkCore/ProductsModelBuilderConfigurationOptions.cs (100%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductCategories/ProductCategoryRepository.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductTypes/ProductTypeRepository.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/IProductsDbContext.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContext.cs delete mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/{ => EasyAbp/EShop/Products}/EShopProductsHttpApiClientModule.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/{ => EasyAbp/EShop/Products}/EShopProductsHttpApiModule.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/{ => EasyAbp/EShop/Products}/ProductsController.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/{ => EasyAbp/EShop/Products}/MongoDB/EShopProductsMongoDbModule.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/{ => EasyAbp/EShop/Products}/MongoDB/IProductsMongoDbContext.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/{ => EasyAbp/EShop/Products}/MongoDB/ProductsMongoDbContext.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/{ => EasyAbp/EShop/Products}/MongoDB/ProductsMongoDbContextExtensions.cs (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/{ => EasyAbp/EShop/Products}/MongoDB/ProductsMongoModelBuilderConfigurationOptions.cs (100%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/index.css create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/index.js rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/{ => EShop}/Products/Index.cshtml (100%) rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/{ => EShop}/Products/Index.cshtml.cs (65%) create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/index.css create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/index.js create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.css create mode 100644 modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js rename modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/{ => EShop}/Products/_ViewImports.cshtml (100%) create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Categories/CategoryAppServiceTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductCategories/ProductCategoryAppServiceTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductTypes/ProductTypeAppServiceTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Products/ProductAppServiceTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Categories/CategoryDomainTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductCategories/ProductCategoryDomainTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductTypes/ProductTypeDomainTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Products/ProductDomainTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Categories/CategoryRepositoryTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductCategories/ProductCategoryRepositoryTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductTypes/ProductTypeRepositoryTests.cs create mode 100644 modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Products/ProductRepositoryTests.cs create mode 100644 samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.Designer.cs create mode 100644 samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.cs create mode 100644 samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.Designer.cs create mode 100644 samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.cs diff --git a/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Web.Unified/EasyAbp.EShop.Products.Web.Unified.csproj b/modules/EasyAbp.EShop.Products/host/EasyAbp.EShop.Products.Web.Unified/EasyAbp.EShop.Products.Web.Unified.csproj new file mode 100644 index 00000000..e69de29b diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissionDefinitionProvider.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissionDefinitionProvider.cs deleted file mode 100644 index 5ac56fc8..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissionDefinitionProvider.cs +++ /dev/null @@ -1,19 +0,0 @@ -using EasyAbp.EShop.Products.Localization; -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.Localization; - -namespace EasyAbp.EShop.Products.Authorization -{ - public class ProductsPermissionDefinitionProvider : PermissionDefinitionProvider - { - public override void Define(IPermissionDefinitionContext context) - { - //var moduleGroup = context.AddGroup(ProductsPermissions.GroupName, L("Permission:Products")); - } - - private static LocalizableString L(string name) - { - return LocalizableString.Create(name); - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissions.cs deleted file mode 100644 index 2ef5039f..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/Authorization/ProductsPermissions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Volo.Abp.Reflection; - -namespace EasyAbp.EShop.Products.Authorization -{ - public class ProductsPermissions - { - public const string GroupName = "Products"; - - public static string[] GetAll() - { - return ReflectionHelper.GetPublicConstantsRecursively(typeof(ProductsPermissions)); - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj index 92a1a6c8..17e07189 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj @@ -4,7 +4,7 @@ netstandard2.0 - EasyAbp.EShop.Products + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissionDefinitionProvider.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissionDefinitionProvider.cs new file mode 100644 index 00000000..ff7304c2 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissionDefinitionProvider.cs @@ -0,0 +1,37 @@ +using EasyAbp.EShop.Products.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; +using Volo.Abp.MultiTenancy; + +namespace EasyAbp.EShop.Products.Authorization +{ + public class ProductsPermissionDefinitionProvider : PermissionDefinitionProvider + { + public override void Define(IPermissionDefinitionContext context) + { + var moduleGroup = context.AddGroup(ProductsPermissions.GroupName, L("Permission:Products")); + + var productTypes = moduleGroup.AddPermission(ProductsPermissions.ProductTypes.Default, L("Permission:ProductType"), MultiTenancySides.Host); + productTypes.AddChild(ProductsPermissions.ProductTypes.Create, L("Permission:Create"), MultiTenancySides.Host); + productTypes.AddChild(ProductsPermissions.ProductTypes.Update, L("Permission:Update"), MultiTenancySides.Host); + productTypes.AddChild(ProductsPermissions.ProductTypes.Delete, L("Permission:Delete"), MultiTenancySides.Host); + + var categories = moduleGroup.AddPermission(ProductsPermissions.Categories.Default, L("Permission:Category")); + categories.AddChild(ProductsPermissions.Categories.CrossStore, L("Permission:CrossStore")); + categories.AddChild(ProductsPermissions.Categories.Create, L("Permission:Create")); + categories.AddChild(ProductsPermissions.Categories.Update, L("Permission:Update")); + categories.AddChild(ProductsPermissions.Categories.Delete, L("Permission:Delete")); + + var product = moduleGroup.AddPermission(ProductsPermissions.Products.Default, L("Permission:Product")); + product.AddChild(ProductsPermissions.Products.CrossStore, L("Permission:CrossStore")); + product.AddChild(ProductsPermissions.Products.Create, L("Permission:Create")); + product.AddChild(ProductsPermissions.Products.Update, L("Permission:Update")); + product.AddChild(ProductsPermissions.Products.Delete, L("Permission:Delete")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissions.cs new file mode 100644 index 00000000..3de7a553 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Authorization/ProductsPermissions.cs @@ -0,0 +1,40 @@ +using Volo.Abp.Reflection; + +namespace EasyAbp.EShop.Products.Authorization +{ + public class ProductsPermissions + { + public const string GroupName = "Products"; + + public class ProductTypes + { + public const string Default = GroupName + ".ProductType"; + public const string Delete = Default + ".Delete"; + public const string Update = Default + ".Update"; + public const string Create = Default + ".Create"; + } + + public class Categories + { + public const string Default = GroupName + ".Category"; + public const string CrossStore = Default + ".CrossStore"; + public const string Delete = Default + ".Delete"; + public const string Update = Default + ".Update"; + public const string Create = Default + ".Create"; + } + + public class Products + { + public const string Default = GroupName + ".Product"; + public const string CrossStore = Default + ".CrossStore"; + public const string Delete = Default + ".Delete"; + public const string Update = Default + ".Update"; + public const string Create = Default + ".Create"; + } + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(ProductsPermissions)); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs new file mode 100644 index 00000000..f69850f6 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs @@ -0,0 +1,16 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.Categories.Dtos +{ + public class CategoryDto : FullAuditedEntityDto + { + public Guid? ParentCategoryId { get; set; } + + public string DisplayName { get; set; } + + public string Description { get; set; } + + public string MediaResources { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs new file mode 100644 index 00000000..b18a31ed --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CreateUpdateCategoryDto.cs @@ -0,0 +1,22 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Products.Categories.Dtos +{ + public class CreateUpdateCategoryDto + { + [DisplayName("CategoryParentCategoryId")] + public Guid? ParentCategoryId { get; set; } + + [Required] + [DisplayName("CategoryDisplayName")] + public string DisplayName { get; set; } + + [DisplayName("CategoryDescription")] + public string Description { get; set; } + + [DisplayName("CategoryMediaResources")] + public string MediaResources { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/ICategoryAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/ICategoryAppService.cs new file mode 100644 index 00000000..b5a11d62 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/ICategoryAppService.cs @@ -0,0 +1,18 @@ +using System; +using EasyAbp.EShop.Products.Categories.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Products.Categories +{ + public interface ICategoryAppService : + ICrudAppService< + CategoryDto, + Guid, + PagedAndSortedResultRequestDto, + CreateUpdateCategoryDto, + CreateUpdateCategoryDto> + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EShopProductsApplicationContractsModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsApplicationContractsModule.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EShopProductsApplicationContractsModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/EShopProductsApplicationContractsModule.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/CreateUpdateProductCategoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/CreateUpdateProductCategoryDto.cs new file mode 100644 index 00000000..d6c9624b --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/CreateUpdateProductCategoryDto.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Products.ProductCategories.Dtos +{ + public class CreateUpdateProductCategoryDto + { + [DisplayName("ProductCategoryStoreId")] + public Guid? StoreId { get; set; } + + [Required] + [DisplayName("ProductCategoryCategoryId")] + public Guid CategoryId { get; set; } + + [Required] + [DisplayName("ProductCategoryProductId")] + public Guid ProductId { get; set; } + + [DisplayName("ProductCategoryDisplayOrder")] + public int DisplayOrder { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs new file mode 100644 index 00000000..eabb318d --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/Dtos/ProductCategoryDto.cs @@ -0,0 +1,16 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.ProductCategories.Dtos +{ + public class ProductCategoryDto : AuditedEntityDto + { + public Guid? StoreId { get; set; } + + public Guid CategoryId { get; set; } + + public Guid ProductId { get; set; } + + public int DisplayOrder { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/IProductCategoryAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/IProductCategoryAppService.cs new file mode 100644 index 00000000..feb53235 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductCategories/IProductCategoryAppService.cs @@ -0,0 +1,18 @@ +using System; +using EasyAbp.EShop.Products.ProductCategories.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Products.ProductCategories +{ + public interface IProductCategoryAppService : + ICrudAppService< + ProductCategoryDto, + Guid, + PagedAndSortedResultRequestDto, + CreateUpdateProductCategoryDto, + CreateUpdateProductCategoryDto> + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/CreateUpdateProductTypeDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/CreateUpdateProductTypeDto.cs new file mode 100644 index 00000000..70aeea6d --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/CreateUpdateProductTypeDto.cs @@ -0,0 +1,24 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.MultiTenancy; + +namespace EasyAbp.EShop.Products.ProductTypes.Dtos +{ + public class CreateUpdateProductTypeDto + { + [Required] + [DisplayName("ProductTypeName")] + public string Name { get; set; } + + [Required] + [DisplayName("ProductTypeDisplayName")] + public string DisplayName { get; set; } + + [DisplayName("ProductTypeDescription")] + public string Description { get; set; } + + [DisplayName("ProductTypeMultiTenancySide")] + public MultiTenancySides MultiTenancySide { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/ProductTypeDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/ProductTypeDto.cs new file mode 100644 index 00000000..eef31b72 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/Dtos/ProductTypeDto.cs @@ -0,0 +1,17 @@ +using System; +using Volo.Abp.Application.Dtos; +using Volo.Abp.MultiTenancy; + +namespace EasyAbp.EShop.Products.ProductTypes.Dtos +{ + public class ProductTypeDto : FullAuditedEntityDto + { + public string Name { get; set; } + + public string DisplayName { get; set; } + + public string Description { get; set; } + + public MultiTenancySides MultiTenancySide { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/IProductTypeAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/IProductTypeAppService.cs new file mode 100644 index 00000000..feec3995 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/ProductTypes/IProductTypeAppService.cs @@ -0,0 +1,18 @@ +using System; +using EasyAbp.EShop.Products.ProductTypes.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Products.ProductTypes +{ + public interface IProductTypeAppService : + ICrudAppService< + ProductTypeDto, + Guid, + PagedAndSortedResultRequestDto, + CreateUpdateProductTypeDto, + CreateUpdateProductTypeDto> + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDetailDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDetailDto.cs new file mode 100644 index 00000000..400d4c47 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDetailDto.cs @@ -0,0 +1,12 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class CreateUpdateProductDetailDto + { + [DisplayName("ProductDetailDescription")] + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs new file mode 100644 index 00000000..b5db2d36 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/CreateUpdateProductDto.cs @@ -0,0 +1,31 @@ +using System; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class CreateUpdateProductDto + { + [DisplayName("ProductStoreId")] + public Guid? StoreId { get; set; } + + [Required] + [DisplayName("ProductProductTypeId")] + public Guid ProductTypeId { get; set; } + + [Required] + [DisplayName("ProductDisplayName")] + public string DisplayName { get; set; } + + public CreateUpdateProductDetailDto ProductDetail { get; set; } + + [DisplayName("ProductInventoryStrategy")] + public InventoryStrategy InventoryStrategy { get; set; } + + [DisplayName("ProductMediaResources")] + public string MediaResources { get; set; } + + [DisplayName("ProductIsPublished")] + public bool IsPublished { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs new file mode 100644 index 00000000..86c584f8 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/GetProductListDto.cs @@ -0,0 +1,12 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class GetProductListDto : PagedAndSortedResultRequestDto + { + public Guid? StoreId { get; set; } + + public Guid? CategoryId { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs new file mode 100644 index 00000000..10ac0adc --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class ProductAttributeDto : FullAuditedEntityDto + { + [Required] + public string DisplayName { get; set; } + + public string Description { get; set; } + + public IEnumerable ProductAttributeOptions { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs new file mode 100644 index 00000000..2e2f7ffd --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeOptionDto.cs @@ -0,0 +1,14 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class ProductAttributeOptionDto : FullAuditedEntityDto + { + [Required] + public string DisplayName { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDetailDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDetailDto.cs new file mode 100644 index 00000000..4ccd4764 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDetailDto.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class ProductDetailDto : EntityDto + { + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs new file mode 100644 index 00000000..3d7bde21 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class ProductDto : FullAuditedEntityDto + { + public Guid? StoreId { get; set; } + + public Guid ProductTypeId { get; set; } + + public string DisplayName { get; set; } + + public InventoryStrategy InventoryStrategy { get; set; } + + public string MediaResources { get; set; } + + public bool IsPublished { get; set; } + + public ProductDetailDto ProductDetail { get; set; } + + public IEnumerable ProductAttributes { get; set; } + + public IEnumerable ProductSkus { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs new file mode 100644 index 00000000..8dd8d594 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs @@ -0,0 +1,20 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace EasyAbp.EShop.Products.Products.Dtos +{ + public class ProductSkuDto : FullAuditedEntityDto + { + public string SerializedAttributeOptionIds { get; set; } + + public decimal OriginalPrice { get; set; } + + public decimal Price { get; set; } + + public int Inventory { get; set; } + + public int Sold { get; set; } + + public int OrderMinQuantity { get; set; } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs new file mode 100644 index 00000000..7ae76e18 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/IProductAppService.cs @@ -0,0 +1,18 @@ +using System; +using EasyAbp.EShop.Products.Products.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Products.Products +{ + public interface IProductAppService : + ICrudAppService< + ProductDto, + Guid, + GetProductListDto, + CreateUpdateProductDto, + CreateUpdateProductDto> + { + + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj index ae69f6ff..5f5f42a8 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj @@ -4,7 +4,7 @@ netstandard2.0 - EasyAbp.EShop.Products + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs new file mode 100644 index 00000000..3c3dd212 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Categories/CategoryAppService.cs @@ -0,0 +1,25 @@ +using System; +using EasyAbp.EShop.Products.Authorization; +using EasyAbp.EShop.Products.Categories.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Products.Categories +{ + public class CategoryAppService : CrudAppService, + ICategoryAppService + { + protected override string CreatePolicyName { get; set; } = ProductsPermissions.Categories.Create; + protected override string DeletePolicyName { get; set; } = ProductsPermissions.Categories.Delete; + protected override string UpdatePolicyName { get; set; } = ProductsPermissions.Categories.Update; + protected override string GetPolicyName { get; set; } = ProductsPermissions.Categories.Default; + protected override string GetListPolicyName { get; set; } = ProductsPermissions.Categories.Default; + + private readonly ICategoryRepository _repository; + + public CategoryAppService(ICategoryRepository repository) : base(repository) + { + _repository = repository; + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EShopProductsApplicationModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/EShopProductsApplicationModule.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EShopProductsApplicationModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/EShopProductsApplicationModule.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs new file mode 100644 index 00000000..bb70df4b --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductCategories/ProductCategoryAppService.cs @@ -0,0 +1,25 @@ +using System; +using EasyAbp.EShop.Products.Authorization; +using EasyAbp.EShop.Products.ProductCategories.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Products.ProductCategories +{ + public class ProductCategoryAppService : CrudAppService, + IProductCategoryAppService + { + protected override string CreatePolicyName { get; set; } = ProductsPermissions.Products.Create; + protected override string DeletePolicyName { get; set; } = ProductsPermissions.Products.Delete; + protected override string UpdatePolicyName { get; set; } = ProductsPermissions.Products.Update; + protected override string GetPolicyName { get; set; } = ProductsPermissions.Products.Default; + protected override string GetListPolicyName { get; set; } = ProductsPermissions.Products.Default; + + private readonly IProductCategoryRepository _repository; + + public ProductCategoryAppService(IProductCategoryRepository repository) : base(repository) + { + _repository = repository; + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductTypes/ProductTypeAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductTypes/ProductTypeAppService.cs new file mode 100644 index 00000000..b78c2d7f --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductTypes/ProductTypeAppService.cs @@ -0,0 +1,25 @@ +using System; +using EasyAbp.EShop.Products.Authorization; +using EasyAbp.EShop.Products.ProductTypes.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace EasyAbp.EShop.Products.ProductTypes +{ + public class ProductTypeAppService : CrudAppService, + IProductTypeAppService + { + protected override string CreatePolicyName { get; set; } = ProductsPermissions.ProductTypes.Create; + protected override string DeletePolicyName { get; set; } = ProductsPermissions.ProductTypes.Delete; + protected override string UpdatePolicyName { get; set; } = ProductsPermissions.ProductTypes.Update; + protected override string GetPolicyName { get; set; } = ProductsPermissions.ProductTypes.Default; + protected override string GetListPolicyName { get; set; } = ProductsPermissions.ProductTypes.Default; + + private readonly IProductTypeRepository _repository; + + public ProductTypeAppService(IProductTypeRepository repository) : base(repository) + { + _repository = repository; + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs new file mode 100644 index 00000000..0a73308f --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/Products/ProductAppService.cs @@ -0,0 +1,66 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using EasyAbp.EShop.Products.Authorization; +using EasyAbp.EShop.Products.ProductCategories; +using EasyAbp.EShop.Products.Products.Dtos; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Threading; + +namespace EasyAbp.EShop.Products.Products +{ + public class ProductAppService : CrudAppService, + IProductAppService + { + protected override string CreatePolicyName { get; set; } = ProductsPermissions.Products.Create; + protected override string DeletePolicyName { get; set; } = ProductsPermissions.Products.Delete; + protected override string UpdatePolicyName { get; set; } = ProductsPermissions.Products.Update; + protected override string GetPolicyName { get; set; } = ProductsPermissions.Products.Default; + protected override string GetListPolicyName { get; set; } = ProductsPermissions.Products.Default; + + private readonly IProductCategoryRepository _productCategoryRepository; + private readonly IProductRepository _repository; + + public ProductAppService( + IProductCategoryRepository productCategoryRepository, + IProductRepository repository) : base(repository) + { + _productCategoryRepository = productCategoryRepository; + _repository = repository; + } + + protected override IQueryable CreateFilteredQuery(GetProductListDto input) + { + var query = base.CreateFilteredQuery(input); + + if (input.CategoryId.HasValue) + { + var productIds = AsyncHelper + .RunSync(() => _productCategoryRepository.GetListByCategoryId(input.CategoryId.Value, input.StoreId)) + .Select(pc => pc.ProductId).ToList(); + + query = query.Where(p => productIds.Contains(p.Id)); + } + else if (input.StoreId.HasValue) + { + query = query.Where(p => p.StoreId == input.StoreId); + } + + return query; + } + + public override async Task CreateAsync(CreateUpdateProductDto input) + { + await CheckCreatePolicyAsync(); + + var entity = MapToEntity(input); + + TryToSetTenantId(entity); + + await Repository.InsertAsync(entity, autoSave: true); + + return MapToGetOutputDto(entity); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/ProductsAppService.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsAppService.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/ProductsAppService.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsAppService.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..e8f06b38 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp/EShop/Products/ProductsApplicationAutoMapperProfile.cs @@ -0,0 +1,39 @@ +using EasyAbp.EShop.Products.Products; +using EasyAbp.EShop.Products.Products.Dtos; +using EasyAbp.EShop.Products.Categories; +using EasyAbp.EShop.Products.Categories.Dtos; +using EasyAbp.EShop.Products.ProductTypes; +using EasyAbp.EShop.Products.ProductTypes.Dtos; +using EasyAbp.EShop.Products.ProductCategories; +using EasyAbp.EShop.Products.ProductCategories.Dtos; +using AutoMapper; +using Volo.Abp.AutoMapper; + +namespace EasyAbp.EShop.Products +{ + public class ProductsApplicationAutoMapperProfile : Profile + { + public ProductsApplicationAutoMapperProfile() + { + /* 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(MemberList.Source) + .Ignore(p => p.ProductDetail) + .Ignore(p => p.ProductAttributes) + .Ignore(p => p.ProductSkus); + CreateMap(MemberList.Source); + CreateMap(); + CreateMap(MemberList.Source); + CreateMap(); + CreateMap(MemberList.Source); + CreateMap(); + CreateMap(MemberList.Source); + } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/ProductsApplicationAutoMapperProfile.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/ProductsApplicationAutoMapperProfile.cs deleted file mode 100644 index b3c890de..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/ProductsApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,14 +0,0 @@ -using AutoMapper; - -namespace EasyAbp.EShop.Products -{ - public class ProductsApplicationAutoMapperProfile : Profile - { - public ProductsApplicationAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj index b1c1022e..4401f1f3 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj @@ -4,7 +4,7 @@ netstandard2.0 - EasyAbp.EShop.Products + @@ -12,8 +12,8 @@ - - + + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EShopProductsDomainSharedModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/EShopProductsDomainSharedModule.cs similarity index 83% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EShopProductsDomainSharedModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/EShopProductsDomainSharedModule.cs index 6fee279c..509eec27 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EShopProductsDomainSharedModule.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/EShopProductsDomainSharedModule.cs @@ -17,7 +17,7 @@ namespace EasyAbp.EShop.Products { Configure(options => { - options.FileSets.AddEmbedded("EasyAbp.EShop.Products"); + options.FileSets.AddEmbedded(); }); Configure(options => @@ -25,12 +25,12 @@ namespace EasyAbp.EShop.Products options.Resources .Add("en") .AddBaseTypes(typeof(AbpValidationResource)) - .AddVirtualJson("/Localization/Products"); + .AddVirtualJson("/EasyAbp/EShop/Products/Localization/Products"); }); Configure(options => { - options.MapCodeNamespace("Products", typeof(ProductsResource)); + options.MapCodeNamespace("EasyAbp.EShop.Products", typeof(ProductsResource)); }); } } diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json new file mode 100644 index 00000000..c7cabb77 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/cs.json @@ -0,0 +1,48 @@ +{ + "culture": "cs", + "texts": { + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json new file mode 100644 index 00000000..fabf73d3 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/en.json @@ -0,0 +1,49 @@ +{ + "culture": "en", + "texts": { + "ManageYourProfile": "Manage your profile", + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json new file mode 100644 index 00000000..a91dd126 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pl.json @@ -0,0 +1,48 @@ +{ + "culture": "pl", + "texts": { + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json new file mode 100644 index 00000000..702fff9f --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/pt-BR.json @@ -0,0 +1,48 @@ +{ + "culture": "pt-BR", + "texts": { + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json new file mode 100644 index 00000000..bbbc0f3f --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/sl.json @@ -0,0 +1,49 @@ +{ + "culture": "sl", + "texts": { + "ManageYourProfile": "Upravljajte svojim profilom", + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json new file mode 100644 index 00000000..cd13e33a --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/tr.json @@ -0,0 +1,49 @@ +{ + "culture": "tr", + "texts": { + "ManageYourProfile": "Profil y�netimi", + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json new file mode 100644 index 00000000..b99ad82f --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/vi.json @@ -0,0 +1,48 @@ +{ + "culture": "vi", + "texts": { + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json new file mode 100644 index 00000000..87ce53bf --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hans.json @@ -0,0 +1,49 @@ +{ + "culture": "zh-Hans", + "texts": { + "ManageYourProfile": "管理个人资料", + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json new file mode 100644 index 00000000..3c964c54 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/Products/zh-Hant.json @@ -0,0 +1,49 @@ +{ + "culture": "zh-Hant", + "texts": { + "ManageYourProfile": "管理個人資料", + "Menu:Product": "MenuProduct", + "Product": "Product", + "ProductTenantId": "ProductTenantId", + "ProductStoreId": "ProductStoreId", + "ProductProductTypeId": "ProductProductTypeId", + "ProductDisplayName": "ProductDisplayName", + "ProductDetailDescription": "ProductDetailDescription", + "ProductInventoryStrategy": "ProductInventoryStrategy", + "ProductIsPublished": "ProductIsPublished", + "ProductMediaResources": "ProductMediaResources", + "CreateProduct": "CreateProduct", + "EditProduct": "EditProduct", + "ProductDeletionConfirmationMessage": "Are you sure to delete the product {0}?", + "SuccessfullyDeleted": "Successfully deleted", + "Menu:Category": "MenuCategory", + "Category": "Category", + "CategoryTenantId": "CategoryTenantId", + "CategoryParentCategoryId": "CategoryParentCategoryId", + "CategoryDisplayName": "CategoryDisplayName", + "CategoryDescription": "CategoryDescription", + "CategoryMediaResources": "CategoryMediaResources", + "CreateCategory": "CreateCategory", + "EditCategory": "EditCategory", + "CategoryDeletionConfirmationMessage": "Are you sure to delete the category {0}?", + "Menu:ProductType": "MenuProductType", + "ProductType": "ProductType", + "ProductTypeName": "ProductTypeName", + "ProductTypeDisplayName": "ProductTypeDisplayName", + "ProductTypeDescription": "ProductTypeDescription", + "ProductTypeMultiTenancySide": "ProductTypeMultiTenancySide", + "CreateProductType": "CreateProductType", + "EditProductType": "EditProductType", + "ProductTypeDeletionConfirmationMessage": "Are you sure to delete the producttype {0}?", + "Menu:ProductCategory": "MenuProductCategory", + "ProductCategory": "ProductCategory", + "ProductCategoryTenantId": "ProductCategoryTenantId", + "ProductCategoryStoreId": "ProductCategoryStoreId", + "ProductCategoryCategoryId": "ProductCategoryCategoryId", + "ProductCategoryProductId": "ProductCategoryProductId", + "ProductCategoryDisplayOrder": "ProductCategoryDisplayOrder", + "CreateProductCategory": "CreateProductCategory", + "EditProductCategory": "EditProductCategory", + "ProductCategoryDeletionConfirmationMessage": "Are you sure to delete the productcategory {0}?" + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/ProductsResource.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/ProductsResource.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/ProductsResource.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Localization/ProductsResource.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Products/InventoryStrategy.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/InventoryStrategy.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Products/InventoryStrategy.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/InventoryStrategy.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Products/ProductInventoryReductionFailedEto.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductInventoryReductionFailedEto.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Products/ProductInventoryReductionFailedEto.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductInventoryReductionFailedEto.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/ProductsErrorCodes.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductsErrorCodes.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/ProductsErrorCodes.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/ProductsErrorCodes.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/cs.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/cs.json deleted file mode 100644 index 6a060a54..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/cs.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "cs", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/en.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/en.json deleted file mode 100644 index 171d9a12..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/en.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "en", - "texts": { - "ManageYourProfile": "Manage your profile" - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pl.json deleted file mode 100644 index 2ea227cb..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pl.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "pl", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pt-BR.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pt-BR.json deleted file mode 100644 index 6d746df0..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/pt-BR.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "pt-BR", - "texts": { - - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/sl.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/sl.json deleted file mode 100644 index 687d4257..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/sl.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "sl", - "texts": { - "ManageYourProfile": "Upravljajte svojim profilom" - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/tr.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/tr.json deleted file mode 100644 index 2b481933..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/tr.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "tr", - "texts": { - "ManageYourProfile": "Profil ynetimi" - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/vi.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/vi.json deleted file mode 100644 index d8eb5f3c..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/vi.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "vi", - "texts": { - - } -} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hans.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hans.json deleted file mode 100644 index 99586f01..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hans.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "zh-Hans", - "texts": { - "ManageYourProfile": "管理个人资料" - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hant.json b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hant.json deleted file mode 100644 index ceea0555..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Localization/Products/zh-Hant.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "culture": "zh-Hant", - "texts": { - "ManageYourProfile": "管理個人資料" - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj index 8a3b578d..23b9de85 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj @@ -4,7 +4,7 @@ netstandard2.0 - EasyAbp.EShop.Products + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Categories/Category.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/Category.cs similarity index 55% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Categories/Category.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/Category.cs index 6d1638dc..1e302a06 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Categories/Category.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/Category.cs @@ -1,4 +1,4 @@ -using System; +using System; using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -19,5 +19,25 @@ namespace EasyAbp.EShop.Products.Categories [CanBeNull] public virtual string MediaResources { get; protected set; } + + protected Category() + { + } + + public Category( + Guid id, + Guid? tenantId, + Guid? parentCategoryId, + string displayName, + string description, + string mediaResources + ) :base(id) + { + TenantId = tenantId; + ParentCategoryId = parentCategoryId; + DisplayName = displayName; + Description = description; + MediaResources = mediaResources; + } } -} \ No newline at end of file +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/ICategoryRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/ICategoryRepository.cs new file mode 100644 index 00000000..6dcd5401 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Categories/ICategoryRepository.cs @@ -0,0 +1,9 @@ +using System; +using Volo.Abp.Domain.Repositories; + +namespace EasyAbp.EShop.Products.Categories +{ + public interface ICategoryRepository : IRepository + { + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EShopProductsDomainModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/EShopProductsDomainModule.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EShopProductsDomainModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/EShopProductsDomainModule.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/IProductCategoryRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/IProductCategoryRepository.cs new file mode 100644 index 00000000..e2b51161 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/IProductCategoryRepository.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace EasyAbp.EShop.Products.ProductCategories +{ + public interface IProductCategoryRepository : IRepository + { + Task> GetListByCategoryId(Guid categoryId, Guid? storeId, CancellationToken cancellationToken = default); + + Task> GetListByProductId(Guid productId, Guid? storeId, CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductCategories/ProductCategory.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/ProductCategory.cs similarity index 55% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductCategories/ProductCategory.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/ProductCategory.cs index 40495aaa..1ec7eaf1 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductCategories/ProductCategory.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductCategories/ProductCategory.cs @@ -1,4 +1,4 @@ -using System; +using System; using EasyAbp.EShop.Stores.Stores; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -16,5 +16,25 @@ namespace EasyAbp.EShop.Products.ProductCategories public virtual Guid ProductId { get; protected set; } public virtual int DisplayOrder { get; protected set; } + + protected ProductCategory() + { + } + + public ProductCategory( + Guid id, + Guid? tenantId, + Guid? storeId, + Guid categoryId, + Guid productId, + int displayOrder + ) :base(id) + { + TenantId = tenantId; + StoreId = storeId; + CategoryId = categoryId; + ProductId = productId; + DisplayOrder = displayOrder; + } } -} \ No newline at end of file +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTypes/IProductTypeRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTypes/IProductTypeRepository.cs new file mode 100644 index 00000000..1c4c0d6e --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTypes/IProductTypeRepository.cs @@ -0,0 +1,9 @@ +using System; +using Volo.Abp.Domain.Repositories; + +namespace EasyAbp.EShop.Products.ProductTypes +{ + public interface IProductTypeRepository : IRepository + { + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductTypes/ProductType.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTypes/ProductType.cs similarity index 55% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductTypes/ProductType.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTypes/ProductType.cs index f905eb7c..52cd8b80 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductTypes/ProductType.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductTypes/ProductType.cs @@ -1,4 +1,4 @@ -using System; +using System; using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; @@ -16,5 +16,23 @@ namespace EasyAbp.EShop.Products.ProductTypes public virtual string Description { get; protected set; } public virtual MultiTenancySides MultiTenancySide { get; protected set; } + + protected ProductType() + { + } + + public ProductType( + Guid id, + string name, + string displayName, + string description, + MultiTenancySides multiTenancySide + ) :base(id) + { + Name = name; + DisplayName = displayName; + Description = description; + MultiTenancySide = multiTenancySide; + } } -} \ No newline at end of file +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/IProductInventoryManager.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductInventoryManager.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/IProductInventoryManager.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductInventoryManager.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/IProductPriceProvider.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductPriceProvider.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/IProductPriceProvider.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductPriceProvider.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs new file mode 100644 index 00000000..5e1d6ded --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/IProductRepository.cs @@ -0,0 +1,9 @@ +using System; +using Volo.Abp.Domain.Repositories; + +namespace EasyAbp.EShop.Products.Products +{ + public interface IProductRepository : IRepository + { + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs new file mode 100644 index 00000000..72d893b1 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/Product.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using EasyAbp.EShop.Stores.Stores; +using JetBrains.Annotations; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace EasyAbp.EShop.Products.Products +{ + public class Product : FullAuditedAggregateRoot, IMultiTenant, IMultiStore + { + public virtual Guid? TenantId { get; protected set; } + + public virtual Guid? StoreId { get; protected set; } + + public virtual Guid ProductTypeId { get; protected set; } + + [NotNull] + public virtual string DisplayName { get; protected set; } + + public virtual InventoryStrategy InventoryStrategy { get; protected set; } + + [CanBeNull] + public virtual string MediaResources { get; protected set; } + + public virtual bool IsPublished { get; protected set; } + + public virtual ProductDetail ProductDetail { get; protected set; } + + public virtual IEnumerable ProductAttributes { get; protected set; } + + public virtual IEnumerable ProductSkus { get; protected set; } + + protected Product() + { + } + + public Product( + Guid id, + Guid? tenantId, + Guid? storeId, + Guid productTypeId, + string displayName, + InventoryStrategy inventoryStrategy, + bool isPublished, + string mediaResources + ) :base(id) + { + TenantId = tenantId; + StoreId = storeId; + ProductTypeId = productTypeId; + DisplayName = displayName; + InventoryStrategy = inventoryStrategy; + IsPublished = isPublished; + MediaResources = mediaResources; + } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductAttribute.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs similarity index 71% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductAttribute.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs index 140177b4..5a4d0c32 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductAttribute.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttribute.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using JetBrains.Annotations; using Volo.Abp.Domain.Entities.Auditing; @@ -11,5 +12,7 @@ namespace EasyAbp.EShop.Products.Products [CanBeNull] public virtual string Description { get; protected set; } + + public virtual IEnumerable ProductAttributeOptions { get; protected set; } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductAttributeOption.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductAttributeOption.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductAttributeOption.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductDetail.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductDetail.cs similarity index 64% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductDetail.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductDetail.cs index 132cc6b6..7584ba56 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductDetail.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductDetail.cs @@ -10,6 +10,16 @@ namespace EasyAbp.EShop.Products.Products [CanBeNull] public virtual string Description { get; protected set; } + + protected ProductDetail() {} + + public ProductDetail( + Guid productId, + [CanBeNull] string description) + { + ProductId = productId; + Description = description; + } public override object[] GetKeys() { diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductSku.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs similarity index 89% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductSku.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs index 6b6815e1..420a2571 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/ProductSku.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs @@ -13,6 +13,8 @@ namespace EasyAbp.EShop.Products.Products public virtual int Inventory { get; protected set; } + public virtual int Sold { get; protected set; } + public virtual int OrderMinQuantity { get; protected set; } } } \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductsDbProperties.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductsDbProperties.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/ProductsDbProperties.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductsDbProperties.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Settings/ProductsSettingDefinitionProvider.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Settings/ProductsSettingDefinitionProvider.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Settings/ProductsSettingDefinitionProvider.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Settings/ProductsSettingDefinitionProvider.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Settings/ProductsSettings.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Settings/ProductsSettings.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Settings/ProductsSettings.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Settings/ProductsSettings.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/Product.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/Product.cs deleted file mode 100644 index 72699549..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/Products/Product.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using EasyAbp.EShop.Stores.Stores; -using JetBrains.Annotations; -using Volo.Abp.Domain.Entities.Auditing; -using Volo.Abp.MultiTenancy; - -namespace EasyAbp.EShop.Products.Products -{ - public class Product : FullAuditedAggregateRoot, IMultiTenant, IMultiStore - { - public virtual Guid? TenantId { get; protected set; } - - public virtual Guid? StoreId { get; protected set; } - - public virtual Guid ProductTypeId { get; protected set; } - - [NotNull] - public virtual string DisplayName { get; protected set; } - - public virtual InventoryStrategy InventoryStrategy { get; protected set; } - - public virtual bool IsPublished { get; protected set; } - - [CanBeNull] - public virtual string MediaResources { get; protected set; } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj index 4a485122..88ea939a 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ netstandard2.0 - EasyAbp.EShop.Products + @@ -12,4 +12,8 @@ + + + + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Categories/CategoryRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Categories/CategoryRepository.cs new file mode 100644 index 00000000..c621b946 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Categories/CategoryRepository.cs @@ -0,0 +1,14 @@ +using System; +using EasyAbp.EShop.Products.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Products.Categories +{ + public class CategoryRepository : EfCoreRepository, ICategoryRepository + { + public CategoryRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs similarity index 56% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs index d0a3de33..072632db 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/EShopProductsEntityFrameworkCoreModule.cs @@ -1,4 +1,8 @@ -using Microsoft.Extensions.DependencyInjection; +using EasyAbp.EShop.Products.ProductCategories; +using EasyAbp.EShop.Products.ProductTypes; +using EasyAbp.EShop.Products.Categories; +using EasyAbp.EShop.Products.Products; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Modularity; @@ -17,7 +21,11 @@ namespace EasyAbp.EShop.Products.EntityFrameworkCore /* Add custom repositories here. Example: * options.AddRepository(); */ + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); }); } } -} \ No newline at end of file +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs new file mode 100644 index 00000000..3af8763a --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/IProductsDbContext.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using EasyAbp.EShop.Products.Products; +using EasyAbp.EShop.Products.Categories; +using EasyAbp.EShop.Products.ProductTypes; +using EasyAbp.EShop.Products.ProductCategories; + +namespace EasyAbp.EShop.Products.EntityFrameworkCore +{ + [ConnectionStringName(ProductsDbProperties.ConnectionStringName)] + public interface IProductsDbContext : IEfCoreDbContext + { + /* Add DbSet for each Aggregate Root here. Example: + * DbSet Questions { get; } + */ + DbSet Products { get; set; } + DbSet ProductDetails { get; set; } + DbSet ProductAttributes { get; set; } + DbSet ProductAttributeOptions { get; set; } + DbSet ProductSkus { get; set; } + DbSet Categories { get; set; } + DbSet ProductTypes { get; set; } + DbSet ProductCategories { get; set; } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs new file mode 100644 index 00000000..4b32e8e1 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContext.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using EasyAbp.EShop.Products.Products; +using EasyAbp.EShop.Products.Categories; +using EasyAbp.EShop.Products.ProductTypes; +using EasyAbp.EShop.Products.ProductCategories; + +namespace EasyAbp.EShop.Products.EntityFrameworkCore +{ + [ConnectionStringName(ProductsDbProperties.ConnectionStringName)] + public class ProductsDbContext : AbpDbContext, IProductsDbContext + { + /* Add DbSet for each Aggregate Root here. Example: + * public DbSet Questions { get; set; } + */ + public DbSet Products { get; set; } + public DbSet ProductDetails { get; set; } + public DbSet ProductAttributes { get; set; } + public DbSet ProductAttributeOptions { get; set; } + public DbSet ProductSkus { get; set; } + public DbSet Categories { get; set; } + public DbSet ProductTypes { get; set; } + public DbSet ProductCategories { get; set; } + + public ProductsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigureProducts(); + } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs new file mode 100644 index 00000000..30641991 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs @@ -0,0 +1,105 @@ +using EasyAbp.EShop.Products.ProductCategories; +using EasyAbp.EShop.Products.ProductTypes; +using EasyAbp.EShop.Products.Categories; +using EasyAbp.EShop.Products.Products; +using System; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.EntityFrameworkCore.Modeling; + +namespace EasyAbp.EShop.Products.EntityFrameworkCore +{ + public static class ProductsDbContextModelCreatingExtensions + { + public static void ConfigureProducts( + this ModelBuilder builder, + Action optionsAction = null) + { + Check.NotNull(builder, nameof(builder)); + + var options = new ProductsModelBuilderConfigurationOptions( + ProductsDbProperties.DbTablePrefix, + ProductsDbProperties.DbSchema + ); + + optionsAction?.Invoke(options); + + /* Configure all entities here. Example: + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + "Questions", options.Schema); + + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); + + //Relations + b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); + + //Indexes + b.HasIndex(q => q.CreationTime); + }); + */ + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Products", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ProductDetails", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + b.HasKey(x => new { x.ProductId }); + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ProductAttributes", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ProductAttributeOptions", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ProductSkus", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Categories", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ProductTypes", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "ProductCategories", options.Schema); + b.ConfigureByConvention(); + /* Configure more properties here */ + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsModelBuilderConfigurationOptions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsModelBuilderConfigurationOptions.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsModelBuilderConfigurationOptions.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/EntityFrameworkCore/ProductsModelBuilderConfigurationOptions.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductCategories/ProductCategoryRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductCategories/ProductCategoryRepository.cs new file mode 100644 index 00000000..a76d1c00 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductCategories/ProductCategoryRepository.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using EasyAbp.EShop.Products.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Products.ProductCategories +{ + public class ProductCategoryRepository : EfCoreRepository, IProductCategoryRepository + { + public ProductCategoryRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public async Task> GetListByCategoryId(Guid categoryId, Guid? storeId, + CancellationToken cancellationToken = default) + { + return await GetQueryable().Where(pc => pc.CategoryId == categoryId && pc.StoreId == storeId) + .ToListAsync(cancellationToken); + } + + public async Task> GetListByProductId(Guid productId, Guid? storeId, + CancellationToken cancellationToken = default) + { + return await GetQueryable().Where(pc => pc.ProductId == productId && pc.StoreId == storeId) + .ToListAsync(cancellationToken); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductTypes/ProductTypeRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductTypes/ProductTypeRepository.cs new file mode 100644 index 00000000..395c4343 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/ProductTypes/ProductTypeRepository.cs @@ -0,0 +1,14 @@ +using System; +using EasyAbp.EShop.Products.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Products.ProductTypes +{ + public class ProductTypeRepository : EfCoreRepository, IProductTypeRepository + { + public ProductTypeRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs new file mode 100644 index 00000000..81ec35bd --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp/EShop/Products/Products/ProductRepository.cs @@ -0,0 +1,14 @@ +using System; +using EasyAbp.EShop.Products.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +namespace EasyAbp.EShop.Products.Products +{ + public class ProductRepository : EfCoreRepository, IProductRepository + { + public ProductRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/IProductsDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/IProductsDbContext.cs deleted file mode 100644 index 616a8566..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/IProductsDbContext.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace EasyAbp.EShop.Products.EntityFrameworkCore -{ - [ConnectionStringName(ProductsDbProperties.ConnectionStringName)] - public interface IProductsDbContext : IEfCoreDbContext - { - /* Add DbSet for each Aggregate Root here. Example: - * DbSet Questions { get; } - */ - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContext.cs deleted file mode 100644 index 7700a00e..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContext.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Volo.Abp.Data; -using Volo.Abp.EntityFrameworkCore; - -namespace EasyAbp.EShop.Products.EntityFrameworkCore -{ - [ConnectionStringName(ProductsDbProperties.ConnectionStringName)] - public class ProductsDbContext : AbpDbContext, IProductsDbContext - { - /* Add DbSet for each Aggregate Root here. Example: - * public DbSet Questions { get; set; } - */ - - public ProductsDbContext(DbContextOptions options) - : base(options) - { - - } - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - builder.ConfigureProducts(); - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs deleted file mode 100644 index cf5b5328..00000000 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EntityFrameworkCore/ProductsDbContextModelCreatingExtensions.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Volo.Abp; - -namespace EasyAbp.EShop.Products.EntityFrameworkCore -{ - public static class ProductsDbContextModelCreatingExtensions - { - public static void ConfigureProducts( - this ModelBuilder builder, - Action optionsAction = null) - { - Check.NotNull(builder, nameof(builder)); - - var options = new ProductsModelBuilderConfigurationOptions( - ProductsDbProperties.DbTablePrefix, - ProductsDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - - /* Configure all entities here. Example: - - builder.Entity(b => - { - //Configure table & schema name - b.ToTable(options.TablePrefix + "Questions", options.Schema); - - b.ConfigureByConvention(); - - //Properties - b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); - - //Relations - b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); - - //Indexes - b.HasIndex(q => q.CreationTime); - }); - */ - } - } -} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj index 27e803bb..63788852 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp.EShop.Products.HttpApi.Client.csproj @@ -4,7 +4,7 @@ netcoreapp3.1 - EasyAbp.EShop.Products + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EShopProductsHttpApiClientModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp/EShop/Products/EShopProductsHttpApiClientModule.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EShopProductsHttpApiClientModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi.Client/EasyAbp/EShop/Products/EShopProductsHttpApiClientModule.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj index 05bc3104..f03b903b 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj @@ -4,7 +4,7 @@ netcoreapp3.1 - EasyAbp.EShop.Products + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EShopProductsHttpApiModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/EShopProductsHttpApiModule.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EShopProductsHttpApiModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/EShopProductsHttpApiModule.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/ProductsController.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductsController.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/ProductsController.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp/EShop/Products/ProductsController.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj index bbc00b85..601cd420 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp.EShop.Products.MongoDB.csproj @@ -4,7 +4,7 @@ netcoreapp3.1 - EasyAbp.EShop.Products + @@ -12,4 +12,8 @@ + + + + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/EShopProductsMongoDbModule.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/EShopProductsMongoDbModule.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/EShopProductsMongoDbModule.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/EShopProductsMongoDbModule.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/IProductsMongoDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/IProductsMongoDbContext.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/IProductsMongoDbContext.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/IProductsMongoDbContext.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/ProductsMongoDbContext.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/ProductsMongoDbContext.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/ProductsMongoDbContext.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/ProductsMongoDbContext.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/ProductsMongoDbContextExtensions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/ProductsMongoDbContextExtensions.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/ProductsMongoDbContextExtensions.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/ProductsMongoDbContextExtensions.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/ProductsMongoModelBuilderConfigurationOptions.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/ProductsMongoModelBuilderConfigurationOptions.cs similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/MongoDB/ProductsMongoModelBuilderConfigurationOptions.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.MongoDB/EasyAbp/EShop/Products/MongoDB/ProductsMongoModelBuilderConfigurationOptions.cs diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj index 32bfdc92..806ae653 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj @@ -36,7 +36,20 @@ + + + <_ContentIncludedByDefault Remove="Pages\Products\Products\Product\CreateModal.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Products\Products\Product\EditModal.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Products\Products\Product\Index.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\EShop\ProductTypes\ProductType\CreateModal.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\EShop\ProductTypes\ProductType\EditModal.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\EShop\ProductTypes\ProductType\Index.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Categories\Category\CreateModal.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Categories\Category\EditModal.cshtml" /> + <_ContentIncludedByDefault Remove="Pages\Categories\Category\Index.cshtml" /> + + diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml new file mode 100644 index 00000000..9f088ae1 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml @@ -0,0 +1,16 @@ +@page +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.Categories.Category.CreateModalModel +@{ + Layout = null; +} + + + + + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml.cs new file mode 100644 index 00000000..360b47f5 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/CreateModal.cshtml.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using EasyAbp.EShop.Products.Categories; +using EasyAbp.EShop.Products.Categories.Dtos; +using Microsoft.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Categories.Category +{ + public class CreateModalModel : ProductsPageModel + { + [BindProperty] + public CreateUpdateCategoryDto Category { get; set; } + + private readonly ICategoryAppService _service; + + public CreateModalModel(ICategoryAppService service) + { + _service = service; + } + + public async Task OnPostAsync() + { + await _service.CreateAsync(Category); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml new file mode 100644 index 00000000..98c0340e --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml @@ -0,0 +1,17 @@ +@page +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.Categories.Category.EditModalModel +@{ + Layout = null; +} + + + + + + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml.cs new file mode 100644 index 00000000..c0671061 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/EditModal.cshtml.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Products.Categories; +using EasyAbp.EShop.Products.Categories.Dtos; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Categories.Category +{ + public class EditModalModel : ProductsPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid Id { get; set; } + + [BindProperty] + public CreateUpdateCategoryDto Category { get; set; } + + private readonly ICategoryAppService _service; + + public EditModalModel(ICategoryAppService service) + { + _service = service; + } + + public async Task OnGetAsync() + { + var dto = await _service.GetAsync(Id); + Category = ObjectMapper.Map(dto); + } + + public async Task OnPostAsync() + { + await _service.UpdateAsync(Id, Category); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml new file mode 100644 index 00000000..514182b2 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml @@ -0,0 +1,49 @@ +@page +@using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Categories.Category +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@model IndexModel +@inject IPageLayout PageLayout +@{ + PageLayout.Content.Title = L["Category"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:Category"].Value); + PageLayout.Content.MenuItemName = "Category"; +} + +@section scripts +{ + +} +@section styles +{ + +} + + + + + + @L["Category"] + + + + + + + + + + + @L["Actions"] + @L["CategoryParentCategoryId"] + @L["CategoryDisplayName"] + @L["CategoryDescription"] + @L["CategoryMediaResources"] + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml.cs new file mode 100644 index 00000000..2c69b11e --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/Index.cshtml.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Categories.Category +{ + public class IndexModel : ProductsPageModel + { + public async Task OnGetAsync() + { + await Task.CompletedTask; + } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/index.css b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/index.css new file mode 100644 index 00000000..e69de29b diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/index.js b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/index.js new file mode 100644 index 00000000..f033a304 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Categories/Category/index.js @@ -0,0 +1,70 @@ +$(function () { + + var l = abp.localization.getResource('Products'); + + var service = easyAbp.eShop.products.categories.category; + var createModal = new abp.ModalManager(abp.appPath + 'EShop/Products/Categories/Category/CreateModal'); + var editModal = new abp.ModalManager(abp.appPath + 'EShop/Products/Categories/Category/EditModal'); + + var dataTable = $('#CategoryTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, + order: [[1, "asc"]], + ajax: abp.libs.datatables.createAjax(service.getList), + columnDefs: [ + { + rowAction: { + items: + [ + { + text: l('Product'), + action: function (data) { + document.location.href = document.location.origin + '/EShop/Products/Products/Product?CategoryId=' + data.record.id; + } + }, + { + text: l('Edit'), + action: function (data) { + editModal.open({ id: data.record.id }); + } + }, + { + text: l('Delete'), + confirmMessage: function (data) { + return l('CategoryDeletionConfirmationMessage', data.record.id); + }, + action: function (data) { + service.delete(data.record.id) + .then(function () { + abp.notify.info(l('SuccessfullyDeleted')); + dataTable.ajax.reload(); + }); + } + } + ] + } + }, + { data: "parentCategoryId" }, + { data: "displayName" }, + { data: "description" }, + { data: "mediaResources" }, + ] + })); + + createModal.onResult(function () { + dataTable.ajax.reload(); + }); + + editModal.onResult(function () { + dataTable.ajax.reload(); + }); + + $('#NewCategoryButton').click(function (e) { + e.preventDefault(); + createModal.open(); + }); +}); \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/Products/Index.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Index.cshtml similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/Products/Index.cshtml rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Index.cshtml diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/Products/Index.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Index.cshtml.cs similarity index 65% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/Products/Index.cshtml.cs rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Index.cshtml.cs index b9aa30a9..fdc82d5c 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/Products/Index.cshtml.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Index.cshtml.cs @@ -1,4 +1,4 @@ -namespace EasyAbp.EShop.Products.Web.Pages.Products +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products { public class IndexModel : ProductsPageModel { diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml new file mode 100644 index 00000000..0bdbef32 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml @@ -0,0 +1,16 @@ +@page +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.ProductTypes.ProductType.CreateModalModel +@{ + Layout = null; +} + + + + + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml.cs new file mode 100644 index 00000000..dc63a331 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/CreateModal.cshtml.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using EasyAbp.EShop.Products.ProductTypes; +using EasyAbp.EShop.Products.ProductTypes.Dtos; +using Microsoft.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.ProductTypes.ProductType +{ + public class CreateModalModel : ProductsPageModel + { + [BindProperty] + public CreateUpdateProductTypeDto ProductType { get; set; } + + private readonly IProductTypeAppService _service; + + public CreateModalModel(IProductTypeAppService service) + { + _service = service; + } + + public async Task OnPostAsync() + { + await _service.CreateAsync(ProductType); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml new file mode 100644 index 00000000..db87fb40 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml @@ -0,0 +1,17 @@ +@page +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.ProductTypes.ProductType.EditModalModel +@{ + Layout = null; +} + + + + + + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml.cs new file mode 100644 index 00000000..0b905543 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/EditModal.cshtml.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Products.ProductTypes; +using EasyAbp.EShop.Products.ProductTypes.Dtos; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.ProductTypes.ProductType +{ + public class EditModalModel : ProductsPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid Id { get; set; } + + [BindProperty] + public CreateUpdateProductTypeDto ProductType { get; set; } + + private readonly IProductTypeAppService _service; + + public EditModalModel(IProductTypeAppService service) + { + _service = service; + } + + public async Task OnGetAsync() + { + var dto = await _service.GetAsync(Id); + ProductType = ObjectMapper.Map(dto); + } + + public async Task OnPostAsync() + { + await _service.UpdateAsync(Id, ProductType); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml new file mode 100644 index 00000000..dae018ba --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml @@ -0,0 +1,49 @@ +@page +@using EasyAbp.EShop.Products.Web.Pages.EShop.Products.ProductTypes.ProductType +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@model IndexModel +@inject IPageLayout PageLayout +@{ + PageLayout.Content.Title = L["ProductType"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:ProductType"].Value); + PageLayout.Content.MenuItemName = "ProductType"; +} + +@section scripts +{ + +} +@section styles +{ + +} + + + + + + @L["ProductType"] + + + + + + + + + + + @L["Actions"] + @L["ProductTypeName"] + @L["ProductTypeDisplayName"] + @L["ProductTypeDescription"] + @L["ProductTypeMultiTenancySide"] + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml.cs new file mode 100644 index 00000000..02c8adb7 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/Index.cshtml.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.ProductTypes.ProductType +{ + public class IndexModel : ProductsPageModel + { + public async Task OnGetAsync() + { + await Task.CompletedTask; + } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/index.css b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/index.css new file mode 100644 index 00000000..e69de29b diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/index.js b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/index.js new file mode 100644 index 00000000..a3f15c7e --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/ProductTypes/ProductType/index.js @@ -0,0 +1,64 @@ +$(function () { + + var l = abp.localization.getResource('Products'); + + var service = easyAbp.eShop.products.productTypes.productType; + var createModal = new abp.ModalManager(abp.appPath + 'EShop/Products/ProductTypes/ProductType/CreateModal'); + var editModal = new abp.ModalManager(abp.appPath + 'EShop/Products/ProductTypes/ProductType/EditModal'); + + var dataTable = $('#ProductTypeTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, + order: [[1, "asc"]], + ajax: abp.libs.datatables.createAjax(service.getList), + columnDefs: [ + { + rowAction: { + items: + [ + { + text: l('Edit'), + action: function (data) { + editModal.open({ id: data.record.id }); + } + }, + { + text: l('Delete'), + confirmMessage: function (data) { + return l('ProductTypeDeletionConfirmationMessage', data.record.id); + }, + action: function (data) { + service.delete(data.record.id) + .then(function () { + abp.notify.info(l('SuccessfullyDeleted')); + dataTable.ajax.reload(); + }); + } + } + ] + } + }, + { data: "name" }, + { data: "displayName" }, + { data: "description" }, + { data: "multiTenancySide" }, + ] + })); + + createModal.onResult(function () { + dataTable.ajax.reload(); + }); + + editModal.onResult(function () { + dataTable.ajax.reload(); + }); + + $('#NewProductTypeButton').click(function (e) { + e.preventDefault(); + createModal.open(); + }); +}); \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml new file mode 100644 index 00000000..ebb253a1 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml @@ -0,0 +1,16 @@ +@page +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.CreateModalModel +@{ + Layout = null; +} + + + + + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs new file mode 100644 index 00000000..551365cc --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using EasyAbp.EShop.Products.Products; +using EasyAbp.EShop.Products.Products.Dtos; +using Microsoft.AspNetCore.Mvc; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product +{ + public class CreateModalModel : ProductsPageModel + { + [BindProperty] + public CreateUpdateProductDto Product { get; set; } + + private readonly IProductAppService _service; + + public CreateModalModel(IProductAppService service) + { + _service = service; + } + + public async Task OnPostAsync() + { + await _service.CreateAsync(Product); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml new file mode 100644 index 00000000..6207a5f0 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml @@ -0,0 +1,17 @@ +@page +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product.EditModalModel +@{ + Layout = null; +} + + + + + + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs new file mode 100644 index 00000000..d6e9d7d6 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using EasyAbp.EShop.Products.Products; +using EasyAbp.EShop.Products.Products.Dtos; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product +{ + public class EditModalModel : ProductsPageModel + { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public Guid Id { get; set; } + + [BindProperty] + public CreateUpdateProductDto Product { get; set; } + + private readonly IProductAppService _service; + + public EditModalModel(IProductAppService service) + { + _service = service; + } + + public async Task OnGetAsync() + { + var dto = await _service.GetAsync(Id); + Product = ObjectMapper.Map(dto); + } + + public async Task OnPostAsync() + { + await _service.UpdateAsync(Id, Product); + return NoContent(); + } + } +} \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml new file mode 100644 index 00000000..1bc54de6 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml @@ -0,0 +1,51 @@ +@page +@using EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product +@using Volo.Abp.AspNetCore.Mvc.UI.Layout +@inherits EasyAbp.EShop.Products.Web.Pages.ProductsPage +@model IndexModel +@inject IPageLayout PageLayout +@{ + PageLayout.Content.Title = L["Product"].Value; + PageLayout.Content.BreadCrumb.Add(L["Menu:Product"].Value); + PageLayout.Content.MenuItemName = "Product"; +} + +@section scripts +{ + +} +@section styles +{ + +} + + + + + + @L["Product"] + + + + + + + + + + + @L["Actions"] + @L["ProductStoreId"] + @L["ProductProductTypeId"] + @L["ProductDisplayName"] + @L["ProductInventoryStrategy"] + @L["ProductMediaResources"] + @L["ProductIsPublished"] + + + + + \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs new file mode 100644 index 00000000..e5a78b20 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/Index.cshtml.cs @@ -0,0 +1,12 @@ +using System.Threading.Tasks; + +namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product +{ + public class IndexModel : ProductsPageModel + { + public async Task OnGetAsync() + { + await Task.CompletedTask; + } + } +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.css b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.css new file mode 100644 index 00000000..e69de29b diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js new file mode 100644 index 00000000..d49ed118 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/index.js @@ -0,0 +1,66 @@ +$(function () { + + var l = abp.localization.getResource('Products'); + + var service = easyAbp.eShop.products.products.product; + var createModal = new abp.ModalManager(abp.appPath + 'EShop/Products/Products/Product/CreateModal'); + var editModal = new abp.ModalManager(abp.appPath + 'EShop/Products/Products/Product/EditModal'); + + var dataTable = $('#ProductTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, + order: [[1, "asc"]], + ajax: abp.libs.datatables.createAjax(service.getList), + columnDefs: [ + { + rowAction: { + items: + [ + { + text: l('Edit'), + action: function (data) { + editModal.open({ id: data.record.id }); + } + }, + { + text: l('Delete'), + confirmMessage: function (data) { + return l('ProductDeletionConfirmationMessage', data.record.id); + }, + action: function (data) { + service.delete(data.record.id) + .then(function () { + abp.notify.info(l('SuccessfullyDeleted')); + dataTable.ajax.reload(); + }); + } + } + ] + } + }, + { data: "storeId" }, + { data: "productTypeId" }, + { data: "displayName" }, + { data: "inventoryStrategy" }, + { data: "mediaResources" }, + { data: "isPublished" }, + ] + })); + + createModal.onResult(function () { + dataTable.ajax.reload(); + }); + + editModal.onResult(function () { + dataTable.ajax.reload(); + }); + + $('#NewProductButton').click(function (e) { + e.preventDefault(); + createModal.open(); + }); +}); \ No newline at end of file diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/Products/_ViewImports.cshtml b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/_ViewImports.cshtml similarity index 100% rename from modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/Products/_ViewImports.cshtml rename to modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/_ViewImports.cshtml diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsMenuContributor.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsMenuContributor.cs index 70b31725..964c11a4 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsMenuContributor.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsMenuContributor.cs @@ -1,4 +1,16 @@ -using System.Threading.Tasks; +using System.Collections.Generic; +using System.Threading.Tasks; +using EasyAbp.EShop.Products.Authorization; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; +using EasyAbp.EShop.Products.Localization; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; +using EasyAbp.EShop.Products.Localization; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; +using EasyAbp.EShop.Products.Localization; +using Microsoft.AspNetCore.Authorization; using Volo.Abp.UI.Navigation; namespace EasyAbp.EShop.Products.Web @@ -13,11 +25,42 @@ namespace EasyAbp.EShop.Products.Web } } - private Task ConfigureMainMenu(MenuConfigurationContext context) + private async Task ConfigureMainMenu(MenuConfigurationContext context) { - //Add main menu items. + var l = context.ServiceProvider.GetRequiredService>(); //Add main menu items. - return Task.CompletedTask; + var authorizationService = context.ServiceProvider.GetRequiredService(); + + var productManagementMenuItem = new ApplicationMenuItem("ProductManagement", l["Menu:ProductManagement"]); + + if (await authorizationService.IsGrantedAsync(ProductsPermissions.ProductTypes.Default)) + { + productManagementMenuItem.AddItem( + new ApplicationMenuItem("ProductType", l["Menu:ProductType"], "/EShop/Products/ProductTypes/ProductType") + ); + } + + if (await authorizationService.IsGrantedAsync(ProductsPermissions.Categories.Default)) + { + productManagementMenuItem.AddItem( + new ApplicationMenuItem("Category", l["Menu:Category"], "/EShop/Products/Categories/Category") + ); + } + + if (await authorizationService.IsGrantedAsync(ProductsPermissions.Products.Default)) + { + productManagementMenuItem.AddItem( + new ApplicationMenuItem("Product", l["Menu:Product"], "/EShop/Products/Products/Product") + ); + } + + if (!productManagementMenuItem.Items.IsNullOrEmpty()) + { + var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == "EasyAbpEShop", + () => new ApplicationMenuItem("EasyAbpEShop", l["Menu:EasyAbpEShop"])); + + eShopMenuItem.Items.Add(productManagementMenuItem); + } } } -} \ No newline at end of file +} diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs index 8ebd90dd..32e39752 100644 --- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs +++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/ProductsWebAutoMapperProfile.cs @@ -1,4 +1,8 @@ -using AutoMapper; +using EasyAbp.EShop.Products.Products.Dtos; +using EasyAbp.EShop.Products.Categories.Dtos; +using EasyAbp.EShop.Products.ProductTypes.Dtos; +using AutoMapper; +using Volo.Abp.AutoMapper; namespace EasyAbp.EShop.Products.Web { @@ -9,6 +13,10 @@ namespace EasyAbp.EShop.Products.Web /* 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(); } } -} \ No newline at end of file +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Categories/CategoryAppServiceTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Categories/CategoryAppServiceTests.cs new file mode 100644 index 00000000..f1e844fa --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Categories/CategoryAppServiceTests.cs @@ -0,0 +1,26 @@ +using Shouldly; +using System.Threading.Tasks; +using Xunit; + +namespace EasyAbp.EShop.Products.Categories +{ + public class CategoryAppServiceTests : ProductsApplicationTestBase + { + private readonly ICategoryAppService _categoryAppService; + + public CategoryAppServiceTests() + { + _categoryAppService = GetRequiredService(); + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Act + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductCategories/ProductCategoryAppServiceTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductCategories/ProductCategoryAppServiceTests.cs new file mode 100644 index 00000000..de01143e --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductCategories/ProductCategoryAppServiceTests.cs @@ -0,0 +1,26 @@ +using Shouldly; +using System.Threading.Tasks; +using Xunit; + +namespace EasyAbp.EShop.Products.ProductCategories +{ + public class ProductCategoryAppServiceTests : ProductsApplicationTestBase + { + private readonly IProductCategoryAppService _productCategoryAppService; + + public ProductCategoryAppServiceTests() + { + _productCategoryAppService = GetRequiredService(); + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Act + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductTypes/ProductTypeAppServiceTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductTypes/ProductTypeAppServiceTests.cs new file mode 100644 index 00000000..f04cf542 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/ProductTypes/ProductTypeAppServiceTests.cs @@ -0,0 +1,26 @@ +using Shouldly; +using System.Threading.Tasks; +using Xunit; + +namespace EasyAbp.EShop.Products.ProductTypes +{ + public class ProductTypeAppServiceTests : ProductsApplicationTestBase + { + private readonly IProductTypeAppService _productTypeAppService; + + public ProductTypeAppServiceTests() + { + _productTypeAppService = GetRequiredService(); + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Act + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Products/ProductAppServiceTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Products/ProductAppServiceTests.cs new file mode 100644 index 00000000..034e71e2 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Application.Tests/Products/ProductAppServiceTests.cs @@ -0,0 +1,26 @@ +using Shouldly; +using System.Threading.Tasks; +using Xunit; + +namespace EasyAbp.EShop.Products.Products +{ + public class ProductAppServiceTests : ProductsApplicationTestBase + { + private readonly IProductAppService _productAppService; + + public ProductAppServiceTests() + { + _productAppService = GetRequiredService(); + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Act + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Categories/CategoryDomainTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Categories/CategoryDomainTests.cs new file mode 100644 index 00000000..aea20541 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Categories/CategoryDomainTests.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace EasyAbp.EShop.Products.Categories +{ + public class CategoryDomainTests : ProductsDomainTestBase + { + public CategoryDomainTests() + { + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Assert + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductCategories/ProductCategoryDomainTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductCategories/ProductCategoryDomainTests.cs new file mode 100644 index 00000000..4e21cdd1 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductCategories/ProductCategoryDomainTests.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace EasyAbp.EShop.Products.ProductCategories +{ + public class ProductCategoryDomainTests : ProductsDomainTestBase + { + public ProductCategoryDomainTests() + { + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Assert + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductTypes/ProductTypeDomainTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductTypes/ProductTypeDomainTests.cs new file mode 100644 index 00000000..e5e58fc4 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/ProductTypes/ProductTypeDomainTests.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace EasyAbp.EShop.Products.ProductTypes +{ + public class ProductTypeDomainTests : ProductsDomainTestBase + { + public ProductTypeDomainTests() + { + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Assert + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Products/ProductDomainTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Products/ProductDomainTests.cs new file mode 100644 index 00000000..dc7445c4 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.Domain.Tests/Products/ProductDomainTests.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace EasyAbp.EShop.Products.Products +{ + public class ProductDomainTests : ProductsDomainTestBase + { + public ProductDomainTests() + { + } + + [Fact] + public async Task Test1() + { + // Arrange + + // Assert + + // Assert + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Categories/CategoryRepositoryTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Categories/CategoryRepositoryTests.cs new file mode 100644 index 00000000..60f7548b --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Categories/CategoryRepositoryTests.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Products.Categories; +using Volo.Abp.Domain.Repositories; +using Xunit; + +namespace EasyAbp.EShop.Products.EntityFrameworkCore.Categories +{ + public class CategoryRepositoryTests : ProductsEntityFrameworkCoreTestBase + { + private readonly IRepository _categoryRepository; + + public CategoryRepositoryTests() + { + _categoryRepository = GetRequiredService>(); + } + + [Fact] + public async Task Test1() + { + await WithUnitOfWorkAsync(async () => + { + // Arrange + + // Act + + //Assert + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductCategories/ProductCategoryRepositoryTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductCategories/ProductCategoryRepositoryTests.cs new file mode 100644 index 00000000..481d1bbf --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductCategories/ProductCategoryRepositoryTests.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Products.ProductCategories; +using Volo.Abp.Domain.Repositories; +using Xunit; + +namespace EasyAbp.EShop.Products.EntityFrameworkCore.ProductCategories +{ + public class ProductCategoryRepositoryTests : ProductsEntityFrameworkCoreTestBase + { + private readonly IRepository _productCategoryRepository; + + public ProductCategoryRepositoryTests() + { + _productCategoryRepository = GetRequiredService>(); + } + + [Fact] + public async Task Test1() + { + await WithUnitOfWorkAsync(async () => + { + // Arrange + + // Act + + //Assert + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductTypes/ProductTypeRepositoryTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductTypes/ProductTypeRepositoryTests.cs new file mode 100644 index 00000000..ff418b6e --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/ProductTypes/ProductTypeRepositoryTests.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Products.ProductTypes; +using Volo.Abp.Domain.Repositories; +using Xunit; + +namespace EasyAbp.EShop.Products.EntityFrameworkCore.ProductTypes +{ + public class ProductTypeRepositoryTests : ProductsEntityFrameworkCoreTestBase + { + private readonly IRepository _productTypeRepository; + + public ProductTypeRepositoryTests() + { + _productTypeRepository = GetRequiredService>(); + } + + [Fact] + public async Task Test1() + { + await WithUnitOfWorkAsync(async () => + { + // Arrange + + // Act + + //Assert + }); + } + } +} diff --git a/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Products/ProductRepositoryTests.cs b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Products/ProductRepositoryTests.cs new file mode 100644 index 00000000..ad258a11 --- /dev/null +++ b/modules/EasyAbp.EShop.Products/test/EasyAbp.EShop.Products.EntityFrameworkCore.Tests/EntityFrameworkCore/Products/ProductRepositoryTests.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using EasyAbp.EShop.Products.Products; +using Volo.Abp.Domain.Repositories; +using Xunit; + +namespace EasyAbp.EShop.Products.EntityFrameworkCore.Products +{ + public class ProductRepositoryTests : ProductsEntityFrameworkCoreTestBase + { + private readonly IRepository _productRepository; + + public ProductRepositoryTests() + { + _productRepository = GetRequiredService>(); + } + + [Fact] + public async Task Test1() + { + await WithUnitOfWorkAsync(async () => + { + // Arrange + + // Act + + //Assert + }); + } + } +} diff --git a/samples/EasyMall/aspnet-core/EasyMall.sln.DotSettings b/samples/EasyMall/aspnet-core/EasyMall.sln.DotSettings index cb0b2c91..b623a36a 100644 --- a/samples/EasyMall/aspnet-core/EasyMall.sln.DotSettings +++ b/samples/EasyMall/aspnet-core/EasyMall.sln.DotSettings @@ -20,4 +20,5 @@ False False SQL + True \ No newline at end of file diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj index 6a5813a0..06b58e39 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMall.Application.Contracts.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs index 864f008a..db12013f 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application.Contracts/EasyMallApplicationContractsModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop.Baskets; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payment; +using EasyAbp.EShop.Payment.WeChatPay; using EasyAbp.EShop.Products; using EasyAbp.EShop.Stores; using Volo.Abp.Account; @@ -24,6 +25,7 @@ namespace EasyMall typeof(EShopBasketsApplicationContractsModule), typeof(EShopOrdersApplicationContractsModule), typeof(EShopPaymentApplicationContractsModule), + typeof(EShopPaymentWeChatPayApplicationContractsModule), typeof(EShopProductsApplicationContractsModule), typeof(EShopStoresApplicationContractsModule) )] diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj index 7c0ccfe9..070946d3 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMall.Application.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs index 27f3cd7a..00763118 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Application/EasyMallApplicationModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop.Baskets; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payment; +using EasyAbp.EShop.Payment.WeChatPay; using EasyAbp.EShop.Products; using EasyAbp.EShop.Stores; using Volo.Abp.Account; @@ -24,6 +25,7 @@ namespace EasyMall typeof(EShopBasketsApplicationModule), typeof(EShopOrdersApplicationModule), typeof(EShopPaymentApplicationModule), + typeof(EShopPaymentWeChatPayApplicationModule), typeof(EShopProductsApplicationModule), typeof(EShopStoresApplicationModule) )] diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj index d1137c93..51e499de 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMall.Domain.Shared.csproj @@ -26,6 +26,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs index 67f8d5ff..c27696f2 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain.Shared/EasyMallDomainSharedModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop.Baskets; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payment; +using EasyAbp.EShop.Payment.WeChatPay; using EasyAbp.EShop.Products; using EasyAbp.EShop.Stores; using EasyMall.Localization; @@ -31,6 +32,7 @@ namespace EasyMall typeof(EShopBasketsDomainSharedModule), typeof(EShopOrdersDomainSharedModule), typeof(EShopPaymentDomainSharedModule), + typeof(EShopPaymentWeChatPayDomainSharedModule), typeof(EShopProductsDomainSharedModule), typeof(EShopStoresDomainSharedModule) )] diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj index e8335717..18f1ee2f 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMall.Domain.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs index fb7992c1..d7094ac4 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Domain/EasyMallDomainModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop.Baskets; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payment; +using EasyAbp.EShop.Payment.WeChatPay; using EasyAbp.EShop.Products; using EasyAbp.EShop.Stores; using EasyMall.MultiTenancy; @@ -33,6 +34,7 @@ namespace EasyMall typeof(EShopBasketsDomainModule), typeof(EShopOrdersDomainModule), typeof(EShopPaymentDomainModule), + typeof(EShopPaymentWeChatPayDomainModule), typeof(EShopProductsDomainModule), typeof(EShopStoresDomainModule) )] diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.Designer.cs b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.Designer.cs new file mode 100644 index 00000000..99ce70e4 --- /dev/null +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.Designer.cs @@ -0,0 +1,2028 @@ +// +using System; +using EasyMall.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace EasyMall.Migrations +{ + [DbContext(typeof(EasyMallMigrationsDbContext))] + [Migration("20200420031611_AddedProductService")] + partial class AddedProductService + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.1.2") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentCategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsCategories"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsProductCategories"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MultiTenancySide") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("ProductsProductTypes"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("InventoryStrategy") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsProducts"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasColumnName("ApplicationName") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnName("BrowserInfo") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnName("ClientId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnName("ClientIpAddress") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientName") + .HasColumnName("ClientName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Comments") + .HasColumnName("Comments") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CorrelationId") + .HasColumnName("CorrelationId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Exceptions") + .HasColumnName("Exceptions") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("HttpMethod") + .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") + .HasMaxLength(16); + + b.Property("HttpStatusCode") + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); + + b.Property("ImpersonatorTenantId") + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImpersonatorUserId") + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasColumnName("Url") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("UserId") + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); + + b.Property("ExecutionTime") + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("MethodName") + .HasColumnName("MethodName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Parameters") + .HasColumnName("Parameters") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("ServiceName") + .HasColumnName("ServiceName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeTime") + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); + + b.Property("ChangeType") + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); + + b.Property("EntityId") + .IsRequired() + .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasColumnName("NewValue") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("OriginalValue") + .HasColumnName("OriginalValue") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("PropertyName") + .IsRequired() + .HasColumnName("PropertyName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasColumnName("PropertyTypeFullName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(1048576); + + b.Property("JobName") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(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"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Description") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Regex") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("RegexDescription") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDefault") + .HasColumnName("IsDefault") + .HasColumnType("bit"); + + b.Property("IsPublic") + .HasColumnName("IsPublic") + .HasColumnType("bit"); + + b.Property("IsStatic") + .HasColumnName("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedName") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnName("AccessFailedCount") + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .IsRequired() + .HasColumnName("Email") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("EmailConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnName("LockoutEnabled") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasColumnName("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("NormalizedEmail") + .IsRequired() + .HasColumnName("NormalizedEmail") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .IsRequired() + .HasColumnName("NormalizedUserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("PasswordHash") + .HasColumnName("PasswordHash") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("PhoneNumber") + .HasColumnName("PhoneNumber") + .HasColumnType("nvarchar(16)") + .HasMaxLength(16); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("PhoneNumberConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("SecurityStamp") + .IsRequired() + .HasColumnName("SecurityStamp") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Surname") + .HasColumnName("Surname") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnName("TwoFactorEnabled") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("UserName") + .IsRequired() + .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasColumnType("nvarchar(196)") + .HasMaxLength(196); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Name") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerApiResources"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ApiResourceId", "Type"); + + b.ToTable("IdentityServerApiClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Emphasize") + .HasColumnType("bit"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("ApiResourceId", "Name"); + + b.ToTable("IdentityServerApiScopes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ApiResourceId", "Name", "Type"); + + b.ToTable("IdentityServerApiScopeClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("Description") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ApiResourceId", "Type", "Value"); + + b.ToTable("IdentityServerApiSecrets"); + }); + + 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("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); + + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); + + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); + + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property("BackChannelLogoutUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("ConsentLifetime") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); + + b.Property("EnableLocalLogin") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); + + b.Property("IncludeJwtId") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("LogoUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ProtocolType") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(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("SlidingRefreshTokenLifetime") + .HasColumnType("int"); + + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); + + b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + + b.Property("UserSsoLifetime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("IdentityServerClients"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Origin") + .HasColumnType("nvarchar(150)") + .HasMaxLength(150); + + b.HasKey("ClientId", "Origin"); + + b.ToTable("IdentityServerClientCorsOrigins"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("GrantType") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.HasKey("ClientId", "GrantType"); + + b.ToTable("IdentityServerClientGrantTypes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Provider") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ClientId", "Provider"); + + b.ToTable("IdentityServerClientIdPRestrictions"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostLogoutRedirectUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ClientId", "PostLogoutRedirectUri"); + + b.ToTable("IdentityServerClientPostLogoutRedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ClientId", "Key"); + + b.ToTable("IdentityServerClientProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("RedirectUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ClientId", "RedirectUri"); + + b.ToTable("IdentityServerClientRedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Scope") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ClientId", "Scope"); + + b.ToTable("IdentityServerClientScopes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("Description") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientSecrets"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Data") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(50000); + + b.Property("DeviceCode") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Expiration") + .IsRequired() + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("SubjectId") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("Id"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.HasIndex("UserCode") + .IsUnique(); + + b.ToTable("IdentityServerDeviceFlowCodes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => + { + b.Property("Key") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Data") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(50000); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(50)") + .HasMaxLength(50); + + b.HasKey("Key"); + + b.HasIndex("Expiration"); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.ToTable("IdentityServerPersistedGrants"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Emphasize") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerIdentityResources"); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(2048)") + .HasMaxLength(2048); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings"); + }); + + 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.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.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.ApiScope", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) + .WithMany("UserClaims") + .HasForeignKey("ApiResourceId", "Name") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .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.IdentityClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) + .WithMany("UserClaims") + .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(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.cs b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.cs new file mode 100644 index 00000000..fe72bb9e --- /dev/null +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420031611_AddedProductService.cs @@ -0,0 +1,124 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace EasyMall.Migrations +{ + public partial class AddedProductService : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ProductsCategories", + columns: table => new + { + Id = table.Column(nullable: false), + ExtraProperties = table.Column(nullable: true), + ConcurrencyStamp = table.Column(nullable: true), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + IsDeleted = table.Column(nullable: false, defaultValue: false), + DeleterId = table.Column(nullable: true), + DeletionTime = table.Column(nullable: true), + TenantId = table.Column(nullable: true), + ParentCategoryId = table.Column(nullable: true), + DisplayName = table.Column(nullable: true), + Description = table.Column(nullable: true), + MediaResources = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsCategories", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ProductsProductCategories", + columns: table => new + { + Id = table.Column(nullable: false), + ExtraProperties = table.Column(nullable: true), + ConcurrencyStamp = table.Column(nullable: true), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + TenantId = table.Column(nullable: true), + StoreId = table.Column(nullable: true), + CategoryId = table.Column(nullable: false), + ProductId = table.Column(nullable: false), + DisplayOrder = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsProductCategories", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ProductsProducts", + columns: table => new + { + Id = table.Column(nullable: false), + ExtraProperties = table.Column(nullable: true), + ConcurrencyStamp = table.Column(nullable: true), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + IsDeleted = table.Column(nullable: false, defaultValue: false), + DeleterId = table.Column(nullable: true), + DeletionTime = table.Column(nullable: true), + TenantId = table.Column(nullable: true), + StoreId = table.Column(nullable: true), + ProductTypeId = table.Column(nullable: false), + DisplayName = table.Column(nullable: true), + InventoryStrategy = table.Column(nullable: false), + IsPublished = table.Column(nullable: false), + MediaResources = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsProducts", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ProductsProductTypes", + columns: table => new + { + Id = table.Column(nullable: false), + ExtraProperties = table.Column(nullable: true), + ConcurrencyStamp = table.Column(nullable: true), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + IsDeleted = table.Column(nullable: false, defaultValue: false), + DeleterId = table.Column(nullable: true), + DeletionTime = table.Column(nullable: true), + Name = table.Column(nullable: true), + DisplayName = table.Column(nullable: true), + Description = table.Column(nullable: true), + MultiTenancySide = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsProductTypes", x => x.Id); + }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ProductsCategories"); + + migrationBuilder.DropTable( + name: "ProductsProductCategories"); + + migrationBuilder.DropTable( + name: "ProductsProducts"); + + migrationBuilder.DropTable( + name: "ProductsProductTypes"); + } + } +} diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.Designer.cs b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.Designer.cs new file mode 100644 index 00000000..90f949bc --- /dev/null +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.Designer.cs @@ -0,0 +1,2239 @@ +// +using System; +using EasyMall.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace EasyMall.Migrations +{ + [DbContext(typeof(EasyMallMigrationsDbContext))] + [Migration("20200420110940_AddedProductEntities")] + partial class AddedProductEntities + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.1.2") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentCategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsCategories"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsProductCategories"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MultiTenancySide") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("ProductsProductTypes"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("InventoryStrategy") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsProducts"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.ToTable("ProductsProductAttributes"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductAttributeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductAttributeId"); + + b.ToTable("ProductsProductAttributeOptions"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b => + { + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.HasKey("ProductId"); + + b.ToTable("ProductsProductDetails"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Inventory") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("OrderMinQuantity") + .HasColumnType("int"); + + b.Property("OriginalPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("SerializedAttributeOptionIds") + .HasColumnType("nvarchar(max)"); + + b.Property("Sold") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.ToTable("ProductsProductSkus"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasColumnName("ApplicationName") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnName("BrowserInfo") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnName("ClientId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnName("ClientIpAddress") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientName") + .HasColumnName("ClientName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Comments") + .HasColumnName("Comments") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CorrelationId") + .HasColumnName("CorrelationId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Exceptions") + .HasColumnName("Exceptions") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("HttpMethod") + .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") + .HasMaxLength(16); + + b.Property("HttpStatusCode") + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); + + b.Property("ImpersonatorTenantId") + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImpersonatorUserId") + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasColumnName("Url") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("UserId") + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); + + b.Property("ExecutionTime") + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("MethodName") + .HasColumnName("MethodName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Parameters") + .HasColumnName("Parameters") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("ServiceName") + .HasColumnName("ServiceName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeTime") + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); + + b.Property("ChangeType") + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); + + b.Property("EntityId") + .IsRequired() + .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasColumnName("NewValue") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("OriginalValue") + .HasColumnName("OriginalValue") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("PropertyName") + .IsRequired() + .HasColumnName("PropertyName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasColumnName("PropertyTypeFullName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(1048576); + + b.Property("JobName") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(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"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Description") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Regex") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("RegexDescription") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDefault") + .HasColumnName("IsDefault") + .HasColumnType("bit"); + + b.Property("IsPublic") + .HasColumnName("IsPublic") + .HasColumnType("bit"); + + b.Property("IsStatic") + .HasColumnName("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedName") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnName("AccessFailedCount") + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .IsRequired() + .HasColumnName("Email") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("EmailConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnName("LockoutEnabled") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasColumnName("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("NormalizedEmail") + .IsRequired() + .HasColumnName("NormalizedEmail") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .IsRequired() + .HasColumnName("NormalizedUserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("PasswordHash") + .HasColumnName("PasswordHash") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("PhoneNumber") + .HasColumnName("PhoneNumber") + .HasColumnType("nvarchar(16)") + .HasMaxLength(16); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("PhoneNumberConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("SecurityStamp") + .IsRequired() + .HasColumnName("SecurityStamp") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Surname") + .HasColumnName("Surname") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnName("TwoFactorEnabled") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("UserName") + .IsRequired() + .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasColumnType("nvarchar(196)") + .HasMaxLength(196); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Name") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerApiResources"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ApiResourceId", "Type"); + + b.ToTable("IdentityServerApiClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Emphasize") + .HasColumnType("bit"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("ApiResourceId", "Name"); + + b.ToTable("IdentityServerApiScopes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ApiResourceId", "Name", "Type"); + + b.ToTable("IdentityServerApiScopeClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + { + b.Property("ApiResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("Description") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ApiResourceId", "Type", "Value"); + + b.ToTable("IdentityServerApiSecrets"); + }); + + 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("AlwaysIncludeUserClaimsInIdToken") + .HasColumnType("bit"); + + b.Property("AlwaysSendClientClaims") + .HasColumnType("bit"); + + b.Property("AuthorizationCodeLifetime") + .HasColumnType("int"); + + b.Property("BackChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property("BackChannelLogoutUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("ClientClaimsPrefix") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("ConsentLifetime") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DeviceCodeLifetime") + .HasColumnType("int"); + + b.Property("EnableLocalLogin") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("FrontChannelLogoutSessionRequired") + .HasColumnType("bit"); + + b.Property("FrontChannelLogoutUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("IdentityTokenLifetime") + .HasColumnType("int"); + + b.Property("IncludeJwtId") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("LogoUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("PairWiseSubjectSalt") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ProtocolType") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(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("SlidingRefreshTokenLifetime") + .HasColumnType("int"); + + b.Property("UpdateAccessTokenClaimsOnRefresh") + .HasColumnType("bit"); + + b.Property("UserCodeType") + .HasColumnType("nvarchar(100)") + .HasMaxLength(100); + + b.Property("UserSsoLifetime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("IdentityServerClients"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Origin") + .HasColumnType("nvarchar(150)") + .HasMaxLength(150); + + b.HasKey("ClientId", "Origin"); + + b.ToTable("IdentityServerClientCorsOrigins"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("GrantType") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.HasKey("ClientId", "GrantType"); + + b.ToTable("IdentityServerClientGrantTypes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Provider") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ClientId", "Provider"); + + b.ToTable("IdentityServerClientIdPRestrictions"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostLogoutRedirectUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ClientId", "PostLogoutRedirectUri"); + + b.ToTable("IdentityServerClientPostLogoutRedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Key") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ClientId", "Key"); + + b.ToTable("IdentityServerClientProperties"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("RedirectUri") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.HasKey("ClientId", "RedirectUri"); + + b.ToTable("IdentityServerClientRedirectUris"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Scope") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("ClientId", "Scope"); + + b.ToTable("IdentityServerClientScopes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => + { + b.Property("ClientId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(250)") + .HasMaxLength(250); + + b.Property("Value") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("Description") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.HasKey("ClientId", "Type", "Value"); + + b.ToTable("IdentityServerClientSecrets"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("Data") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(50000); + + b.Property("DeviceCode") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Expiration") + .IsRequired() + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("SubjectId") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("Id"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.HasIndex("UserCode") + .IsUnique(); + + b.ToTable("IdentityServerDeviceFlowCodes"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => + { + b.Property("Key") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Data") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasMaxLength(50000); + + b.Property("Expiration") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("SubjectId") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(50)") + .HasMaxLength(50); + + b.HasKey("Key"); + + b.HasIndex("Expiration"); + + b.HasIndex("SubjectId", "ClientId", "Type"); + + b.ToTable("IdentityServerPersistedGrants"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b => + { + b.Property("IdentityResourceId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.HasKey("IdentityResourceId", "Type"); + + b.ToTable("IdentityServerIdentityClaims"); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Emphasize") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(200)") + .HasMaxLength(200); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ShowInDiscoveryDocument") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.ToTable("IdentityServerIdentityResources"); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(2048)") + .HasMaxLength(2048); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings"); + }); + + 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.ProductDetail", b => + { + b.HasOne("EasyAbp.EShop.Products.Products.Product", null) + .WithOne("ProductDetail") + .HasForeignKey("EasyAbp.EShop.Products.Products.ProductDetail", "ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b => + { + b.HasOne("EasyAbp.EShop.Products.Products.Product", null) + .WithMany("ProductSkus") + .HasForeignKey("ProductId"); + }); + + 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.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.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.ApiScope", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null) + .WithMany("UserClaims") + .HasForeignKey("ApiResourceId", "Name") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b => + { + b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null) + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .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.IdentityClaim", b => + { + b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null) + .WithMany("UserClaims") + .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(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.cs b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.cs new file mode 100644 index 00000000..9830c2f9 --- /dev/null +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/20200420110940_AddedProductEntities.cs @@ -0,0 +1,144 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace EasyMall.Migrations +{ + public partial class AddedProductEntities : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ProductsProductAttributes", + columns: table => new + { + Id = table.Column(nullable: false), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + IsDeleted = table.Column(nullable: false, defaultValue: false), + DeleterId = table.Column(nullable: true), + DeletionTime = table.Column(nullable: true), + DisplayName = table.Column(nullable: true), + Description = table.Column(nullable: true), + ProductId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsProductAttributes", x => x.Id); + table.ForeignKey( + name: "FK_ProductsProductAttributes_ProductsProducts_ProductId", + column: x => x.ProductId, + principalTable: "ProductsProducts", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "ProductsProductDetails", + columns: table => new + { + ProductId = table.Column(nullable: false), + Description = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsProductDetails", x => x.ProductId); + table.ForeignKey( + name: "FK_ProductsProductDetails_ProductsProducts_ProductId", + column: x => x.ProductId, + principalTable: "ProductsProducts", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ProductsProductSkus", + columns: table => new + { + Id = table.Column(nullable: false), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + IsDeleted = table.Column(nullable: false, defaultValue: false), + DeleterId = table.Column(nullable: true), + DeletionTime = table.Column(nullable: true), + SerializedAttributeOptionIds = table.Column(nullable: true), + OriginalPrice = table.Column(nullable: false), + Price = table.Column(nullable: false), + Inventory = table.Column(nullable: false), + Sold = table.Column(nullable: false), + OrderMinQuantity = table.Column(nullable: false), + ProductId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsProductSkus", x => x.Id); + table.ForeignKey( + name: "FK_ProductsProductSkus_ProductsProducts_ProductId", + column: x => x.ProductId, + principalTable: "ProductsProducts", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "ProductsProductAttributeOptions", + columns: table => new + { + Id = table.Column(nullable: false), + CreationTime = table.Column(nullable: false), + CreatorId = table.Column(nullable: true), + LastModificationTime = table.Column(nullable: true), + LastModifierId = table.Column(nullable: true), + IsDeleted = table.Column(nullable: false, defaultValue: false), + DeleterId = table.Column(nullable: true), + DeletionTime = table.Column(nullable: true), + DisplayName = table.Column(nullable: true), + Description = table.Column(nullable: true), + ProductAttributeId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductsProductAttributeOptions", x => x.Id); + table.ForeignKey( + name: "FK_ProductsProductAttributeOptions_ProductsProductAttributes_ProductAttributeId", + column: x => x.ProductAttributeId, + principalTable: "ProductsProductAttributes", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_ProductsProductAttributeOptions_ProductAttributeId", + table: "ProductsProductAttributeOptions", + column: "ProductAttributeId"); + + migrationBuilder.CreateIndex( + name: "IX_ProductsProductAttributes_ProductId", + table: "ProductsProductAttributes", + column: "ProductId"); + + migrationBuilder.CreateIndex( + name: "IX_ProductsProductSkus_ProductId", + table: "ProductsProductSkus", + column: "ProductId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ProductsProductAttributeOptions"); + + migrationBuilder.DropTable( + name: "ProductsProductDetails"); + + migrationBuilder.DropTable( + name: "ProductsProductSkus"); + + migrationBuilder.DropTable( + name: "ProductsProductAttributes"); + } + } +} diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs index 2e393113..f43c295e 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore.DbMigrations/Migrations/EasyMallMigrationsDbContextModelSnapshot.cs @@ -1,10 +1,10 @@ // using System; +using EasyMall.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EasyMall.EntityFrameworkCore; namespace EasyMall.Migrations { @@ -15,10 +15,443 @@ namespace EasyMall.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.1.0") + .HasAnnotation("ProductVersion", "3.1.2") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentCategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsCategories"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayOrder") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsProductCategories"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MultiTenancySide") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("ProductsProductTypes"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("InventoryStrategy") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("MediaResources") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("StoreId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.ToTable("ProductsProducts"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.ToTable("ProductsProductAttributes"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ProductAttributeId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("ProductAttributeId"); + + b.ToTable("ProductsProductAttributeOptions"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductDetail", b => + { + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.HasKey("ProductId"); + + b.ToTable("ProductsProductDetails"); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Inventory") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("OrderMinQuantity") + .HasColumnType("int"); + + b.Property("OriginalPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("ProductId") + .HasColumnType("uniqueidentifier"); + + b.Property("SerializedAttributeOptionIds") + .HasColumnType("nvarchar(max)"); + + b.Property("Sold") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.ToTable("ProductsProductSkus"); + }); + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") @@ -56,6 +489,8 @@ namespace EasyMall.Migrations .HasMaxLength(256); b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") .HasColumnType("nvarchar(max)"); b.Property("CorrelationId") @@ -164,6 +599,7 @@ namespace EasyMall.Migrations .HasMaxLength(256); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -257,6 +693,7 @@ namespace EasyMall.Migrations .HasMaxLength(64); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -273,6 +710,8 @@ namespace EasyMall.Migrations .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") .HasColumnType("nvarchar(max)"); b.Property("CreationTime") @@ -440,6 +879,7 @@ namespace EasyMall.Migrations .HasMaxLength(256); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -467,6 +907,7 @@ namespace EasyMall.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -636,6 +1077,7 @@ namespace EasyMall.Migrations .HasMaxLength(1024); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.Property("UserId") @@ -667,6 +1109,7 @@ namespace EasyMall.Migrations .HasMaxLength(196); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "LoginProvider"); @@ -685,6 +1128,7 @@ namespace EasyMall.Migrations .HasColumnType("uniqueidentifier"); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("UserId", "RoleId"); @@ -708,6 +1152,7 @@ namespace EasyMall.Migrations .HasMaxLength(128); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.Property("Value") @@ -1273,6 +1718,8 @@ namespace EasyMall.Migrations .HasMaxLength(200); b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") .HasColumnType("nvarchar(max)"); b.Property("CreationTime") @@ -1425,6 +1872,7 @@ namespace EasyMall.Migrations .HasMaxLength(64); b.Property("TenantId") + .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); @@ -1541,6 +1989,36 @@ namespace EasyMall.Migrations b.ToTable("AbpTenantConnectionStrings"); }); + 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.ProductDetail", b => + { + b.HasOne("EasyAbp.EShop.Products.Products.Product", null) + .WithOne("ProductDetail") + .HasForeignKey("EasyAbp.EShop.Products.Products.ProductDetail", "ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b => + { + b.HasOne("EasyAbp.EShop.Products.Products.Product", null) + .WithMany("ProductSkus") + .HasForeignKey("ProductId"); + }); + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj index 09503285..5f3bfe90 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EasyMall.EntityFrameworkCore.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs index 3be287dc..23cf8895 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.EntityFrameworkCore/EntityFrameworkCore/EasyMallEntityFrameworkCoreModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop.Baskets.EntityFrameworkCore; using EasyAbp.EShop.Orders.EntityFrameworkCore; using EasyAbp.EShop.Payment.EntityFrameworkCore; +using EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore; using EasyAbp.EShop.Products.EntityFrameworkCore; using EasyAbp.EShop.Stores.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; @@ -32,6 +33,7 @@ namespace EasyMall.EntityFrameworkCore typeof(EShopBasketsEntityFrameworkCoreModule), typeof(EShopOrdersEntityFrameworkCoreModule), typeof(EShopPaymentEntityFrameworkCoreModule), + typeof(EShopPaymentWeChatPayEntityFrameworkCoreModule), typeof(EShopProductsEntityFrameworkCoreModule), typeof(EShopStoresEntityFrameworkCoreModule) )] diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj index 4a37d999..22126ee7 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMall.HttpApi.Client.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs index 3102e59b..e93d20eb 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi.Client/EasyMallHttpApiClientModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop.Baskets; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payment; +using EasyAbp.EShop.Payment.WeChatPay; using EasyAbp.EShop.Products; using EasyAbp.EShop.Stores; using Microsoft.Extensions.DependencyInjection; @@ -23,6 +24,7 @@ namespace EasyMall typeof(EShopBasketsHttpApiClientModule), typeof(EShopOrdersHttpApiClientModule), typeof(EShopPaymentHttpApiClientModule), + typeof(EShopPaymentWeChatPayHttpApiClientModule), typeof(EShopProductsHttpApiClientModule), typeof(EShopStoresHttpApiClientModule) )] diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj index 3cd7decd..8502cf81 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMall.HttpApi.csproj @@ -10,6 +10,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs index 32578aa7..399e3d32 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.HttpApi/EasyMallHttpApiModule.cs @@ -1,6 +1,7 @@ using EasyAbp.EShop.Baskets; using EasyAbp.EShop.Orders; using EasyAbp.EShop.Payment; +using EasyAbp.EShop.Payment.WeChatPay; using EasyAbp.EShop.Products; using EasyAbp.EShop.Stores; using Volo.Abp.Account; @@ -22,6 +23,7 @@ namespace EasyMall typeof(EShopBasketsHttpApiModule), typeof(EShopOrdersHttpApiModule), typeof(EShopPaymentHttpApiModule), + typeof(EShopPaymentWeChatPayHttpApiModule), typeof(EShopProductsHttpApiModule), typeof(EShopStoresHttpApiModule) )] diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj index 0e1d5d90..73c25d5a 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMall.Web.csproj @@ -43,6 +43,7 @@ + diff --git a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs index c214c45b..9d50da33 100644 --- a/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs +++ b/samples/EasyMall/aspnet-core/src/EasyMall.Web/EasyMallWebModule.cs @@ -1,9 +1,16 @@ using System; using System.IO; +using EasyAbp.EShop.Baskets; using EasyAbp.EShop.Baskets.Web; +using EasyAbp.EShop.Orders; using EasyAbp.EShop.Orders.Web; +using EasyAbp.EShop.Payment; using EasyAbp.EShop.Payment.Web; +using EasyAbp.EShop.Payment.WeChatPay; +using EasyAbp.EShop.Payment.WeChatPay.Web; +using EasyAbp.EShop.Products; using EasyAbp.EShop.Products.Web; +using EasyAbp.EShop.Stores; using EasyAbp.EShop.Stores.Web; using Localization.Resources.AbpUi; using Microsoft.AspNetCore; @@ -58,6 +65,7 @@ namespace EasyMall.Web typeof(EShopBasketsWebModule), typeof(EShopOrdersWebModule), typeof(EShopPaymentWebModule), + typeof(EShopPaymentWeChatPayWebModule), typeof(EShopProductsWebModule), typeof(EShopStoresWebModule) )] @@ -91,6 +99,20 @@ namespace EasyMall.Web ConfigureNavigationServices(); ConfigureAutoApiControllers(); ConfigureSwaggerServices(context.Services); + ConfigureConventionalControllers(); + } + + private void ConfigureConventionalControllers() + { + Configure(options => + { + options.ConventionalControllers.Create(typeof(EShopBasketsApplicationModule).Assembly); + options.ConventionalControllers.Create(typeof(EShopOrdersApplicationModule).Assembly); + options.ConventionalControllers.Create(typeof(EShopPaymentApplicationModule).Assembly); + options.ConventionalControllers.Create(typeof(EShopPaymentWeChatPayApplicationModule).Assembly); + options.ConventionalControllers.Create(typeof(EShopProductsApplicationModule).Assembly); + options.ConventionalControllers.Create(typeof(EShopStoresApplicationModule).Assembly); + }); } private void ConfigureUrls(IConfiguration configuration) @@ -132,6 +154,42 @@ namespace EasyMall.Web options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EasyMall.Application.Contracts")); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EasyMall.Application")); options.FileSets.ReplaceEmbeddedByPhysical(hostingEnvironment.ContentRootPath); + + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Baskets.Web")); + + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Orders.Web")); + + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.Web")); + + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Payment.WeChatPay.Web")); + + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Products{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Products.Web")); + + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores.Domain.Shared")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores.Domain")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores.Application.Contracts")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores.Application")); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}modules{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores{Path.DirectorySeparatorChar}src{Path.DirectorySeparatorChar}EasyAbp.EShop.Stores.Web")); }); } }