From 53a93301a8e858d78b97b4091e0476fee5575835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=86=A0=E9=AD=81?= Date: Tue, 10 Dec 2024 07:23:24 +0800 Subject: [PATCH] Adjusted project structure and added branding feature --- Directory.Packages.props | 17 +- modules/cms-kit/Dignite.CmsKit.sln | 125 +- .../CmsKitAuthServerModule.cs | 3 +- .../20241209061800_UpgradeToV831.Designer.cs | 1959 +++++++++++++++++ .../20241209061800_UpgradeToV831.cs | 625 ++++++ .../AuthServerDbContextModelSnapshot.cs | 110 +- .../CmsKitHttpApiHostModule.cs | 9 +- ...09011447_AddFileExplorerModule.Designer.cs | 1115 ++++++++++ .../20241209011447_AddFileExplorerModule.cs | 91 + ...ApiHostMigrationsDbContextModelSnapshot.cs | 160 ++ ....CmsKit.Admin.Application.Contracts.abppkg | 3 + ....CmsKit.Admin.Application.Contracts.csproj | 18 + .../Admin/Brand/IBrandAdminAppService.cs | 9 + .../CmsKit/Admin/Brand/UpdateBrandInput.cs | 31 + .../Admin/CmsKitAdminRemoteServiceConsts.cs | 8 + ...teCmsKitAdminApplicationContractsModule.cs | 16 + ...CmsKitAdminPermissionDefinitionProvider.cs | 21 + .../Permissions/CmsKitAdminPermissions.cs | 12 + .../FodyWeavers.xml | 3 + .../Dignite.CmsKit.Admin.Application.abppkg | 3 + .../Dignite.CmsKit.Admin.Application.csproj | 19 + .../Admin/Brand/BrandAdminAppService.cs | 29 + .../CmsKit/Admin/CmsKitAdminAppServiceBase.cs | 13 + ...CmsKitAdminApplicationAutoMapperProfile.cs | 13 + .../DigniteCmsKitAdminApplicationModule.cs | 105 + .../FodyWeavers.xml | 3 + .../Dignite.CmsKit.Admin.HttpApi.abppkg | 3 + .../Dignite.CmsKit.Admin.HttpApi.csproj | 18 + .../Admin/Brand/BrandAdminController.cs | 24 + .../CmsKit/Admin/CmsKitAdminControllerBase.cs | 12 + .../Admin/DigniteCmsKitAdminHttpApiModule.cs | 35 + .../FodyWeavers.xml | 3 + ...ignite.CmsKit.Application.Contracts.csproj | 4 +- ...DigniteCmsKitApplicationContractsModule.cs | 17 + .../CmsKitPermissionDefinitionProvider.cs | 18 - .../CmsKit/Permissions/CmsKitPermissions.cs | 13 - ...eCmsKitPublicApplicationContractsModule.cs | 13 - .../Dignite.CmsKit.Application.csproj | 7 +- .../CmsKit/DigniteCmsKitApplicationModule.cs | 16 + ...CmsKit.Common.Application.Contracts.abppkg | 3 + ...CmsKit.Common.Application.Contracts.csproj | 16 + .../Dignite/CmsKit/Brand/BrandDto.cs | 36 + .../Dignite/CmsKit/Brand/IBrandAppService.cs | 8 + .../CmsKit/CmsKitCommonRemoteServiceConsts.cs | 8 + ...eCmsKitCommonApplicationContractsModule.cs | 13 + .../FodyWeavers.xml | 3 + .../Dignite.CmsKit.Common.Application.abppkg | 3 + .../Dignite.CmsKit.Common.Application.csproj | 17 + .../Dignite/CmsKit/Brand/BrandAppService.cs | 16 + .../CmsKit/CmsKitCommonAppServiceBase.cs | 13 + ...msKitCommonApplicationAutoMapperProfile.cs | 13 + .../DigniteCmsKitCommonApplicationModule.cs | 23 + .../FodyWeavers.xml | 3 + .../Brand/BrandClientProxy.Generated.cs | 24 + .../Dignite/CmsKit/Brand/BrandClientProxy.cs | 7 + ...dignite-cms-kit-common-generate-proxy.json | 52 + ...ignite.CmsKit.Common.HttpApi.Client.abppkg | 3 + ...ignite.CmsKit.Common.HttpApi.Client.csproj | 21 + .../DigniteCmsKitCommonHttpApiClientModule.cs | 26 + .../FodyWeavers.xml | 3 + .../Dignite.CmsKit.Common.HttpApi.abppkg | 3 + .../Dignite.CmsKit.Common.HttpApi.csproj | 16 + .../Dignite/CmsKit/Brand/BrandController.cs | 24 + .../CmsKit/CmsKitCommonControllerBase.cs | 12 + .../DigniteCmsKitCommonHttpApiModule.cs | 32 + .../FodyWeavers.xml | 3 + .../CmsKitCommonWebAutoMapperProfile.cs | 13 + .../Dignite.CmsKit.Common.Web.abppkg | 3 + .../Dignite.CmsKit.Common.Web.csproj | 35 + .../DigniteCmsKitCommonWebModule.cs | 51 + .../Dignite.CmsKit.Common.Web/FodyWeavers.xml | 3 + .../Properties/launchSettings.json | 12 + .../dignite-cms-kit-common-proxy.js | 25 + .../Dignite.CmsKit.Domain.Shared.csproj | 1 + .../CmsKit/BlobStoring/BlobContainerConsts.cs | 19 + .../Dignite.CmsKit.Domain.csproj | 1 + .../BlobStoring/BrandIconBlobNameGenerator.cs | 28 + .../CmsKit/BlobStoring/BrandIconContainer.cs | 11 + .../BlobStoring/BrandLogoBlobNameGenerator.cs | 28 + .../CmsKit/BlobStoring/BrandLogoContainer.cs | 11 + .../BrandLogoReverseBlobNameGenerator.cs | 28 + .../BlobStoring/BrandLogoReverseContainer.cs | 11 + .../CmsKitSettingDefinitionProvider.cs | 30 +- .../Dignite/CmsKit/Settings/CmsKitSettings.cs | 24 +- .../Dignite.CmsKit.EntityFrameworkCore.csproj | 1 + .../CmsKitDbContextModelCreatingExtensions.cs | 2 + .../Dignite.CmsKit.HttpApi.Client.csproj | 3 +- .../DigniteCmsKitHttpApiClientModule.cs | 14 + .../Dignite.CmsKit.HttpApi.csproj | 4 +- .../CmsKit/DigniteCmsKitHttpApiModule.cs | 36 + .../Dignite.CmsKit.MongoDB.csproj | 1 + .../CmsKit/MongoDB/CmsKitMongoDbContext.cs | 2 + .../MongoDB/DigniteCmsKitMongoDbModule.cs | 4 +- ...CmsKit.Public.Application.Contracts.abppkg | 3 + ...CmsKit.Public.Application.Contracts.csproj | 18 + .../CmsKitPublicRemoteServiceConsts.cs} | 2 +- ...eCmsKitPublicApplicationContractsModule.cs | 16 + .../IMarkedItemPublicAppService.cs | 0 .../CmsKit/Public/Visits/CreateVisitInput.cs | 0 .../Public/Visits/IVisitPublicAppService.cs | 0 .../Dignite/CmsKit/Public/Visits/VisitDto.cs | 0 .../FodyWeavers.xml | 3 + .../Dignite.CmsKit.Public.Application.abppkg | 3 + .../Dignite.CmsKit.Public.Application.csproj | 19 + .../Public/CmsKitPublicAppServiceBase.cs | 0 ...msKitPublicApplicationAutoMapperProfile.cs | 0 .../DigniteCmsKitPublicApplicationModule.cs | 7 +- .../MarkedItems/MarkedItemPublicAppService.cs | 0 .../Public/Visits/VisitPublicAppService.cs | 0 .../FodyWeavers.xml | 3 + .../MarkedItemPublicClientProxy.Generated.cs | 0 .../MarkedItemPublicClientProxy.cs | 0 .../VisitPublicClientProxy.Generated.cs | 0 .../Public/Visits/VisitPublicClientProxy.cs | 0 ...dignite-cms-kit-public-generate-proxy.json | 321 +++ ...ignite.CmsKit.Public.HttpApi.Client.abppkg | 3 + ...ignite.CmsKit.Public.HttpApi.Client.csproj | 23 + .../DigniteCmsKitPublicHttpApiClientModule.cs | 10 +- .../FodyWeavers.xml | 3 + .../Dignite.CmsKit.Public.HttpApi.abppkg | 3 + .../Dignite.CmsKit.Public.HttpApi.csproj | 18 + .../Public/CmsKitPublicControllerBase.cs | 0 .../DigniteCmsKitPublicHttpApiModule.cs | 5 +- .../MarkedItems/MarkedItemPublicController.cs | 4 +- .../Public/Visits/VisitPublicController.cs | 4 +- .../FodyWeavers.xml | 3 + .../CmsKitPublicWebAutoMapperProfile.cs | 13 + .../Dignite.CmsKit.Public.Web.abppkg | 3 + .../Dignite.CmsKit.Public.Web.csproj | 39 + .../DigniteCmsKitPublicWebModule.cs | 49 + .../Dignite.CmsKit.Public.Web/FodyWeavers.xml | 3 + .../Helpers/BlobHelper.cs | 75 + .../Properties/launchSettings.json | 12 + .../dignite-cms-kit-public-proxy.js | 48 + .../CmsKitApplicationTestModule.cs | 5 +- .../CmsKitConsoleApiClientModule.cs | 5 +- 136 files changed, 6121 insertions(+), 107 deletions(-) create mode 100644 modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.Designer.cs create mode 100644 modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.cs create mode 100644 modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.Designer.cs create mode 100644 modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/IBrandAdminAppService.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/UpdateBrandInput.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/CmsKitAdminRemoteServiceConsts.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationContractsModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissions.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/Brand/BrandAdminAppService.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminAppServiceBase.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.Application/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/Brand/BrandAdminController.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/CmsKitAdminControllerBase.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/DigniteCmsKitAdminHttpApiModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/DigniteCmsKitApplicationContractsModule.cs delete mode 100644 modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissionDefinitionProvider.cs delete mode 100644 modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissions.cs delete mode 100644 modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/DigniteCmsKitApplicationModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/BrandDto.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/IBrandAppService.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/CmsKitCommonRemoteServiceConsts.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/DigniteCmsKitCommonApplicationContractsModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/Brand/BrandAppService.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonAppServiceBase.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/DigniteCmsKitCommonApplicationModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Application/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.Generated.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/dignite-cms-kit-common-generate-proxy.json create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitCommonHttpApiClientModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/Brand/BrandController.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/CmsKitCommonControllerBase.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/DigniteCmsKitCommonHttpApiModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Web/CmsKitCommonWebAutoMapperProfile.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Web/DigniteCmsKitCommonWebModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Web/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Web/Properties/launchSettings.json create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Common.Web/wwwroot/client-proxies/dignite-cms-kit-common-proxy.js create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite/CmsKit/BlobStoring/BlobContainerConsts.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconBlobNameGenerator.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconContainer.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoBlobNameGenerator.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoContainer.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseBlobNameGenerator.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseContainer.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitHttpApiClientModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/DigniteCmsKitHttpApiModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.csproj rename modules/cms-kit/src/{Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicRemoteServiceConsts.cs => Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/CmsKitPublicRemoteServiceConsts.cs} (76%) create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs rename modules/cms-kit/src/{Dignite.CmsKit.Application.Contracts => Dignite.CmsKit.Public.Application.Contracts}/Dignite/CmsKit/Public/MarkedItems/IMarkedItemPublicAppService.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.Application.Contracts => Dignite.CmsKit.Public.Application.Contracts}/Dignite/CmsKit/Public/Visits/CreateVisitInput.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.Application.Contracts => Dignite.CmsKit.Public.Application.Contracts}/Dignite/CmsKit/Public/Visits/IVisitPublicAppService.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.Application.Contracts => Dignite.CmsKit.Public.Application.Contracts}/Dignite/CmsKit/Public/Visits/VisitDto.cs (100%) create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.csproj rename modules/cms-kit/src/{Dignite.CmsKit.Application => Dignite.CmsKit.Public.Application}/Dignite/CmsKit/Public/CmsKitPublicAppServiceBase.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.Application => Dignite.CmsKit.Public.Application}/Dignite/CmsKit/Public/CmsKitPublicApplicationAutoMapperProfile.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.Application => Dignite.CmsKit.Public.Application}/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationModule.cs (74%) rename modules/cms-kit/src/{Dignite.CmsKit.Application => Dignite.CmsKit.Public.Application}/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicAppService.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.Application => Dignite.CmsKit.Public.Application}/Dignite/CmsKit/Public/Visits/VisitPublicAppService.cs (100%) create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Application/FodyWeavers.xml rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi.Client => Dignite.CmsKit.Public.HttpApi.Client}/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.Generated.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi.Client => Dignite.CmsKit.Public.HttpApi.Client}/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi.Client => Dignite.CmsKit.Public.HttpApi.Client}/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.Generated.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi.Client => Dignite.CmsKit.Public.HttpApi.Client}/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.cs (100%) create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/dignite-cms-kit-public-generate-proxy.json create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.csproj rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi.Client => Dignite.CmsKit.Public.HttpApi.Client}/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiClientModule.cs (68%) create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.csproj rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi => Dignite.CmsKit.Public.HttpApi}/Dignite/CmsKit/Public/CmsKitPublicControllerBase.cs (100%) rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi => Dignite.CmsKit.Public.HttpApi}/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiModule.cs (84%) rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi => Dignite.CmsKit.Public.HttpApi}/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicController.cs (88%) rename modules/cms-kit/src/{Dignite.CmsKit.HttpApi => Dignite.CmsKit.Public.HttpApi}/Dignite/CmsKit/Public/Visits/VisitPublicController.cs (92%) create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.abppkg create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.csproj create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/DigniteCmsKitPublicWebModule.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/FodyWeavers.xml create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/Helpers/BlobHelper.cs create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/Properties/launchSettings.json create mode 100644 modules/cms-kit/src/Dignite.CmsKit.Public.Web/wwwroot/client-proxies/dignite-cms-kit-public-proxy.js diff --git a/Directory.Packages.props b/Directory.Packages.props index 082157e0..0c9d7091 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -196,13 +196,26 @@ + + + + + + + + + + + + + + + - - diff --git a/modules/cms-kit/Dignite.CmsKit.sln b/modules/cms-kit/Dignite.CmsKit.sln index 703a6644..d79fc586 100644 --- a/modules/cms-kit/Dignite.CmsKit.sln +++ b/modules/cms-kit/Dignite.CmsKit.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29001.49 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35521.163 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dignite.CmsKit.Domain.Shared", "src\Dignite.CmsKit.Domain.Shared\Dignite.CmsKit.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" EndProject @@ -45,6 +45,40 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dignite.CmsKit.Host.Shared" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Installer", "src\Dignite.CmsKit.Installer\Dignite.CmsKit.Installer.csproj", "{BE39FD00-745B-4049-8161-FC129817CBE4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{71B91337-5290-4933-BB79-EBB33B0A3386}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{91B9D95C-F877-472E-AF3E-4B660816D828}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "public", "public", "{7B1913BE-B7CA-4E2A-8424-1F87762E127C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unified", "unified", "{421AB62C-9BD3-4F70-99BB-193D9A84BD68}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Admin.HttpApi", "src\Dignite.CmsKit.Admin.HttpApi\Dignite.CmsKit.Admin.HttpApi.csproj", "{32027E3D-6ACC-48DB-8E44-47884AA4D7F1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Admin.Application.Contracts", "src\Dignite.CmsKit.Admin.Application.Contracts\Dignite.CmsKit.Admin.Application.Contracts.csproj", "{18571479-831D-4361-B2B8-1A888FDACE8B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Admin.Application", "src\Dignite.CmsKit.Admin.Application\Dignite.CmsKit.Admin.Application.csproj", "{4A366122-DE16-4906-B622-C1E094747501}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Public.Application", "src\Dignite.CmsKit.Public.Application\Dignite.CmsKit.Public.Application.csproj", "{95C90ECE-7ABE-4DCF-8389-5331FDFC633F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Public.Application.Contracts", "src\Dignite.CmsKit.Public.Application.Contracts\Dignite.CmsKit.Public.Application.Contracts.csproj", "{86B11F35-0658-4D0F-AAE9-148BAA63A9DA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Public.HttpApi", "src\Dignite.CmsKit.Public.HttpApi\Dignite.CmsKit.Public.HttpApi.csproj", "{6420F7C7-0D7E-497E-954A-E461AB865F02}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Public.HttpApi.Client", "src\Dignite.CmsKit.Public.HttpApi.Client\Dignite.CmsKit.Public.HttpApi.Client.csproj", "{6CFD3178-8518-4540-B930-A77789F6F78C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Public.Web", "src\Dignite.CmsKit.Public.Web\Dignite.CmsKit.Public.Web.csproj", "{28F1902D-10BF-4554-B9B1-9CB7680DBBB3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Common.Application", "src\Dignite.CmsKit.Common.Application\Dignite.CmsKit.Common.Application.csproj", "{9B715372-3E94-4978-8EB6-FE9CDBBF3CA4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Common.Application.Contracts", "src\Dignite.CmsKit.Common.Application.Contracts\Dignite.CmsKit.Common.Application.Contracts.csproj", "{91926D87-BF3F-4542-AEF2-D9B082AA9A6D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Common.HttpApi", "src\Dignite.CmsKit.Common.HttpApi\Dignite.CmsKit.Common.HttpApi.csproj", "{B7049A58-B852-4771-ADCD-B18F5B4DEF3B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Common.HttpApi.Client", "src\Dignite.CmsKit.Common.HttpApi.Client\Dignite.CmsKit.Common.HttpApi.Client.csproj", "{C7D17E3A-A7BF-4F89-94A5-791FD6AB3FCF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dignite.CmsKit.Common.Web", "src\Dignite.CmsKit.Common.Web\Dignite.CmsKit.Common.Web.csproj", "{D1C909F1-9412-4889-B4A1-A102E4B7CA34}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -123,19 +157,71 @@ Global {BE39FD00-745B-4049-8161-FC129817CBE4}.Debug|Any CPU.Build.0 = Debug|Any CPU {BE39FD00-745B-4049-8161-FC129817CBE4}.Release|Any CPU.ActiveCfg = Release|Any CPU {BE39FD00-745B-4049-8161-FC129817CBE4}.Release|Any CPU.Build.0 = Release|Any CPU + {32027E3D-6ACC-48DB-8E44-47884AA4D7F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32027E3D-6ACC-48DB-8E44-47884AA4D7F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32027E3D-6ACC-48DB-8E44-47884AA4D7F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32027E3D-6ACC-48DB-8E44-47884AA4D7F1}.Release|Any CPU.Build.0 = Release|Any CPU + {18571479-831D-4361-B2B8-1A888FDACE8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18571479-831D-4361-B2B8-1A888FDACE8B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18571479-831D-4361-B2B8-1A888FDACE8B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18571479-831D-4361-B2B8-1A888FDACE8B}.Release|Any CPU.Build.0 = Release|Any CPU + {4A366122-DE16-4906-B622-C1E094747501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A366122-DE16-4906-B622-C1E094747501}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A366122-DE16-4906-B622-C1E094747501}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A366122-DE16-4906-B622-C1E094747501}.Release|Any CPU.Build.0 = Release|Any CPU + {95C90ECE-7ABE-4DCF-8389-5331FDFC633F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95C90ECE-7ABE-4DCF-8389-5331FDFC633F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95C90ECE-7ABE-4DCF-8389-5331FDFC633F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95C90ECE-7ABE-4DCF-8389-5331FDFC633F}.Release|Any CPU.Build.0 = Release|Any CPU + {86B11F35-0658-4D0F-AAE9-148BAA63A9DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86B11F35-0658-4D0F-AAE9-148BAA63A9DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86B11F35-0658-4D0F-AAE9-148BAA63A9DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86B11F35-0658-4D0F-AAE9-148BAA63A9DA}.Release|Any CPU.Build.0 = Release|Any CPU + {6420F7C7-0D7E-497E-954A-E461AB865F02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6420F7C7-0D7E-497E-954A-E461AB865F02}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6420F7C7-0D7E-497E-954A-E461AB865F02}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6420F7C7-0D7E-497E-954A-E461AB865F02}.Release|Any CPU.Build.0 = Release|Any CPU + {6CFD3178-8518-4540-B930-A77789F6F78C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CFD3178-8518-4540-B930-A77789F6F78C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CFD3178-8518-4540-B930-A77789F6F78C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CFD3178-8518-4540-B930-A77789F6F78C}.Release|Any CPU.Build.0 = Release|Any CPU + {28F1902D-10BF-4554-B9B1-9CB7680DBBB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28F1902D-10BF-4554-B9B1-9CB7680DBBB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28F1902D-10BF-4554-B9B1-9CB7680DBBB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28F1902D-10BF-4554-B9B1-9CB7680DBBB3}.Release|Any CPU.Build.0 = Release|Any CPU + {9B715372-3E94-4978-8EB6-FE9CDBBF3CA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B715372-3E94-4978-8EB6-FE9CDBBF3CA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B715372-3E94-4978-8EB6-FE9CDBBF3CA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B715372-3E94-4978-8EB6-FE9CDBBF3CA4}.Release|Any CPU.Build.0 = Release|Any CPU + {91926D87-BF3F-4542-AEF2-D9B082AA9A6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91926D87-BF3F-4542-AEF2-D9B082AA9A6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91926D87-BF3F-4542-AEF2-D9B082AA9A6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91926D87-BF3F-4542-AEF2-D9B082AA9A6D}.Release|Any CPU.Build.0 = Release|Any CPU + {B7049A58-B852-4771-ADCD-B18F5B4DEF3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7049A58-B852-4771-ADCD-B18F5B4DEF3B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7049A58-B852-4771-ADCD-B18F5B4DEF3B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7049A58-B852-4771-ADCD-B18F5B4DEF3B}.Release|Any CPU.Build.0 = Release|Any CPU + {C7D17E3A-A7BF-4F89-94A5-791FD6AB3FCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7D17E3A-A7BF-4F89-94A5-791FD6AB3FCF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7D17E3A-A7BF-4F89-94A5-791FD6AB3FCF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7D17E3A-A7BF-4F89-94A5-791FD6AB3FCF}.Release|Any CPU.Build.0 = Release|Any CPU + {D1C909F1-9412-4889-B4A1-A102E4B7CA34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D1C909F1-9412-4889-B4A1-A102E4B7CA34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D1C909F1-9412-4889-B4A1-A102E4B7CA34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1C909F1-9412-4889-B4A1-A102E4B7CA34}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {F1C58097-4C08-4D88-8976-6B3389391481} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {D64C1577-4929-4B60-939E-96DE1534891A} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {421AB62C-9BD3-4F70-99BB-193D9A84BD68} + {78040F9E-3501-4A40-82DF-00A597710F35} = {421AB62C-9BD3-4F70-99BB-193D9A84BD68} + {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {F1C58097-4C08-4D88-8976-6B3389391481} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {421AB62C-9BD3-4F70-99BB-193D9A84BD68} + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {421AB62C-9BD3-4F70-99BB-193D9A84BD68} {C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} {527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} @@ -145,7 +231,24 @@ Global {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} {690203F4-3CD5-4569-88D9-EE831EEA5F5F} = {E400416D-2895-4512-9D17-90681EEC7E0A} {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB} = {E400416D-2895-4512-9D17-90681EEC7E0A} - {BE39FD00-745B-4049-8161-FC129817CBE4} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {BE39FD00-745B-4049-8161-FC129817CBE4} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {71B91337-5290-4933-BB79-EBB33B0A3386} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {91B9D95C-F877-472E-AF3E-4B660816D828} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {7B1913BE-B7CA-4E2A-8424-1F87762E127C} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {421AB62C-9BD3-4F70-99BB-193D9A84BD68} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {32027E3D-6ACC-48DB-8E44-47884AA4D7F1} = {71B91337-5290-4933-BB79-EBB33B0A3386} + {18571479-831D-4361-B2B8-1A888FDACE8B} = {71B91337-5290-4933-BB79-EBB33B0A3386} + {4A366122-DE16-4906-B622-C1E094747501} = {71B91337-5290-4933-BB79-EBB33B0A3386} + {95C90ECE-7ABE-4DCF-8389-5331FDFC633F} = {7B1913BE-B7CA-4E2A-8424-1F87762E127C} + {86B11F35-0658-4D0F-AAE9-148BAA63A9DA} = {7B1913BE-B7CA-4E2A-8424-1F87762E127C} + {6420F7C7-0D7E-497E-954A-E461AB865F02} = {7B1913BE-B7CA-4E2A-8424-1F87762E127C} + {6CFD3178-8518-4540-B930-A77789F6F78C} = {7B1913BE-B7CA-4E2A-8424-1F87762E127C} + {28F1902D-10BF-4554-B9B1-9CB7680DBBB3} = {7B1913BE-B7CA-4E2A-8424-1F87762E127C} + {9B715372-3E94-4978-8EB6-FE9CDBBF3CA4} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {91926D87-BF3F-4542-AEF2-D9B082AA9A6D} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {B7049A58-B852-4771-ADCD-B18F5B4DEF3B} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {C7D17E3A-A7BF-4F89-94A5-791FD6AB3FCF} = {91B9D95C-F877-472E-AF3E-4B660816D828} + {D1C909F1-9412-4889-B4A1-A102E4B7CA34} = {91B9D95C-F877-472E-AF3E-4B660816D828} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} diff --git a/modules/cms-kit/host/Dignite.CmsKit.AuthServer/CmsKitAuthServerModule.cs b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/CmsKitAuthServerModule.cs index d2fd63e9..a25d24a0 100644 --- a/modules/cms-kit/host/Dignite.CmsKit.AuthServer/CmsKitAuthServerModule.cs +++ b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/CmsKitAuthServerModule.cs @@ -47,7 +47,6 @@ using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement.EntityFrameworkCore; using Volo.Abp.UI.Navigation.Urls; -using Dignite.CmsKit.Public; namespace Dignite.CmsKit; @@ -79,7 +78,7 @@ namespace Dignite.CmsKit; typeof(AbpTenantManagementEntityFrameworkCoreModule), typeof(AbpTenantManagementApplicationModule), typeof(AbpTenantManagementHttpApiModule), - typeof(DigniteCmsKitPublicApplicationContractsModule), + typeof(DigniteCmsKitApplicationContractsModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpSwashbuckleModule) )] diff --git a/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.Designer.cs b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.Designer.cs new file mode 100644 index 00000000..62a8a192 --- /dev/null +++ b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.Designer.cs @@ -0,0 +1,1959 @@ +// +using System; +using Dignite.CmsKit.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Dignite.CmsKit.Migrations +{ + [DbContext(typeof(AuthServerDbContext))] + [Migration("20241209061800_UpgradeToV831")] + partial class UpgradeToV831 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("nvarchar(max)"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IpAddresses") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("LastAccessed") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetimeoffset"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("bit"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientUri") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("nvarchar(max)"); + + b.Property("Permissions") + .HasColumnType("nvarchar(max)"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Requirements") + .HasColumnType("nvarchar(max)"); + + b.Property("Settings") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Scopes") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Descriptions") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Resources") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationId") + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorizationId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedemptionDate") + .HasColumnType("datetime2"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("bit"); + + b.Property("IsInherited") + .HasColumnType("bit"); + + b.Property("IsVisibleToClients") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.cs b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.cs new file mode 100644 index 00000000..9aba9434 --- /dev/null +++ b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/20241209061800_UpgradeToV831.cs @@ -0,0 +1,625 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Dignite.CmsKit.Migrations +{ + /// + public partial class UpgradeToV831 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Type", + table: "OpenIddictApplications", + newName: "ClientType"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictTokens", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictTokens", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictScopes", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictScopes", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictAuthorizations", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictAuthorizations", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictApplications", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictApplications", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AddColumn( + name: "ApplicationType", + table: "OpenIddictApplications", + type: "nvarchar(50)", + maxLength: 50, + nullable: true); + + migrationBuilder.AddColumn( + name: "JsonWebKeySet", + table: "OpenIddictApplications", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "Settings", + table: "OpenIddictApplications", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpUsers", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpUsers", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpTenants", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpTenants", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AddColumn( + name: "NormalizedName", + table: "AbpTenants", + type: "nvarchar(64)", + maxLength: 64, + nullable: false, + defaultValue: ""); + + migrationBuilder.AlterColumn( + name: "Providers", + table: "AbpSettingDefinitions", + type: "nvarchar(1024)", + maxLength: 1024, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(128)", + oldMaxLength: 128, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DefaultValue", + table: "AbpSettingDefinitions", + type: "nvarchar(2048)", + maxLength: 2048, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(256)", + oldMaxLength: 256, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpSecurityLogs", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpSecurityLogs", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpRoles", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpRoles", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpOrganizationUnits", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpOrganizationUnits", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "EntityId", + table: "AbpEntityChanges", + type: "nvarchar(128)", + maxLength: 128, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(128)", + oldMaxLength: 128); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpClaimTypes", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpClaimTypes", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpAuditLogs", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpAuditLogs", + type: "nvarchar(40)", + maxLength: 40, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.CreateTable( + name: "AbpSessions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SessionId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Device = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + DeviceInfo = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IpAddresses = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SignedIn = table.Column(type: "datetime2", nullable: false), + LastAccessed = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSessions", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_Device", + table: "AbpSessions", + column: "Device"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_SessionId", + table: "AbpSessions", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_TenantId_UserId", + table: "AbpSessions", + columns: new[] { "TenantId", "UserId" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpSessions"); + + migrationBuilder.DropIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants"); + + migrationBuilder.DropColumn( + name: "ApplicationType", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "JsonWebKeySet", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "Settings", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "NormalizedName", + table: "AbpTenants"); + + migrationBuilder.RenameColumn( + name: "ClientType", + table: "OpenIddictApplications", + newName: "Type"); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictTokens", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictTokens", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictScopes", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictScopes", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictAuthorizations", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictAuthorizations", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "OpenIddictApplications", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "OpenIddictApplications", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpUsers", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpUsers", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpTenants", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpTenants", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "Providers", + table: "AbpSettingDefinitions", + type: "nvarchar(128)", + maxLength: 128, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(1024)", + oldMaxLength: 1024, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DefaultValue", + table: "AbpSettingDefinitions", + type: "nvarchar(256)", + maxLength: 256, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(2048)", + oldMaxLength: 2048, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpSecurityLogs", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpSecurityLogs", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpRoles", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpRoles", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpOrganizationUnits", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpOrganizationUnits", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "EntityId", + table: "AbpEntityChanges", + type: "nvarchar(128)", + maxLength: 128, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(128)", + oldMaxLength: 128, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpClaimTypes", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpClaimTypes", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + + migrationBuilder.AlterColumn( + name: "ExtraProperties", + table: "AbpAuditLogs", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ConcurrencyStamp", + table: "AbpAuditLogs", + type: "nvarchar(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(40)", + oldMaxLength: 40); + } + } +} diff --git a/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs index 67d6fbb6..f833a7ed 100644 --- a/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Dignite.CmsKit.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs @@ -1,10 +1,10 @@ // using System; +using Dignite.CmsKit.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Dignite.CmsKit.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; #nullable disable @@ -19,7 +19,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "7.0.1") + .HasAnnotation("ProductVersion", "8.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -62,6 +62,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -82,6 +83,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime2"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -213,7 +215,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnName("ChangeType"); b.Property("EntityId") - .IsRequired() .HasMaxLength(128) .HasColumnType("nvarchar(128)") .HasColumnName("EntityId"); @@ -416,6 +417,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -425,6 +427,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(256)"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -490,6 +493,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -498,6 +502,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -590,6 +595,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -602,6 +608,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime2"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -637,6 +644,58 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("AbpSecurityLogs", (string)null); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IpAddresses") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("LastAccessed") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") @@ -651,6 +710,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -687,6 +747,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -971,6 +1032,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -1001,6 +1063,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -1067,6 +1130,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + b.Property("ClientId") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); @@ -1074,11 +1141,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ClientSecret") .HasColumnType("nvarchar(max)"); + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + b.Property("ClientUri") .HasColumnType("nvarchar(max)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -1110,6 +1182,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -1119,6 +1192,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("JsonWebKeySet") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -1145,9 +1221,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Requirements") .HasColumnType("nvarchar(max)"); - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Settings") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); @@ -1167,6 +1242,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -1191,6 +1267,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnName("DeletionTime"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -1241,6 +1318,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -1274,6 +1352,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -1322,6 +1401,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -1349,6 +1429,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime2"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -1557,8 +1638,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("uniqueidentifier"); b.Property("DefaultValue") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property("Description") .HasMaxLength(512) @@ -1588,8 +1669,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(128)"); b.Property("Providers") - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.HasKey("Id"); @@ -1607,6 +1688,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ConcurrencyStamp") .IsConcurrencyToken() + .IsRequired() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); @@ -1631,6 +1713,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("ExtraProperties") + .IsRequired() .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -1653,10 +1736,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Name"); + b.HasIndex("NormalizedName"); + b.ToTable("AbpTenants", (string)null); }); diff --git a/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs index edce379d..612e79c3 100644 --- a/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs +++ b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs @@ -4,7 +4,6 @@ using System.Linq; using Dignite.CmsKit.EntityFrameworkCore; using Dignite.CmsKit.MultiTenancy; -using Dignite.CmsKit.Public; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; @@ -34,9 +33,9 @@ namespace Dignite.CmsKit; [DependsOn( - typeof(DigniteCmsKitPublicApplicationModule), + typeof(DigniteCmsKitApplicationModule), typeof(DigniteCmsKitEntityFrameworkCoreModule), - typeof(DigniteCmsKitPublicHttpApiModule), + typeof(DigniteCmsKitHttpApiModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAutofacModule), typeof(AbpCachingStackExchangeRedisModule), @@ -76,8 +75,8 @@ public override void ConfigureServices(ServiceConfigurationContext context) { options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Dignite.CmsKit.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Dignite.CmsKit.Domain", Path.DirectorySeparatorChar))); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Dignite.CmsKit.Application.Contracts", Path.DirectorySeparatorChar))); - options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Dignite.CmsKit.Application", Path.DirectorySeparatorChar))); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Dignite.CmsKit.Application.Contracts", Path.DirectorySeparatorChar))); + options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Dignite.CmsKit.Application", Path.DirectorySeparatorChar))); }); } diff --git a/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.Designer.cs b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.Designer.cs new file mode 100644 index 00000000..9b462a0a --- /dev/null +++ b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.Designer.cs @@ -0,0 +1,1115 @@ +// +using System; +using Dignite.CmsKit.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Dignite.CmsKit.Migrations +{ + [DbContext(typeof(CmsKitHttpApiHostMigrationsDbContext))] + [Migration("20241209011447_AddFileExplorerModule")] + partial class AddFileExplorerModule + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Dignite.CmsKit.Visits.Visit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BrowserInfo") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientIpAddress") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeviceInfo") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Duration") + .HasColumnType("int"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "CreatorId", "EntityId", "CreationTime"); + + b.ToTable("CmsVisits", (string)null); + }); + + modelBuilder.Entity("Dignite.FileExplorer.Directories.DirectoryDescriptor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ContainerName", "CreatorId", "ParentId"); + + b.ToTable("FepDirectoryDescriptors", (string)null); + }); + + modelBuilder.Entity("Dignite.FileExplorer.Files.FileDescriptor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlobName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("BlobName"); + + b.Property("CellName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerName"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DirectoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Md5") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnName("Md5"); + + b.Property("MimeType") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MimeType"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("Name"); + + b.Property("ReferBlobName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ReferBlobName"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ContainerName", "BlobName"); + + b.HasIndex("TenantId", "ContainerName", "CreationTime", "CreatorId", "DirectoryId"); + + b.ToTable("FepFileDescriptors", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.Blog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsBlogs", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogFeature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeatureName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("CmsBlogFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuthorId") + .HasColumnType("uniqueidentifier"); + + b.Property("BlogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.Property("CoverImageMediaId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ShortDescription") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorId"); + + b.HasIndex("Slug", "BlogId"); + + b.ToTable("CmsBlogPosts", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IdempotencyToken") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("IsApproved") + .HasColumnType("bit"); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Url") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.GlobalResources.GlobalResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("CmsGlobalResources", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.MarkedItems.UserMarkedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("EntityType") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId"); + + b.ToTable("CmsUserMarkedItems", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MimeType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Size") + .HasMaxLength(2147483647) + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("CmsMediaDescriptors", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CssClass") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ElementId") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Icon") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("PageId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Target") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.ToTable("CmsMenuItems", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Pages.Page", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHomePage") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Script") + .HasColumnType("nvarchar(max)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Style") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Slug"); + + b.ToTable("CmsPages", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReactionName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers", (string)null); + }); + + modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => + { + b.HasOne("Volo.CmsKit.Users.CmsUser", "Author") + .WithMany() + .HasForeignKey("AuthorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Author"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.cs b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.cs new file mode 100644 index 00000000..e5f149bd --- /dev/null +++ b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/20241209011447_AddFileExplorerModule.cs @@ -0,0 +1,91 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Dignite.CmsKit.Migrations +{ + /// + public partial class AddFileExplorerModule : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "FepDirectoryDescriptors", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ContainerName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Order = table.Column(type: "int", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FepDirectoryDescriptors", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "FepFileDescriptors", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + CellName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + DirectoryId = table.Column(type: "uniqueidentifier", nullable: true), + EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false), + ContainerName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + BlobName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Size = table.Column(type: "bigint", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + MimeType = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Md5 = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), + ReferBlobName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FepFileDescriptors", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_FepDirectoryDescriptors_TenantId_ContainerName_CreatorId_ParentId", + table: "FepDirectoryDescriptors", + columns: new[] { "TenantId", "ContainerName", "CreatorId", "ParentId" }); + + migrationBuilder.CreateIndex( + name: "IX_FepFileDescriptors_TenantId_ContainerName_BlobName", + table: "FepFileDescriptors", + columns: new[] { "TenantId", "ContainerName", "BlobName" }); + + migrationBuilder.CreateIndex( + name: "IX_FepFileDescriptors_TenantId_ContainerName_CreationTime_CreatorId_DirectoryId", + table: "FepFileDescriptors", + columns: new[] { "TenantId", "ContainerName", "CreationTime", "CreatorId", "DirectoryId" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "FepDirectoryDescriptors"); + + migrationBuilder.DropTable( + name: "FepFileDescriptors"); + } + } +} diff --git a/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/CmsKitHttpApiHostMigrationsDbContextModelSnapshot.cs b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/CmsKitHttpApiHostMigrationsDbContextModelSnapshot.cs index 218c275b..8dcab85d 100644 --- a/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/CmsKitHttpApiHostMigrationsDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Dignite.CmsKit.HttpApi.Host/Migrations/CmsKitHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -76,6 +76,166 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("CmsVisits", (string)null); }); + modelBuilder.Entity("Dignite.FileExplorer.Directories.DirectoryDescriptor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ContainerName", "CreatorId", "ParentId"); + + b.ToTable("FepDirectoryDescriptors", (string)null); + }); + + modelBuilder.Entity("Dignite.FileExplorer.Files.FileDescriptor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BlobName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("BlobName"); + + b.Property("CellName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerName"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DirectoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Md5") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)") + .HasColumnName("Md5"); + + b.Property("MimeType") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MimeType"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("Name"); + + b.Property("ReferBlobName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ReferBlobName"); + + b.Property("Size") + .HasColumnType("bigint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ContainerName", "BlobName"); + + b.HasIndex("TenantId", "ContainerName", "CreationTime", "CreatorId", "DirectoryId"); + + b.ToTable("FepFileDescriptors", (string)null); + }); + modelBuilder.Entity("Volo.CmsKit.Blogs.Blog", b => { b.Property("Id") diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.abppkg new file mode 100644 index 00000000..49032794 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application-contracts" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.csproj b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.csproj new file mode 100644 index 00000000..611e6666 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite.CmsKit.Admin.Application.Contracts.csproj @@ -0,0 +1,18 @@ + + + + + + + netstandard2.0;netstandard2.1;net8.0 + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/IBrandAdminAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/IBrandAdminAppService.cs new file mode 100644 index 00000000..87da2108 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/IBrandAdminAppService.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Dignite.CmsKit.Admin.Brand; + +public interface IBrandAdminAppService +{ + Task UpdateAsync(UpdateBrandInput input); +} + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/UpdateBrandInput.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/UpdateBrandInput.cs new file mode 100644 index 00000000..2628379f --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/Brand/UpdateBrandInput.cs @@ -0,0 +1,31 @@ +using System.ComponentModel.DataAnnotations; + +namespace Dignite.CmsKit.Admin.Brand; + +public class UpdateBrandInput +{ + /// + /// Name of the site + /// + [Required] + [MaxLength(32)] + public string Name { get; set; } + + /// + /// + /// + [MaxLength(128)] + public string? LogoBlobName { get; set; } + + /// + /// + /// + [MaxLength(128)] + public string? LogoReverseBlobName { get; set; } + + /// + /// + /// + [MaxLength(128)] + public string? IconBlobName { get; set; } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/CmsKitAdminRemoteServiceConsts.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/CmsKitAdminRemoteServiceConsts.cs new file mode 100644 index 00000000..1c2d7ecc --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/CmsKitAdminRemoteServiceConsts.cs @@ -0,0 +1,8 @@ +namespace Dignite.CmsKit.Admin; + +public class CmsKitAdminRemoteServiceConsts +{ + public const string RemoteServiceName = "DigniteCmsKitAdmin"; + + public const string ModuleName = "dignite-cms-kit-admin"; +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationContractsModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationContractsModule.cs new file mode 100644 index 00000000..e1710160 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationContractsModule.cs @@ -0,0 +1,16 @@ +using Dignite.FileExplorer; +using Volo.Abp.Modularity; +using Volo.CmsKit.Admin; + +namespace Dignite.CmsKit.Admin; + +[DependsOn( + typeof(DigniteCmsKitDomainSharedModule), + typeof(CmsKitAdminApplicationContractsModule), + typeof(DigniteCmsKitCommonApplicationContractsModule), + typeof(FileExplorerApplicationContractsModule) + )] +public class DigniteCmsKitAdminApplicationContractsModule : AbpModule +{ + +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs new file mode 100644 index 00000000..5123fb38 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs @@ -0,0 +1,21 @@ +using Dignite.CmsKit.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; + +namespace Dignite.CmsKit.Permissions; + +public class CmsKitAdminPermissionDefinitionProvider : PermissionDefinitionProvider +{ + public override void Define(IPermissionDefinitionContext context) + { + var cmsGroup = context.GetGroupOrNull(CmsKitAdminPermissions.GroupName) ?? context.AddGroup(CmsKitAdminPermissions.GroupName, L("Permission:CmsKit")); + + var brandGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Brand.Default, L("Permission:Brand")); + brandGroup.AddChild(CmsKitAdminPermissions.Brand.Update, L("Permission:Brand.Update")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissions.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissions.cs new file mode 100644 index 00000000..7830ac9c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitAdminPermissions.cs @@ -0,0 +1,12 @@ +namespace Dignite.CmsKit.Permissions; + +public static class CmsKitAdminPermissions +{ + public const string GroupName = "CmsKitAdmin"; + + public static class Brand + { + public const string Default = GroupName + ".Brand"; + public const string Update = Default + ".Update"; + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.abppkg new file mode 100644 index 00000000..412567ac --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.csproj b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.csproj new file mode 100644 index 00000000..60b087e2 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite.CmsKit.Admin.Application.csproj @@ -0,0 +1,19 @@ + + + + + + + net8.0 + + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/Brand/BrandAdminAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/Brand/BrandAdminAppService.cs new file mode 100644 index 00000000..a87d7525 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/Brand/BrandAdminAppService.cs @@ -0,0 +1,29 @@ +using System.Threading.Tasks; +using Dignite.CmsKit.Permissions; +using Dignite.CmsKit.Settings; +using Microsoft.AspNetCore.Authorization; +using Volo.Abp.SettingManagement; + +namespace Dignite.CmsKit.Admin.Brand; + +[Authorize(CmsKitAdminPermissions.Brand.Default)] +public class BrandAdminAppService : CmsKitAdminAppServiceBase, IBrandAdminAppService +{ + protected readonly ISettingManager SettingManager; + + public BrandAdminAppService(ISettingManager settingManager) + { + SettingManager = settingManager; + } + + + [Authorize(CmsKitAdminPermissions.Brand.Update)] + public async Task UpdateAsync(UpdateBrandInput input) + { + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, CmsKitSettings.BrandName, input.Name); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, CmsKitSettings.BrandLogo, input.LogoBlobName); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, CmsKitSettings.BrandLogoReverse, input.LogoReverseBlobName); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, CmsKitSettings.BrandIcon, input.IconBlobName); + } +} + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminAppServiceBase.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminAppServiceBase.cs new file mode 100644 index 00000000..e862f3ec --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminAppServiceBase.cs @@ -0,0 +1,13 @@ +using Dignite.CmsKit.Localization; +using Volo.Abp.Application.Services; + +namespace Dignite.CmsKit.Admin; + +public abstract class CmsKitAdminAppServiceBase : ApplicationService +{ + protected CmsKitAdminAppServiceBase() + { + LocalizationResource = typeof(DigniteCmsKitResource); + ObjectMapperContext = typeof(DigniteCmsKitAdminApplicationModule); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..a111d9e8 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; + +namespace Dignite.CmsKit.Admin; + +public class CmsKitAdminApplicationAutoMapperProfile : Profile +{ + public CmsKitAdminApplicationAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationModule.cs new file mode 100644 index 00000000..a9bea86e --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/Dignite/CmsKit/Admin/DigniteCmsKitAdminApplicationModule.cs @@ -0,0 +1,105 @@ +using Dignite.CmsKit.BlobStoring; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.BlobStoring; +using Volo.Abp.Modularity; +using Volo.CmsKit.Admin; +using Dignite.Abp.BlobStoring; +using Dignite.CmsKit.Permissions; +using Dignite.FileExplorer; + +namespace Dignite.CmsKit.Admin; + +[DependsOn( + typeof(DigniteCmsKitDomainModule), + typeof(DigniteCmsKitAdminApplicationContractsModule), + typeof(CmsKitAdminApplicationModule), + typeof(DigniteCmsKitCommonApplicationModule), + typeof(FileExplorerApplicationModule) + )] +public class DigniteCmsKitAdminApplicationModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + + + Configure(options => + { + options.Containers + .Configure(container => + { + container.SetBlobNameGenerator(); + container.AddFileSizeLimitHandler(handler => + { + handler.MaxFileSize = 1024; + }); + container.AddFileTypeCheckHandler(handler => + { + handler.AllowedFileTypeNames = [".jpg", ".jpeg", ".png", ".webp"]; + }); + container.AddImageResizeHandler(handler => + { + handler.ImageWidth = 300; + handler.ImageHeight = 300; + }); + container.SetAuthorizationConfiguration(config => + { + config.CreateFilePermissionName = CmsKitAdminPermissions.Brand.Update; + config.UpdateFilePermissionName = CmsKitAdminPermissions.Brand.Update; + config.DeleteFilePermissionName = CmsKitAdminPermissions.Brand.Update; + }); + }) + .Configure(container => + { + container.SetBlobNameGenerator(); + container.AddFileSizeLimitHandler(handler => + { + handler.MaxFileSize = 1024; + }); + container.AddFileTypeCheckHandler(handler => + { + handler.AllowedFileTypeNames = [".jpg", ".jpeg", ".png", ".webp"]; + }); + container.AddImageResizeHandler(handler => + { + handler.ImageWidth = 300; + handler.ImageHeight = 300; + }); + container.SetAuthorizationConfiguration(config => + { + config.CreateFilePermissionName = CmsKitAdminPermissions.Brand.Update; + config.UpdateFilePermissionName = CmsKitAdminPermissions.Brand.Update; + config.DeleteFilePermissionName = CmsKitAdminPermissions.Brand.Update; + }); + }) + .Configure(container => + { + container.SetBlobNameGenerator(); + container.AddFileSizeLimitHandler(handler => + { + handler.MaxFileSize = 1024; + }); + container.AddFileTypeCheckHandler(handler => + { + handler.AllowedFileTypeNames = [".jpg", ".jpeg", ".png", ".webp", ".ico"]; + }); + container.AddImageResizeHandler(handler => + { + handler.ImageWidth = 300; + handler.ImageHeight = 300; + }); + container.SetAuthorizationConfiguration(config => + { + config.CreateFilePermissionName = CmsKitAdminPermissions.Brand.Update; + config.UpdateFilePermissionName = CmsKitAdminPermissions.Brand.Update; + config.DeleteFilePermissionName = CmsKitAdminPermissions.Brand.Update; + }); + }); + }); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.abppkg new file mode 100644 index 00000000..515bfe64 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.csproj b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.csproj new file mode 100644 index 00000000..4c9d9e6c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite.CmsKit.Admin.HttpApi.csproj @@ -0,0 +1,18 @@ + + + + + + + net8.0 + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/Brand/BrandAdminController.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/Brand/BrandAdminController.cs new file mode 100644 index 00000000..66502988 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/Brand/BrandAdminController.cs @@ -0,0 +1,24 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; + +namespace Dignite.CmsKit.Admin.Brand; + +[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] +[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] +[Route("api/cms-kit/admin/brand")] +public class BrandAdminController : CmsKitAdminControllerBase, IBrandAdminAppService +{ + public BrandAdminController(IBrandAdminAppService brandAdminAppService) + { + BrandAdminAppService = brandAdminAppService; + } + + protected IBrandAdminAppService BrandAdminAppService { get; } + + [HttpPut] + public async Task UpdateAsync(UpdateBrandInput input) + { + await BrandAdminAppService.UpdateAsync(input); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/CmsKitAdminControllerBase.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/CmsKitAdminControllerBase.cs new file mode 100644 index 00000000..b1353939 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/CmsKitAdminControllerBase.cs @@ -0,0 +1,12 @@ +using Dignite.CmsKit.Localization; +using Volo.Abp.AspNetCore.Mvc; + +namespace Dignite.CmsKit.Admin; + +public abstract class CmsKitAdminControllerBase : AbpControllerBase +{ + protected CmsKitAdminControllerBase() + { + LocalizationResource = typeof(DigniteCmsKitResource); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/DigniteCmsKitAdminHttpApiModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/DigniteCmsKitAdminHttpApiModule.cs new file mode 100644 index 00000000..c1387a0c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/Dignite/CmsKit/Admin/DigniteCmsKitAdminHttpApiModule.cs @@ -0,0 +1,35 @@ +using Dignite.CmsKit.Localization; +using Dignite.FileExplorer; +using Localization.Resources.AbpUi; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.CmsKit.Admin; + +namespace Dignite.CmsKit.Admin; + +[DependsOn( + typeof(DigniteCmsKitAdminApplicationContractsModule), + typeof(CmsKitAdminHttpApiModule), + typeof(DigniteCmsKitCommonHttpApiModule), + typeof(FileExplorerHttpApiModule))] +public class DigniteCmsKitAdminHttpApiModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(DigniteCmsKitAdminHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Admin.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite.CmsKit.Application.Contracts.csproj b/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite.CmsKit.Application.Contracts.csproj index d35c930e..fa19f952 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite.CmsKit.Application.Contracts.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite.CmsKit.Application.Contracts.csproj @@ -9,8 +9,10 @@ - + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/DigniteCmsKitApplicationContractsModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/DigniteCmsKitApplicationContractsModule.cs new file mode 100644 index 00000000..33a3c37a --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/DigniteCmsKitApplicationContractsModule.cs @@ -0,0 +1,17 @@ +using Dignite.CmsKit.Admin; +using Dignite.CmsKit.Public; +using Volo.Abp.Modularity; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitDomainSharedModule), + typeof(DigniteCmsKitPublicApplicationContractsModule), + typeof(DigniteCmsKitAdminApplicationContractsModule), + typeof(CmsKitApplicationContractsModule) + )] +public class DigniteCmsKitApplicationContractsModule : AbpModule +{ + +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissionDefinitionProvider.cs b/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissionDefinitionProvider.cs deleted file mode 100644 index 69022b43..00000000 --- a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissionDefinitionProvider.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Volo.Abp.Authorization.Permissions; -using Volo.Abp.Localization; -using Dignite.CmsKit.Localization; - -namespace Dignite.CmsKit.Permissions; - -public class CmsKitPermissionDefinitionProvider : PermissionDefinitionProvider -{ - public override void Define(IPermissionDefinitionContext context) - { - var myGroup = context.AddGroup(CmsKitPermissions.GroupName, L("Permission:CmsKit")); - } - - private static LocalizableString L(string name) - { - return LocalizableString.Create(name); - } -} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissions.cs b/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissions.cs deleted file mode 100644 index 594bc2e6..00000000 --- a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Permissions/CmsKitPermissions.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Reflection; - -namespace Dignite.CmsKit.Permissions; - -public class CmsKitPermissions -{ - public const string GroupName = "DigniteCmsKit"; - - public static string[] GetAll() - { - return ReflectionHelper.GetPublicConstantsRecursively(typeof(CmsKitPermissions)); - } -} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs deleted file mode 100644 index d94cbc9e..00000000 --- a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.Modularity; -using Volo.CmsKit.Public; - -namespace Dignite.CmsKit.Public; - -[DependsOn( - typeof(DigniteCmsKitDomainSharedModule), - typeof(CmsKitPublicApplicationContractsModule) - )] -public class DigniteCmsKitPublicApplicationContractsModule : AbpModule -{ - -} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite.CmsKit.Application.csproj b/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite.CmsKit.Application.csproj index 7b57cd7b..be28909f 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite.CmsKit.Application.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite.CmsKit.Application.csproj @@ -5,13 +5,14 @@ net8.0 - + - + + - + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/DigniteCmsKitApplicationModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/DigniteCmsKitApplicationModule.cs new file mode 100644 index 00000000..94b93f58 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/DigniteCmsKitApplicationModule.cs @@ -0,0 +1,16 @@ +using Dignite.CmsKit.Admin; +using Dignite.CmsKit.Public; +using Volo.Abp.Modularity; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitApplicationContractsModule), + typeof(DigniteCmsKitAdminApplicationModule), + typeof(DigniteCmsKitPublicApplicationModule), + typeof(CmsKitApplicationModule) + )] +public class DigniteCmsKitApplicationModule : AbpModule +{ +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.abppkg new file mode 100644 index 00000000..49032794 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application-contracts" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.csproj b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.csproj new file mode 100644 index 00000000..c777a7de --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite.CmsKit.Common.Application.Contracts.csproj @@ -0,0 +1,16 @@ + + + + + + + netstandard2.0;netstandard2.1;net8.0 + + + + + + + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/BrandDto.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/BrandDto.cs new file mode 100644 index 00000000..6c3346e2 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/BrandDto.cs @@ -0,0 +1,36 @@ +namespace Dignite.CmsKit.Brand +{ + public class BrandDto + { + public BrandDto() + { + } + + public BrandDto(string name, string logo, string logoReverse, string icon) + { + Name = name; + Logo = logo; + LogoReverse = logoReverse; + Icon = icon; + } + + + /// + /// Name of the brand + /// + public string Name { get; set; } + + /// + /// Logo of the brand + /// + public string? Logo { get; set; } + + /// + /// LogoReverse of the brand + /// + public string? LogoReverse { get; set; } + + public string? Icon { get; set; } + } +} + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/IBrandAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/IBrandAppService.cs new file mode 100644 index 00000000..892a39aa --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/Brand/IBrandAppService.cs @@ -0,0 +1,8 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Dignite.CmsKit.Brand; +public interface IBrandAppService: IApplicationService +{ + Task GetAsync(); +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/CmsKitCommonRemoteServiceConsts.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/CmsKitCommonRemoteServiceConsts.cs new file mode 100644 index 00000000..6d4de377 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/CmsKitCommonRemoteServiceConsts.cs @@ -0,0 +1,8 @@ +namespace Dignite.CmsKit; + +public class CmsKitCommonRemoteServiceConsts +{ + public const string RemoteServiceName = "DigniteCmsKitCommon"; + + public const string ModuleName = "dignite-cms-kit-common"; +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/DigniteCmsKitCommonApplicationContractsModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/DigniteCmsKitCommonApplicationContractsModule.cs new file mode 100644 index 00000000..cbae1347 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/Dignite/CmsKit/DigniteCmsKitCommonApplicationContractsModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Modularity; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitDomainSharedModule), + typeof(CmsKitCommonApplicationContractsModule) + )] +public class DigniteCmsKitCommonApplicationContractsModule : AbpModule +{ + +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.abppkg new file mode 100644 index 00000000..412567ac --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.csproj b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.csproj new file mode 100644 index 00000000..7a5a886c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite.CmsKit.Common.Application.csproj @@ -0,0 +1,17 @@ + + + + + + + net8.0 + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/Brand/BrandAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/Brand/BrandAppService.cs new file mode 100644 index 00000000..e491d95b --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/Brand/BrandAppService.cs @@ -0,0 +1,16 @@ +using System.Threading.Tasks; +using Dignite.CmsKit.Settings; + +namespace Dignite.CmsKit.Brand; +public class BrandAppService : CmsKitCommonAppServiceBase, IBrandAppService +{ + public async Task GetAsync() + { + var brandName = await SettingProvider.GetOrNullAsync(CmsKitSettings.BrandName); + var brandLogo = await SettingProvider.GetOrNullAsync(CmsKitSettings.BrandLogo); + var brandLogoReverse = await SettingProvider.GetOrNullAsync(CmsKitSettings.BrandLogoReverse); + var brandIcon = await SettingProvider.GetOrNullAsync(CmsKitSettings.BrandIcon); + + return new BrandDto(brandName, brandLogo, brandLogoReverse, brandIcon); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonAppServiceBase.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonAppServiceBase.cs new file mode 100644 index 00000000..30fe7f48 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonAppServiceBase.cs @@ -0,0 +1,13 @@ +using Dignite.CmsKit.Localization; +using Volo.Abp.Application.Services; + +namespace Dignite.CmsKit; + +public abstract class CmsKitCommonAppServiceBase : ApplicationService +{ + protected CmsKitCommonAppServiceBase() + { + LocalizationResource = typeof(DigniteCmsKitResource); + ObjectMapperContext = typeof(DigniteCmsKitCommonApplicationModule); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..b77c52b2 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; + +namespace Dignite.CmsKit; + +public class CmsKitCommonApplicationAutoMapperProfile : Profile +{ + public CmsKitCommonApplicationAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/DigniteCmsKitCommonApplicationModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/DigniteCmsKitCommonApplicationModule.cs new file mode 100644 index 00000000..ad2aff5e --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/Dignite/CmsKit/DigniteCmsKitCommonApplicationModule.cs @@ -0,0 +1,23 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitDomainModule), + typeof(DigniteCmsKitCommonApplicationContractsModule), + typeof(CmsKitCommonApplicationModule) + )] +public class DigniteCmsKitCommonApplicationModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Application/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.Generated.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.Generated.cs new file mode 100644 index 00000000..7ad8d4bb --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.Generated.cs @@ -0,0 +1,24 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using Dignite.CmsKit.Brand; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Http.Modeling; + +// ReSharper disable once CheckNamespace +namespace Dignite.CmsKit.Brand; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(IBrandAppService), typeof(BrandClientProxy))] +public partial class BrandClientProxy : ClientProxyBase, IBrandAppService +{ + public virtual async Task GetAsync() + { + return await RequestAsync(nameof(GetAsync)); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.cs new file mode 100644 index 00000000..4241d534 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/Dignite/CmsKit/Brand/BrandClientProxy.cs @@ -0,0 +1,7 @@ +// This file is part of BrandClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace Dignite.CmsKit.Brand; + +public partial class BrandClientProxy +{ +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/dignite-cms-kit-common-generate-proxy.json b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/dignite-cms-kit-common-generate-proxy.json new file mode 100644 index 00000000..dc54d8a9 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/ClientProxies/dignite-cms-kit-common-generate-proxy.json @@ -0,0 +1,52 @@ +{ + "modules": { + "dignite-cms-kit-common": { + "rootPath": "dignite-cms-kit-common", + "remoteServiceName": "DigniteCmsKitCommon", + "controllers": { + "Dignite.CmsKit.Brand.BrandController": { + "controllerName": "Brand", + "controllerGroupName": "Brand", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Dignite.CmsKit.Brand.BrandController", + "interfaces": [ + { + "type": "Dignite.CmsKit.Brand.IBrandAppService", + "name": "IBrandAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Dignite.CmsKit.Brand.BrandDto", + "typeSimple": "Dignite.CmsKit.Brand.BrandDto" + } + } + ] + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/cms-kit/brand", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Dignite.CmsKit.Brand.BrandDto", + "typeSimple": "Dignite.CmsKit.Brand.BrandDto" + }, + "allowAnonymous": null, + "implementFrom": "Dignite.CmsKit.Brand.IBrandAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.abppkg new file mode 100644 index 00000000..7deef5e3 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api-client" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.csproj b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.csproj new file mode 100644 index 00000000..8c28dfb7 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite.CmsKit.Common.HttpApi.Client.csproj @@ -0,0 +1,21 @@ + + + + + + + netstandard2.0;netstandard2.1;net8.0 + + + + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitCommonHttpApiClientModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitCommonHttpApiClientModule.cs new file mode 100644 index 00000000..421fc7b5 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitCommonHttpApiClientModule.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitCommonApplicationContractsModule), + typeof(CmsKitCommonHttpApiClientModule))] +public class DigniteCmsKitCommonHttpApiClientModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies( + typeof(DigniteCmsKitCommonApplicationContractsModule).Assembly, + CmsKitCommonRemoteServiceConsts.RemoteServiceName + ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.abppkg new file mode 100644 index 00000000..515bfe64 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.csproj b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.csproj new file mode 100644 index 00000000..abbb5165 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite.CmsKit.Common.HttpApi.csproj @@ -0,0 +1,16 @@ + + + + + + + net8.0 + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/Brand/BrandController.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/Brand/BrandController.cs new file mode 100644 index 00000000..08c65a35 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/Brand/BrandController.cs @@ -0,0 +1,24 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; + +namespace Dignite.CmsKit.Brand; + +[RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] +[Area(CmsKitCommonRemoteServiceConsts.ModuleName)] +[Route("api/cms-kit/brand")] +public class BrandController : CmsKitCommonControllerBase, IBrandAppService +{ + public BrandController(IBrandAppService brandPublicAppService) + { + BrandPublicAppService = brandPublicAppService; + } + + public IBrandAppService BrandPublicAppService { get; } + + [HttpGet] + public async Task GetAsync() + { + return await BrandPublicAppService.GetAsync(); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/CmsKitCommonControllerBase.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/CmsKitCommonControllerBase.cs new file mode 100644 index 00000000..6a086b90 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/CmsKitCommonControllerBase.cs @@ -0,0 +1,12 @@ +using Dignite.CmsKit.Localization; +using Volo.Abp.AspNetCore.Mvc; + +namespace Dignite.CmsKit; + +public abstract class CmsKitCommonControllerBase : AbpControllerBase +{ + protected CmsKitCommonControllerBase() + { + LocalizationResource = typeof(DigniteCmsKitResource); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/DigniteCmsKitCommonHttpApiModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/DigniteCmsKitCommonHttpApiModule.cs new file mode 100644 index 00000000..52d798fa --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/Dignite/CmsKit/DigniteCmsKitCommonHttpApiModule.cs @@ -0,0 +1,32 @@ +using Dignite.CmsKit.Localization; +using Localization.Resources.AbpUi; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitCommonApplicationContractsModule), + typeof(CmsKitCommonHttpApiModule))] +public class DigniteCmsKitCommonHttpApiModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(DigniteCmsKitCommonHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Web/CmsKitCommonWebAutoMapperProfile.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/CmsKitCommonWebAutoMapperProfile.cs new file mode 100644 index 00000000..d1ddb7f6 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/CmsKitCommonWebAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; + +namespace Dignite.CmsKit.Common.Web; + +public class CmsKitCommonWebAutoMapperProfile : Profile +{ + public CmsKitCommonWebAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.abppkg new file mode 100644 index 00000000..930c4018 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.mvc" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.csproj b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.csproj new file mode 100644 index 00000000..09ba3a3e --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Dignite.CmsKit.Common.Web.csproj @@ -0,0 +1,35 @@ + + + + + + net8.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + true + Library + Dignite.CmsKit.Common.Web + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Web/DigniteCmsKitCommonWebModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/DigniteCmsKitCommonWebModule.cs new file mode 100644 index 00000000..4cd80f63 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/DigniteCmsKitCommonWebModule.cs @@ -0,0 +1,51 @@ +using Dignite.CmsKit.Localization; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc.Localization; +using Volo.Abp.AutoMapper; +using Volo.Abp.Http.ProxyScripting.Generators.JQuery; +using Volo.Abp.Modularity; +using Volo.Abp.UI.Navigation; +using Volo.Abp.VirtualFileSystem; +using Volo.CmsKit.Web; + +namespace Dignite.CmsKit.Common.Web; + +[DependsOn( + typeof(DigniteCmsKitCommonApplicationContractsModule), + typeof(CmsKitCommonWebModule) + )] +public class DigniteCmsKitCommonWebModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.PreConfigure(options => + { + options.AddAssemblyResource(typeof(DigniteCmsKitResource), typeof(DigniteCmsKitCommonWebModule).Assembly); + }); + + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(DigniteCmsKitCommonWebModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + + Configure(options => + { + options.DisableModule(CmsKitCommonRemoteServiceConsts.ModuleName); + }); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Web/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Properties/launchSettings.json b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Properties/launchSettings.json new file mode 100644 index 00000000..29071400 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Dignite.CmsKit.Common.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50266;http://localhost:50267" + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Common.Web/wwwroot/client-proxies/dignite-cms-kit-common-proxy.js b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/wwwroot/client-proxies/dignite-cms-kit-common-proxy.js new file mode 100644 index 00000000..474937d6 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Common.Web/wwwroot/client-proxies/dignite-cms-kit-common-proxy.js @@ -0,0 +1,25 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module dignite-cms-kit-common + +(function(){ + + // controller dignite.cmsKit.brand.brand + + (function(){ + + abp.utils.createNamespace(window, 'dignite.cmsKit.brand.brand'); + + dignite.cmsKit.brand.brand.get = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit/brand', + type: 'GET' + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite.CmsKit.Domain.Shared.csproj b/modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite.CmsKit.Domain.Shared.csproj index 7f7906ad..af98e3c8 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite.CmsKit.Domain.Shared.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite.CmsKit.Domain.Shared.csproj @@ -11,6 +11,7 @@ + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite/CmsKit/BlobStoring/BlobContainerConsts.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite/CmsKit/BlobStoring/BlobContainerConsts.cs new file mode 100644 index 00000000..6c802c9a --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain.Shared/Dignite/CmsKit/BlobStoring/BlobContainerConsts.cs @@ -0,0 +1,19 @@ +namespace Dignite.CmsKit.BlobStoring; + +public static class BlobContainerConsts +{ + /// + /// Container name of brand logo + /// + public const string BrandLogoContainerName = "BrandLogo"; + + /// + /// Container name of brand reversed logo + /// + public const string BrandLogoReverseContainerName = "BrandLogoReverse"; + + /// + /// Container name of brand icon + /// + public const string BrandIconContainerName = "BrandIcon"; +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite.CmsKit.Domain.csproj b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite.CmsKit.Domain.csproj index e9d3b021..bc2da4d0 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite.CmsKit.Domain.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite.CmsKit.Domain.csproj @@ -11,6 +11,7 @@ + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconBlobNameGenerator.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconBlobNameGenerator.cs new file mode 100644 index 00000000..bd0c82aa --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconBlobNameGenerator.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Dignite.Abp.BlobStoring; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace Dignite.CmsKit.BlobStoring; + +public class BrandIconBlobNameGenerator : IBlobNameGenerator, ITransientDependency +{ + private readonly ICurrentTenant _currentTenant; + + public BrandIconBlobNameGenerator(ICurrentTenant currentTenant) + { + _currentTenant = currentTenant; + } + + public async Task Create() + { + if (_currentTenant.IsAvailable) + { + return $"{_currentTenant.Name}-icon"; + } + else + { + return "icon"; + } + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconContainer.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconContainer.cs new file mode 100644 index 00000000..3a86a12b --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandIconContainer.cs @@ -0,0 +1,11 @@ +using Volo.Abp.BlobStoring; + +namespace Dignite.CmsKit.BlobStoring; + +/// +/// Container of brand icon +/// +[BlobContainerName(BlobContainerConsts.BrandIconContainerName)] +public class BrandIconContainer +{ +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoBlobNameGenerator.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoBlobNameGenerator.cs new file mode 100644 index 00000000..8bff57c1 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoBlobNameGenerator.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Dignite.Abp.BlobStoring; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace Dignite.CmsKit.BlobStoring; + +public class BrandLogoBlobNameGenerator : IBlobNameGenerator, ITransientDependency +{ + private readonly ICurrentTenant _currentTenant; + + public BrandLogoBlobNameGenerator(ICurrentTenant currentTenant) + { + _currentTenant = currentTenant; + } + + public async Task Create() + { + if (_currentTenant.IsAvailable) + { + return $"{_currentTenant.Name}-logo"; + } + else + { + return "logo"; + } + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoContainer.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoContainer.cs new file mode 100644 index 00000000..6119cf99 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoContainer.cs @@ -0,0 +1,11 @@ +using Volo.Abp.BlobStoring; + +namespace Dignite.CmsKit.BlobStoring; + +/// +/// Container of brand logo +/// +[BlobContainerName(BlobContainerConsts.BrandLogoContainerName)] +public class BrandLogoContainer +{ +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseBlobNameGenerator.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseBlobNameGenerator.cs new file mode 100644 index 00000000..ca122dc0 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseBlobNameGenerator.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Dignite.Abp.BlobStoring; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace Dignite.CmsKit.BlobStoring; + +public class BrandLogoReverseBlobNameGenerator : IBlobNameGenerator, ITransientDependency +{ + private readonly ICurrentTenant _currentTenant; + + public BrandLogoReverseBlobNameGenerator(ICurrentTenant currentTenant) + { + _currentTenant = currentTenant; + } + + public async Task Create() + { + if (_currentTenant.IsAvailable) + { + return $"{_currentTenant.Name}-logo-reverse"; + } + else + { + return "logo-reverse"; + } + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseContainer.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseContainer.cs new file mode 100644 index 00000000..e3415fbd --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/BlobStoring/BrandLogoReverseContainer.cs @@ -0,0 +1,11 @@ +using Volo.Abp.BlobStoring; + +namespace Dignite.CmsKit.BlobStoring; + +/// +/// Container of brand reversed logo +/// +[BlobContainerName(BlobContainerConsts.BrandLogoReverseContainerName)] +public class BrandLogoReverseContainer +{ +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettingDefinitionProvider.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettingDefinitionProvider.cs index 55333ba0..a74d4dd0 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettingDefinitionProvider.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettingDefinitionProvider.cs @@ -1,4 +1,6 @@ -using Volo.Abp.Settings; +using Dignite.CmsKit.Localization; +using Volo.Abp.Localization; +using Volo.Abp.Settings; namespace Dignite.CmsKit.Settings; @@ -6,8 +8,28 @@ public class CmsKitSettingDefinitionProvider : SettingDefinitionProvider { public override void Define(ISettingDefinitionContext context) { - /* Define module settings here. - * Use names from CmsKitSettings class. - */ + context.Add( + new SettingDefinition(CmsKitSettings.BrandName, + "My Dignite", + displayName: L("DisplayName:CmsKit.BrandName"), + isVisibleToClients: true + ), + new SettingDefinition(CmsKitSettings.BrandLogo, + displayName: L("DisplayName:CmsKit.BrandLogo"), + isVisibleToClients: true + ), + new SettingDefinition(CmsKitSettings.BrandLogoReverse, + displayName: L("DisplayName:CmsKit.BrandLogoReverse"), + isVisibleToClients: true + ), + new SettingDefinition(CmsKitSettings.BrandIcon, + displayName: L("DisplayName:CmsKit.BrandIcon"), + isVisibleToClients: true + ) + ); + } + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); } } diff --git a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettings.cs b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettings.cs index ea34b2a7..df240bb3 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettings.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Domain/Dignite/CmsKit/Settings/CmsKitSettings.cs @@ -2,9 +2,25 @@ public static class CmsKitSettings { - public const string GroupName = "CmsKit"; + private const string GroupName = "DigniteCmsKit"; - /* Add constants for setting names. Example: - * public const string MySettingName = GroupName + ".MySettingName"; - */ + /// + /// 品牌名称 + /// + public const string BrandName = GroupName + ".BrandName"; + + /// + /// 品牌LOGO + /// + public const string BrandLogo = GroupName + ".BrandLogo"; + + /// + /// 品牌反色LOGO + /// + public const string BrandLogoReverse = GroupName + ".BrandLogoReverse"; + + /// + /// 品牌图标 + /// + public const string BrandIcon = GroupName + ".BrandIcon"; } diff --git a/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite.CmsKit.EntityFrameworkCore.csproj b/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite.CmsKit.EntityFrameworkCore.csproj index beecdda8..a26467a1 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite.CmsKit.EntityFrameworkCore.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite.CmsKit.EntityFrameworkCore.csproj @@ -11,6 +11,7 @@ + diff --git a/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs b/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs index 47e95752..628dceac 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.EntityFrameworkCore/Dignite/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs @@ -1,5 +1,6 @@ using Dignite.CmsKit.GlobalFeatures; using Dignite.CmsKit.Visits; +using Dignite.FileExplorer.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.EntityFrameworkCore.Modeling; @@ -17,6 +18,7 @@ public static void ConfigureDigniteCmsKit( Check.NotNull(builder, nameof(builder)); builder.ConfigureCmsKit(); + builder.ConfigureFileExplorer(); if (GlobalFeatureManager.Instance.IsEnabled()) { diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite.CmsKit.HttpApi.Client.csproj b/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite.CmsKit.HttpApi.Client.csproj index 3912f132..27d8b915 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite.CmsKit.HttpApi.Client.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite.CmsKit.HttpApi.Client.csproj @@ -9,8 +9,9 @@ - + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitHttpApiClientModule.cs b/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitHttpApiClientModule.cs new file mode 100644 index 00000000..80825c78 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite/CmsKit/DigniteCmsKitHttpApiClientModule.cs @@ -0,0 +1,14 @@ +using Dignite.CmsKit.Public; +using Volo.Abp.Modularity; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitApplicationContractsModule), + typeof(DigniteCmsKitPublicHttpApiClientModule), + typeof(CmsKitHttpApiClientModule) + )] +public class DigniteCmsKitHttpApiClientModule : AbpModule +{ +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite.CmsKit.HttpApi.csproj b/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite.CmsKit.HttpApi.csproj index 675e699d..2a95588d 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite.CmsKit.HttpApi.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite.CmsKit.HttpApi.csproj @@ -9,8 +9,10 @@ - + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/DigniteCmsKitHttpApiModule.cs b/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/DigniteCmsKitHttpApiModule.cs new file mode 100644 index 00000000..496e5fa4 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/DigniteCmsKitHttpApiModule.cs @@ -0,0 +1,36 @@ +using Dignite.CmsKit.Admin; +using Dignite.CmsKit.Localization; +using Dignite.CmsKit.Public; +using Localization.Resources.AbpUi; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.CmsKit; + +namespace Dignite.CmsKit; + +[DependsOn( + typeof(DigniteCmsKitApplicationContractsModule), + typeof(DigniteCmsKitPublicHttpApiModule), + typeof(DigniteCmsKitAdminHttpApiModule), + typeof(CmsKitHttpApiModule))] +public class DigniteCmsKitHttpApiModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(DigniteCmsKitHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite.CmsKit.MongoDB.csproj b/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite.CmsKit.MongoDB.csproj index f7f7580c..3b103032 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite.CmsKit.MongoDB.csproj +++ b/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite.CmsKit.MongoDB.csproj @@ -11,6 +11,7 @@ + diff --git a/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/CmsKitMongoDbContext.cs b/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/CmsKitMongoDbContext.cs index 44bba723..03c58b6c 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/CmsKitMongoDbContext.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/CmsKitMongoDbContext.cs @@ -1,4 +1,5 @@ using Dignite.CmsKit.Visits; +using Dignite.FileExplorer.MongoDB; using MongoDB.Driver; using Volo.Abp.Data; using Volo.Abp.MongoDB; @@ -16,6 +17,7 @@ protected override void CreateModel(IMongoModelBuilder modelBuilder) { base.CreateModel(modelBuilder); + modelBuilder.ConfigureFileExplorer(); modelBuilder.ConfigureCmsKit(); modelBuilder.DigniteConfigureCmsKit(); } diff --git a/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/DigniteCmsKitMongoDbModule.cs b/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/DigniteCmsKitMongoDbModule.cs index d6f54231..622f9468 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/DigniteCmsKitMongoDbModule.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.MongoDB/Dignite/CmsKit/MongoDB/DigniteCmsKitMongoDbModule.cs @@ -1,5 +1,6 @@ using Dignite.CmsKit.MongoDB.Visits; using Dignite.CmsKit.Visits; +using Dignite.FileExplorer.MongoDB; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Modularity; using Volo.CmsKit.MongoDB; @@ -8,7 +9,8 @@ namespace Dignite.CmsKit.MongoDB; [DependsOn( typeof(DigniteCmsKitDomainModule), - typeof(CmsKitMongoDbModule) + typeof(CmsKitMongoDbModule), + typeof(FileExplorerMongoDbModule) )] public class DigniteCmsKitMongoDbModule : AbpModule { diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.abppkg new file mode 100644 index 00000000..49032794 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application-contracts" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.csproj b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.csproj new file mode 100644 index 00000000..f001ccc6 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite.CmsKit.Public.Application.Contracts.csproj @@ -0,0 +1,18 @@ + + + + + + + netstandard2.0;netstandard2.1;net8.0 + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicRemoteServiceConsts.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/CmsKitPublicRemoteServiceConsts.cs similarity index 76% rename from modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicRemoteServiceConsts.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/CmsKitPublicRemoteServiceConsts.cs index ec49ce5c..d75322f6 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicRemoteServiceConsts.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/CmsKitPublicRemoteServiceConsts.cs @@ -1,6 +1,6 @@ namespace Dignite.CmsKit.Public; -public class DigniteCmsKitPublicRemoteServiceConsts +public class CmsKitPublicRemoteServiceConsts { public const string RemoteServiceName = "DigniteCmsKitPublic"; diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs new file mode 100644 index 00000000..7fcbf875 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationContractsModule.cs @@ -0,0 +1,16 @@ +using Dignite.FileExplorer; +using Volo.Abp.Modularity; +using Volo.CmsKit.Public; + +namespace Dignite.CmsKit.Public; + +[DependsOn( + typeof(DigniteCmsKitDomainSharedModule), + typeof(DigniteCmsKitCommonApplicationContractsModule), + typeof(CmsKitPublicApplicationContractsModule), + typeof(FileExplorerApplicationContractsModule) + )] +public class DigniteCmsKitPublicApplicationContractsModule : AbpModule +{ + +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/MarkedItems/IMarkedItemPublicAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/MarkedItems/IMarkedItemPublicAppService.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/MarkedItems/IMarkedItemPublicAppService.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/MarkedItems/IMarkedItemPublicAppService.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/Visits/CreateVisitInput.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/Visits/CreateVisitInput.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/Visits/CreateVisitInput.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/Visits/CreateVisitInput.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/Visits/IVisitPublicAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/Visits/IVisitPublicAppService.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/Visits/IVisitPublicAppService.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/Visits/IVisitPublicAppService.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/Visits/VisitDto.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/Visits/VisitDto.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application.Contracts/Dignite/CmsKit/Public/Visits/VisitDto.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/Dignite/CmsKit/Public/Visits/VisitDto.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.abppkg new file mode 100644 index 00000000..412567ac --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.csproj b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.csproj new file mode 100644 index 00000000..80f8e2ac --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite.CmsKit.Public.Application.csproj @@ -0,0 +1,19 @@ + + + + + + + net8.0 + + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/CmsKitPublicAppServiceBase.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/CmsKitPublicAppServiceBase.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/CmsKitPublicAppServiceBase.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/CmsKitPublicAppServiceBase.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/CmsKitPublicApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/CmsKitPublicApplicationAutoMapperProfile.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/CmsKitPublicApplicationAutoMapperProfile.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/CmsKitPublicApplicationAutoMapperProfile.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationModule.cs similarity index 74% rename from modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationModule.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationModule.cs index 8bad6da4..379e9596 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationModule.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/DigniteCmsKitPublicApplicationModule.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; +using Dignite.FileExplorer; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; using Volo.CmsKit.Public; @@ -8,7 +9,9 @@ namespace Dignite.CmsKit.Public; [DependsOn( typeof(DigniteCmsKitDomainModule), typeof(DigniteCmsKitPublicApplicationContractsModule), - typeof(CmsKitPublicApplicationModule) + typeof(CmsKitPublicApplicationModule), + typeof(DigniteCmsKitCommonApplicationModule), + typeof(FileExplorerApplicationModule) )] public class DigniteCmsKitPublicApplicationModule : AbpModule { diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicAppService.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicAppService.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicAppService.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/Visits/VisitPublicAppService.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/Visits/VisitPublicAppService.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.Application/Dignite/CmsKit/Public/Visits/VisitPublicAppService.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.Application/Dignite/CmsKit/Public/Visits/VisitPublicAppService.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Application/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.Generated.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.Generated.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.Generated.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.Generated.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicClientProxy.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.Generated.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.Generated.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.Generated.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.Generated.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/Dignite/CmsKit/Public/Visits/VisitPublicClientProxy.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/dignite-cms-kit-public-generate-proxy.json b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/dignite-cms-kit-public-generate-proxy.json new file mode 100644 index 00000000..de316644 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/ClientProxies/dignite-cms-kit-public-generate-proxy.json @@ -0,0 +1,321 @@ +{ + "modules": { + "dignite-cms-kit-public": { + "rootPath": "dignite-cms-kit-public", + "remoteServiceName": "DigniteCmsKitPublic", + "controllers": { + "Dignite.CmsKit.Public.MarkedItems.MarkedItemPublicController": { + "controllerName": "MarkedItemPublic", + "controllerGroupName": "MarkedItemPublic", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Dignite.CmsKit.Public.MarkedItems.MarkedItemPublicController", + "interfaces": [ + { + "type": "Dignite.CmsKit.Public.MarkedItems.IMarkedItemPublicAppService", + "name": "IMarkedItemPublicAppService", + "methods": [ + { + "name": "GetListForUserAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + } + ] + } + ], + "actions": { + "GetListForUserAsyncByEntityType": { + "uniqueName": "GetListForUserAsyncByEntityType", + "name": "GetListForUserAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/marked-items/{entityType}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Dignite.CmsKit.Public.MarkedItems.IMarkedItemPublicAppService" + } + } + }, + "Dignite.CmsKit.Public.Visits.VisitPublicController": { + "controllerName": "VisitPublic", + "controllerGroupName": "VisitPublic", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "Dignite.CmsKit.Public.Visits.VisitPublicController", + "interfaces": [ + { + "type": "Dignite.CmsKit.Public.Visits.IVisitPublicAppService", + "name": "IVisitPublicAppService", + "methods": [ + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Dignite.CmsKit.Public.Visits.CreateVisitInput, Dignite.CmsKit.Public.Application.Contracts", + "type": "Dignite.CmsKit.Public.Visits.CreateVisitInput", + "typeSimple": "Dignite.CmsKit.Public.Visits.CreateVisitInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Dignite.CmsKit.Public.Visits.VisitDto", + "typeSimple": "Dignite.CmsKit.Public.Visits.VisitDto" + } + }, + { + "name": "GetListForUserAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "skipCount", + "typeAsString": "System.Int32, System.Private.CoreLib", + "type": "System.Int32", + "typeSimple": "number", + "isOptional": true, + "defaultValue": 0 + }, + { + "name": "maxResultCount", + "typeAsString": "System.Int32, System.Private.CoreLib", + "type": "System.Int32", + "typeSimple": "number", + "isOptional": true, + "defaultValue": 100 + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + } + ] + } + ], + "actions": { + "CreateAsyncByEntityTypeAndEntityIdAndInput": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-public/visits/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Dignite.CmsKit.Public.Visits.CreateVisitInput, Dignite.CmsKit.Public.Application.Contracts", + "type": "Dignite.CmsKit.Public.Visits.CreateVisitInput", + "typeSimple": "Dignite.CmsKit.Public.Visits.CreateVisitInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Dignite.CmsKit.Public.Visits.CreateVisitInput", + "typeSimple": "Dignite.CmsKit.Public.Visits.CreateVisitInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Dignite.CmsKit.Public.Visits.VisitDto", + "typeSimple": "Dignite.CmsKit.Public.Visits.VisitDto" + }, + "allowAnonymous": null, + "implementFrom": "Dignite.CmsKit.Public.Visits.IVisitPublicAppService" + }, + "GetListForUserAsyncByEntityTypeAndSkipCountAndMaxResultCount": { + "uniqueName": "GetListForUserAsyncByEntityTypeAndSkipCountAndMaxResultCount", + "name": "GetListForUserAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/visits/{entityType}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "skipCount", + "typeAsString": "System.Int32, System.Private.CoreLib", + "type": "System.Int32", + "typeSimple": "number", + "isOptional": true, + "defaultValue": 0 + }, + { + "name": "maxResultCount", + "typeAsString": "System.Int32, System.Private.CoreLib", + "type": "System.Int32", + "typeSimple": "number", + "isOptional": true, + "defaultValue": 100 + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "skipCount", + "name": "skipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "maxResultCount", + "name": "maxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Dignite.CmsKit.Public.Visits.IVisitPublicAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.abppkg new file mode 100644 index 00000000..7deef5e3 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api-client" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.csproj b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.csproj new file mode 100644 index 00000000..7df6f74a --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite.CmsKit.Public.HttpApi.Client.csproj @@ -0,0 +1,23 @@ + + + + + + + netstandard2.0;netstandard2.1;net8.0 + + + + + + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiClientModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiClientModule.cs similarity index 68% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiClientModule.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiClientModule.cs index 7b1cfe73..7c166739 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.HttpApi.Client/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiClientModule.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiClientModule.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; +using Dignite.FileExplorer; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; using Volo.CmsKit.Public; @@ -6,16 +7,17 @@ namespace Dignite.CmsKit.Public; [DependsOn( + typeof(DigniteCmsKitPublicApplicationContractsModule), typeof(CmsKitPublicHttpApiClientModule), - typeof(DigniteCmsKitPublicApplicationContractsModule) - )] + typeof(DigniteCmsKitCommonHttpApiClientModule) + typeof(FileExplorerHttpApiClientModule))] public class DigniteCmsKitPublicHttpApiClientModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddHttpClientProxies( typeof(DigniteCmsKitPublicApplicationContractsModule).Assembly, - DigniteCmsKitPublicRemoteServiceConsts.RemoteServiceName + CmsKitPublicRemoteServiceConsts.RemoteServiceName ); Configure(options => diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.abppkg new file mode 100644 index 00000000..515bfe64 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.csproj b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.csproj new file mode 100644 index 00000000..dc365dcf --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite.CmsKit.Public.HttpApi.csproj @@ -0,0 +1,18 @@ + + + + + + + net8.0 + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/CmsKitPublicControllerBase.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/CmsKitPublicControllerBase.cs similarity index 100% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/CmsKitPublicControllerBase.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/CmsKitPublicControllerBase.cs diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiModule.cs similarity index 84% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiModule.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiModule.cs index c42a922e..e42f5c30 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiModule.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/DigniteCmsKitPublicHttpApiModule.cs @@ -1,4 +1,5 @@ using Dignite.CmsKit.Localization; +using Dignite.FileExplorer; using Localization.Resources.AbpUi; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Localization; @@ -8,8 +9,10 @@ namespace Dignite.CmsKit.Public; [DependsOn( + typeof(DigniteCmsKitPublicApplicationContractsModule), typeof(CmsKitPublicHttpApiModule), - typeof(DigniteCmsKitPublicApplicationContractsModule))] + typeof(DigniteCmsKitCommonHttpApiModule), + typeof(FileExplorerHttpApiModule))] public class DigniteCmsKitPublicHttpApiModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicController.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicController.cs similarity index 88% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicController.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicController.cs index 9267d6e7..c70afdb8 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicController.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/MarkedItems/MarkedItemPublicController.cs @@ -12,8 +12,8 @@ namespace Dignite.CmsKit.Public.MarkedItems; [RequiresFeature(CmsKitFeatures.MarkedItemEnable)] [RequiresGlobalFeature(typeof(MarkedItemsFeature))] -[RemoteService(Name = DigniteCmsKitPublicRemoteServiceConsts.RemoteServiceName)] -[Area(DigniteCmsKitPublicRemoteServiceConsts.ModuleName)] +[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] +[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Route("api/cms-kit-public/marked-items")] public class MarkedItemPublicController : CmsKitPublicControllerBase, IMarkedItemPublicAppService { diff --git a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/Visits/VisitPublicController.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/Visits/VisitPublicController.cs similarity index 92% rename from modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/Visits/VisitPublicController.cs rename to modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/Visits/VisitPublicController.cs index 7cd2b507..d7210434 100644 --- a/modules/cms-kit/src/Dignite.CmsKit.HttpApi/Dignite/CmsKit/Public/Visits/VisitPublicController.cs +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/Dignite/CmsKit/Public/Visits/VisitPublicController.cs @@ -13,8 +13,8 @@ namespace Dignite.CmsKit.Public.Visits; [RequiresFeature(CmsKitFeatures.VisitEnable)] [RequiresGlobalFeature(typeof(VisitsFeature))] -[RemoteService(Name = DigniteCmsKitPublicRemoteServiceConsts.RemoteServiceName)] -[Area(DigniteCmsKitPublicRemoteServiceConsts.ModuleName)] +[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] +[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Route("api/cms-kit-public/visits")] public class VisitPublicController : CmsKitPublicControllerBase, IVisitPublicAppService { diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs new file mode 100644 index 00000000..756c14ed --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/CmsKitPublicWebAutoMapperProfile.cs @@ -0,0 +1,13 @@ +using AutoMapper; + +namespace Dignite.CmsKit.Public.Web; + +public class PublicWebAutoMapperProfile : Profile +{ + public PublicWebAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.abppkg b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.abppkg new file mode 100644 index 00000000..930c4018 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.mvc" +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.csproj b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.csproj new file mode 100644 index 00000000..95705b43 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Dignite.CmsKit.Public.Web.csproj @@ -0,0 +1,39 @@ + + + + + + + net8.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + true + Library + Dignite.CmsKit.Public.Web + true + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/DigniteCmsKitPublicWebModule.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/DigniteCmsKitPublicWebModule.cs new file mode 100644 index 00000000..56269f8e --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/DigniteCmsKitPublicWebModule.cs @@ -0,0 +1,49 @@ +using Dignite.CmsKit.Localization; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc.Localization; +using Volo.Abp.AutoMapper; +using Volo.Abp.Http.ProxyScripting.Generators.JQuery; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; +using Volo.CmsKit.Public.Web; + +namespace Dignite.CmsKit.Public.Web; + +[DependsOn( + typeof(DigniteCmsKitPublicApplicationContractsModule), + typeof(CmsKitPublicWebModule) + )] +public class DigniteCmsKitPublicWebModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.PreConfigure(options => + { + options.AddAssemblyResource(typeof(DigniteCmsKitResource), typeof(DigniteCmsKitPublicWebModule).Assembly); + }); + + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(DigniteCmsKitPublicWebModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + + Configure(options => + { + options.DisableModule(CmsKitPublicRemoteServiceConsts.ModuleName); + }); + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/FodyWeavers.xml b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/FodyWeavers.xml new file mode 100644 index 00000000..1715698c --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Helpers/BlobHelper.cs b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Helpers/BlobHelper.cs new file mode 100644 index 00000000..dac6d0c4 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Helpers/BlobHelper.cs @@ -0,0 +1,75 @@ + + +using Dignite.CmsKit.BlobStoring; + +namespace Dignite.CmsKit.Public.Web.Helpers; + +public static class BlobHelper +{ + /// + /// + /// + /// + /// + /// + /// + public static string GetBrandLogoUrl(string logoBlobName, int? width = null, int? height = null) + { + return GetBlobUrl(BlobContainerConsts.BrandLogoContainerName, logoBlobName, width, height); + } + + /// + /// + /// + /// + /// + /// + /// + public static string GetBrandLogoReverseUrl(string logoReverseBlobName, int? width = null, int? height = null) + { + return GetBlobUrl(BlobContainerConsts.BrandLogoContainerName, logoReverseBlobName, width, height); + } + + /// + /// + /// + /// + /// + /// + /// + public static string GetBrandIconUrl(string iconBlobName, int? width = null, int? height = null) + { + return GetBlobUrl(BlobContainerConsts.BrandLogoContainerName, iconBlobName, width, height); + } + + /// + /// + /// + /// + /// + /// + /// + /// + public static string GetBlobUrl(string containerName, string blobName, int? width = null, int? height = null) + { + var url = $"/api/file-explorer/files/{containerName}/{blobName}"; + if (width.HasValue || height.HasValue) + { + url += "?"; + } + if (width.HasValue) + { + url += $"width={width}"; + } + if (height.HasValue) + { + if (width.HasValue) + { + url += "&"; + } + url += $"height={height}"; + } + + return url; + } +} diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Properties/launchSettings.json b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Properties/launchSettings.json new file mode 100644 index 00000000..c06b7eeb --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "Dignite.CmsKit.Public.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:50266;http://localhost:50267" + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Dignite.CmsKit.Public.Web/wwwroot/client-proxies/dignite-cms-kit-public-proxy.js b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/wwwroot/client-proxies/dignite-cms-kit-public-proxy.js new file mode 100644 index 00000000..f6a00573 --- /dev/null +++ b/modules/cms-kit/src/Dignite.CmsKit.Public.Web/wwwroot/client-proxies/dignite-cms-kit-public-proxy.js @@ -0,0 +1,48 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module dignite-cms-kit-public + +(function(){ + + // controller dignite.cmsKit.public.markedItems.markedItemPublic + + (function(){ + + abp.utils.createNamespace(window, 'dignite.cmsKit.public.markedItems.markedItemPublic'); + + dignite.cmsKit.public.markedItems.markedItemPublic.getListForUser = function(entityType, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/marked-items/' + entityType + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller dignite.cmsKit.public.visits.visitPublic + + (function(){ + + abp.utils.createNamespace(window, 'dignite.cmsKit.public.visits.visitPublic'); + + dignite.cmsKit.public.visits.visitPublic.create = function(entityType, entityId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/visits/' + entityType + '/' + entityId + '', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + dignite.cmsKit.public.visits.visitPublic.getListForUser = function(entityType, skipCount, maxResultCount, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/visits/' + entityType + '' + abp.utils.buildQueryString([{ name: 'skipCount', value: skipCount }, { name: 'maxResultCount', value: maxResultCount }]) + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/modules/cms-kit/test/Dignite.CmsKit.Application.Tests/CmsKitApplicationTestModule.cs b/modules/cms-kit/test/Dignite.CmsKit.Application.Tests/CmsKitApplicationTestModule.cs index c4233a78..c89962c1 100644 --- a/modules/cms-kit/test/Dignite.CmsKit.Application.Tests/CmsKitApplicationTestModule.cs +++ b/modules/cms-kit/test/Dignite.CmsKit.Application.Tests/CmsKitApplicationTestModule.cs @@ -1,10 +1,9 @@ -using Dignite.CmsKit.Public; -using Volo.Abp.Modularity; +using Volo.Abp.Modularity; namespace Dignite.CmsKit; [DependsOn( - typeof(DigniteCmsKitPublicApplicationModule), + typeof(DigniteCmsKitApplicationModule), typeof(CmsKitDomainTestModule) )] public class CmsKitApplicationTestModule : AbpModule diff --git a/modules/cms-kit/test/Dignite.CmsKit.HttpApi.Client.ConsoleTestApp/CmsKitConsoleApiClientModule.cs b/modules/cms-kit/test/Dignite.CmsKit.HttpApi.Client.ConsoleTestApp/CmsKitConsoleApiClientModule.cs index eaf9171f..e1aabf6a 100644 --- a/modules/cms-kit/test/Dignite.CmsKit.HttpApi.Client.ConsoleTestApp/CmsKitConsoleApiClientModule.cs +++ b/modules/cms-kit/test/Dignite.CmsKit.HttpApi.Client.ConsoleTestApp/CmsKitConsoleApiClientModule.cs @@ -1,5 +1,4 @@ -using Dignite.CmsKit.Public; -using Volo.Abp.Autofac; +using Volo.Abp.Autofac; using Volo.Abp.Http.Client.IdentityModel; using Volo.Abp.Modularity; @@ -7,7 +6,7 @@ namespace Dignite.CmsKit; [DependsOn( typeof(AbpAutofacModule), - typeof(DigniteCmsKitPublicHttpApiClientModule), + typeof(DigniteCmsKitHttpApiClientModule), typeof(AbpHttpClientIdentityModelModule) )] public class CmsKitConsoleApiClientModule : AbpModule