From 9b2a83410566e14396bc567bda8da3dcedee6a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Wed, 29 Mar 2023 22:22:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/Lion.AbpPro.sln | 96 + .../DataDictionaryManagementDbProperties.cs | 2 +- .../DataDictionaryManagementDbContext.cs | 2 +- ...agementDbContextModelCreatingExtensions.cs | 4 +- .../IDataDictionaryManagementDbContext.cs | 2 +- .../Lion.AbpPro.LanguageManagement.sln | 119 + .../Controllers/HomeController.cs | 10 + .../Dockerfile | 18 + ...anagementHttpApiHostMigrationsDbContext.cs | 18 + ...ntHttpApiHostMigrationsDbContextFactory.cs | 23 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 39 + .../LanguageManagementHttpApiHostModule.cs | 194 + ...Pro.LanguageManagement.HttpApi.Host.csproj | 41 + .../Logs/logs.txt | 494 + .../20230318020647_Init.Designer.cs | 187 + .../Migrations/20230318020647_Init.cs | 97 + ...ApiHostMigrationsDbContextModelSnapshot.cs | 184 + .../Program.cs | 47 + .../Properties/launchSettings.json | 27 + .../Startup.cs | 15 + .../appsettings.json | 13 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 18 + ...ageManagementApplicationContractsModule.cs | 12 + .../LanguageManagementApplicationException.cs | 17 + .../LanguageTexts/CreateLanguageTextInput.cs | 30 + .../LanguageTexts/ILanguageTextAppService.cs | 28 + .../LanguageTexts/PageLanguageTextInput.cs | 24 + .../LanguageTexts/PageLanguageTextOutput.cs | 22 + .../LanguageTexts/UpdateLanguageTextInput.cs | 33 + .../Languages/CreateLanguageInput.cs | 34 + .../Languages/DeleteLanguageInput.cs | 12 + .../Languages/ILanguageAppService.cs | 39 + .../Languages/PageLanguageInput.cs | 9 + .../Languages/PageLanguageOutput.cs | 43 + .../Languages/UpdateLanguageInput.cs | 39 + ...ageManagement.Application.Contracts.csproj | 17 + ...eManagementPermissionDefinitionProvider.cs | 28 + .../LanguageManagementPermissions.cs | 36 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 24 + .../LanguageManagementAppService.cs | 11 + ...eManagementApplicationAutoMapperProfile.cs | 15 + .../LanguageManagementApplicationModule.cs | 20 + .../LanguageTexts/LanguageTextAppService.cs | 165 + .../Languages/LanguageAppService.cs | 94 + ...pPro.LanguageManagement.Application.csproj | 15 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 14 + .../LanguageManagementConsts.cs | 16 + .../LanguageManagementDomainException.cs | 17 + .../LanguageManagementDomainSharedModule.cs | 32 + .../LanguageManagementErrorCodes.cs | 12 + .../LanguageTexts/LanguageTextCacheItem.cs | 16 + .../LanguageTexts/LanguageTextDto.cs | 35 + .../Languages/LanguageDto.cs | 44 + .../Languages/LanguageListCacheItem.cs | 16 + ...ro.LanguageManagement.Domain.Shared.csproj | 24 + .../Localization/LanguageManagement/ar.json | 7 + .../Localization/LanguageManagement/cs.json | 7 + .../LanguageManagement/de-DE.json | 7 + .../LanguageManagement/en-GB.json | 7 + .../Localization/LanguageManagement/en.json | 20 + .../Localization/LanguageManagement/es.json | 7 + .../Localization/LanguageManagement/fr.json | 7 + .../Localization/LanguageManagement/hu.json | 7 + .../Localization/LanguageManagement/nl.json | 7 + .../LanguageManagement/pl-PL.json | 6 + .../LanguageManagement/pt-BR.json | 6 + .../Localization/LanguageManagement/sl.json | 6 + .../Localization/LanguageManagement/tr.json | 7 + .../Localization/LanguageManagement/vi.json | 6 + .../LanguageManagement/zh-Hans.json | 20 + .../LanguageManagement/zh-Hant.json | 6 + .../LanguageManagementResource.cs | 8 + .../AbpLocalizationOptionsExtensions.cs | 10 + .../LanguageManagementDataSeedContributor.cs | 51 + .../DatabaseLanguageProvider.cs | 28 + .../DynamicLocalizationResourceContributor.cs | 38 + .../DynamicResourceLocalizer.cs | 54 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 36 + .../IDynamicResourceLocalizer.cs | 8 + .../ILocalizationHelper.cs | 18 + .../LanguageManagementDbProperties.cs | 11 + ...nguageManagementDomainAutoMapperProfile.cs | 15 + .../LanguageManagementDomainModule.cs | 26 + .../LanguageManagementDomainService.cs | 31 + .../LanguageTexts/Aggregates/LanguageText.cs | 102 + .../Caches/LanguageTexCacheInvalidator.cs | 16 + .../LanguageTexts/ILanguageTextManager.cs | 48 + .../LanguageTexts/ILanguageTextRepository.cs | 43 + .../LanguageTexts/LanguageTextManager.cs | 97 + .../Languages/Aggregates/Language.cs | 124 + .../Caches/LanguageCacheInvalidator.cs | 19 + .../Languages/ILanguageManager.cs | 64 + .../Languages/ILanguageRepository.cs | 33 + .../Languages/LanguageManager.cs | 129 + ...on.AbpPro.LanguageManagement.Domain.csproj | 16 + .../LocalizationHelper.cs | 74 + ...uageManagementSettingDefinitionProvider.cs | 12 + .../Settings/LanguageManagementSettings.cs | 11 + .../ILanguageManagementDbContext.cs | 9 + .../LanguageManagementDbContext.cs | 22 + ...agementDbContextModelCreatingExtensions.cs | 34 + ...uageManagementEntityFrameworkCoreModule.cs | 19 + ...agementModelBuilderConfigurationOptions.cs | 15 + .../EfCoreLanguageTextRepository.cs | 85 + .../Languages/EfCoreLanguageRepository.cs | 66 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 20 + ...guageManagement.EntityFrameworkCore.csproj | 13 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 5 + .../LanguageManagementHttpApiClientModule.cs | 18 + ...o.LanguageManagement.HttpApi.Client.csproj | 16 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 7 + .../LanguageManagementController.cs | 13 + .../LanguageManagementHttpApiModule.cs | 33 + .../LanguageTexts/LanguageTextController.cs | 40 + .../Languages/LanguageController.cs | 54 + ...n.AbpPro.LanguageManagement.HttpApi.csproj | 14 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 7 + .../LanguageManagementApplicationTestBase.cs | 10 + ...LanguageManagementApplicationTestModule.cs | 11 + ...anguageManagement.Application.Tests.csproj | 16 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 10 + .../LanguageManagementDomainTestBase.cs | 10 + .../LanguageManagementDomainTestModule.cs | 20 + ...Pro.LanguageManagement.Domain.Tests.csproj | 15 + ...geManagementEntityFrameworkCoreTestBase.cs | 10 + ...ManagementEntityFrameworkCoreTestModule.cs | 35 + .../Samples/SampleRepository_Tests.cs | 13 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 14 + ...anagement.EntityFrameworkCore.Tests.csproj | 18 + .../FodyWeavers.xml | 3 + .../FodyWeavers.xsd | 30 + .../GlobalUsings.cs | 20 + .../LanguageManagementDataSeedContributor.cs | 25 + .../LanguageManagementTestBase.cs | 52 + .../LanguageManagementTestBaseModule.cs | 34 + .../LanguageManagementTestConsts.cs | 7 + ....AbpPro.LanguageManagement.TestBase.csproj | 23 + .../Samples/SampleRepository_Tests.cs | 18 + .../Security/FakeCurrentPrincipalAccessor.cs | 38 + .../NotificationManagementDbProperties.cs | 2 +- ...agementDbContextModelCreatingExtensions.cs | 6 +- .../AbpProHttpApiHostModule.cs | 7 +- .../Lion.AbpPro.HttpApi.Host/appsettings.json | 2 +- .../AbpProApplicationContractsModule.cs | 4 +- .../Lion.AbpPro.Application.Contracts.csproj | 2 + .../AbpProApplicationModule.cs | 12 +- .../LionAbpProLogAppService.cs | 3 +- .../Lion.AbpPro.Application/GlobalUsings.cs | 1 + .../Lion.AbpPro.Application.csproj | 1 + .../AbpProDbMigratorModule.cs | 22 + .../AbpProDomainSharedModule.cs | 18 +- .../Lion.AbpPro.Domain.Shared.csproj | 1 + .../Lion.AbpPro.Domain/AbpProDomainModule.cs | 5 +- .../Lion.AbpPro.Domain.csproj | 1 + .../EntityFrameworkCore/AbpProDbContext.cs | 16 +- .../AbpProEntityFrameworkCoreModule.cs | 4 +- .../Lion.AbpPro.EntityFrameworkCore.csproj | 1 + .../20230318021951_AddLanguage.Designer.cs | 1870 + .../Migrations/20230318021951_AddLanguage.cs | 94 + ...30320050728_AddLanguageDefault.Designer.cs | 1873 + .../20230320050728_AddLanguageDefault.cs | 29 + ...230329141512_UpdateTablePrefix.Designer.cs | 1876 + .../20230329141512_UpdateTablePrefix.cs | 200 + .../AbpProDbContextModelSnapshot.cs | 170 +- .../AbpProFreeSqlModule.cs | 6 + .../AbpProHttpApiClientModule.cs | 6 +- .../Lion.AbpPro.HttpApi.Client.csproj | 2 + .../AbpProHttpApiModule.cs | 4 +- .../Lion.AbpPro.HttpApi.csproj | 1 + .../AbpPro/SharedHostingMicroserviceModule.cs | 9 +- vben28/nswag/nswag.json | 2 +- vben28/nswag/refresh.bat | 2 +- vben28/src/locales/lang/en/common.ts | 6 +- vben28/src/locales/lang/en/routes/admin.ts | 9 +- vben28/src/locales/lang/zh-CN/common.ts | 6 +- vben28/src/locales/lang/zh-CN/routes/admin.ts | 8 +- vben28/src/router/routes/modules/admin.ts | 24 +- vben28/src/services/ServiceProxies.ts | 28180 ++++++++-------- vben28/src/views/admin/auditLog/AuditLog.ts | 119 +- vben28/src/views/admin/auditLog/AuditLog.vue | 104 +- .../admin/elasticSearch/ElasticSearch.ts | 12 +- .../views/admin/language/CreateLanguage.vue | 65 + vben28/src/views/admin/language/Index.ts | 160 + vben28/src/views/admin/language/Index.vue | 129 + .../views/admin/language/UpdateLanguage.vue | 65 + .../admin/languageText/CreateLanguageText.vue | 65 + vben28/src/views/admin/languageText/Index.ts | 201 + vben28/src/views/admin/languageText/Index.vue | 104 + .../admin/languageText/UpdateLanguageText.vue | 63 + vben28/src/views/admin/users/AbpUser.ts | 216 +- vben28/src/views/admin/users/AbpUser.vue | 224 +- .../src/views/admin/users/CreateAbpUser.vue | 162 +- 214 files changed, 27567 insertions(+), 13790 deletions(-) create mode 100644 aspnet-core/modules/LanguageManagement/Lion.AbpPro.LanguageManagement.sln create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Controllers/HomeController.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Dockerfile create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContext.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContextFactory.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Logs/logs.txt create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.Designer.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/LanguageManagementHttpApiHostMigrationsDbContextModelSnapshot.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Program.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Properties/launchSettings.json create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Startup.cs create mode 100644 aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/appsettings.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationContractsModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationException.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/CreateLanguageTextInput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/ILanguageTextAppService.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextInput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextOutput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/UpdateLanguageTextInput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/CreateLanguageInput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/DeleteLanguageInput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/ILanguageAppService.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageInput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageOutput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/UpdateLanguageInput.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissionDefinitionProvider.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissions.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementAppService.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageTexts/LanguageTextAppService.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementConsts.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainException.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementErrorCodes.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextCacheItem.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextDto.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageDto.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageListCacheItem.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/ar.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/cs.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/de-DE.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en-GB.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/es.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/fr.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/hu.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/nl.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pl-PL.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pt-BR.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/sl.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/tr.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/vi.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hans.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hant.json create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagementResource.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/AbpLocalizationOptionsExtensions.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Data/LanguageManagementDataSeedContributor.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicLocalizationResourceContributor.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicResourceLocalizer.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/IDynamicResourceLocalizer.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/ILocalizationHelper.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDbProperties.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Aggregates/LanguageText.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Caches/LanguageTexCacheInvalidator.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextManager.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextRepository.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Aggregates/Language.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Caches/LanguageCacheInvalidator.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageManager.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageRepository.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LocalizationHelper.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettingDefinitionProvider.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/ILanguageManagementDbContext.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContext.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContextModelCreatingExtensions.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementModelBuilderConfigurationOptions.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageTexts/EfCoreLanguageTextRepository.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/Languages/EfCoreLanguageRepository.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/LanguageManagementHttpApiClientModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementController.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementHttpApiModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageTexts/LanguageTextController.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Languages/LanguageController.cs create mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestBase.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestBase.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestBase.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xml create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xsd create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/GlobalUsings.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementDataSeedContributor.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBase.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBaseModule.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestConsts.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Samples/SampleRepository_Tests.cs create mode 100644 aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.Designer.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.Designer.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.Designer.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.cs create mode 100644 vben28/src/views/admin/language/CreateLanguage.vue create mode 100644 vben28/src/views/admin/language/Index.ts create mode 100644 vben28/src/views/admin/language/Index.vue create mode 100644 vben28/src/views/admin/language/UpdateLanguage.vue create mode 100644 vben28/src/views/admin/languageText/CreateLanguageText.vue create mode 100644 vben28/src/views/admin/languageText/Index.ts create mode 100644 vben28/src/views/admin/languageText/Index.vue create mode 100644 vben28/src/views/admin/languageText/UpdateLanguageText.vue diff --git a/aspnet-core/Lion.AbpPro.sln b/aspnet-core/Lion.AbpPro.sln index 68bddd1f..027e8fde 100644 --- a/aspnet-core/Lion.AbpPro.sln +++ b/aspnet-core/Lion.AbpPro.sln @@ -208,6 +208,38 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.Localization.Te EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.Core.Tests", "frameworks\test\Lion.AbpPro.Core.Tests\Lion.AbpPro.Core.Tests.csproj", "{A7206D58-8107-4BB9-8962-30C845ACB6DC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LanguageManagement", "LanguageManagement", "{073D8348-DDEE-42EE-B34B-888A68FA296D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{ED9C412B-0D49-46A3-B11F-669D2DC4A4EB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2F21DF25-C489-4BCD-8460-41BF0500E17F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{3FE23400-A323-46ED-A7F4-30BFF8916D64}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.Domain.Shared", "modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Domain.Shared\Lion.AbpPro.LanguageManagement.Domain.Shared.csproj", "{42812354-1C2C-45C0-91FE-056851CFA835}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.Domain", "modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Domain\Lion.AbpPro.LanguageManagement.Domain.csproj", "{7491214D-0335-47F2-9AE8-92A68CA0EA75}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.EntityFrameworkCore", "modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.EntityFrameworkCore\Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj", "{451999B4-0BE6-4ADD-9B8F-5905AEF63D94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.Application.Contracts", "modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Application.Contracts\Lion.AbpPro.LanguageManagement.Application.Contracts.csproj", "{84592572-EC8B-49A3-8F42-83438F0CEE97}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.Application", "modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Application\Lion.AbpPro.LanguageManagement.Application.csproj", "{4AA19933-C5EE-47BC-8AC7-688D02117F69}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.HttpApi", "modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.HttpApi\Lion.AbpPro.LanguageManagement.HttpApi.csproj", "{E63AA900-9DF1-4E11-9D36-6F325F3BCB11}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.HttpApi.Client", "modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.HttpApi.Client\Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj", "{626C3566-C5D5-4A1C-B9BB-A766C1608B86}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.HttpApi.Host", "modules\LanguageManagement\host\Lion.AbpPro.LanguageManagement.HttpApi.Host\Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj", "{25A9FE86-420E-4B21-A1D4-6BFE76E79790}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.TestBase", "modules\LanguageManagement\test\Lion.AbpPro.LanguageManagement.TestBase\Lion.AbpPro.LanguageManagement.TestBase.csproj", "{C662D24D-4EB6-425E-B63B-CAD944ABF689}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.Domain.Tests", "modules\LanguageManagement\test\Lion.AbpPro.LanguageManagement.Domain.Tests\Lion.AbpPro.LanguageManagement.Domain.Tests.csproj", "{8872921C-5BF9-4B4C-B882-6AF8CC78D2CF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests", "modules\LanguageManagement\test\Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests\Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj", "{E5994C85-C1C2-44F3-BF10-3277CA6CF2C9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.LanguageManagement.Application.Tests", "modules\LanguageManagement\test\Lion.AbpPro.LanguageManagement.Application.Tests\Lion.AbpPro.LanguageManagement.Application.Tests.csproj", "{15852D6F-4110-4B98-B89D-5747777E8908}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -502,6 +534,54 @@ Global {A7206D58-8107-4BB9-8962-30C845ACB6DC}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7206D58-8107-4BB9-8962-30C845ACB6DC}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7206D58-8107-4BB9-8962-30C845ACB6DC}.Release|Any CPU.Build.0 = Release|Any CPU + {42812354-1C2C-45C0-91FE-056851CFA835}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42812354-1C2C-45C0-91FE-056851CFA835}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42812354-1C2C-45C0-91FE-056851CFA835}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42812354-1C2C-45C0-91FE-056851CFA835}.Release|Any CPU.Build.0 = Release|Any CPU + {7491214D-0335-47F2-9AE8-92A68CA0EA75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7491214D-0335-47F2-9AE8-92A68CA0EA75}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7491214D-0335-47F2-9AE8-92A68CA0EA75}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7491214D-0335-47F2-9AE8-92A68CA0EA75}.Release|Any CPU.Build.0 = Release|Any CPU + {451999B4-0BE6-4ADD-9B8F-5905AEF63D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {451999B4-0BE6-4ADD-9B8F-5905AEF63D94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {451999B4-0BE6-4ADD-9B8F-5905AEF63D94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {451999B4-0BE6-4ADD-9B8F-5905AEF63D94}.Release|Any CPU.Build.0 = Release|Any CPU + {84592572-EC8B-49A3-8F42-83438F0CEE97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84592572-EC8B-49A3-8F42-83438F0CEE97}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84592572-EC8B-49A3-8F42-83438F0CEE97}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84592572-EC8B-49A3-8F42-83438F0CEE97}.Release|Any CPU.Build.0 = Release|Any CPU + {4AA19933-C5EE-47BC-8AC7-688D02117F69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AA19933-C5EE-47BC-8AC7-688D02117F69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AA19933-C5EE-47BC-8AC7-688D02117F69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AA19933-C5EE-47BC-8AC7-688D02117F69}.Release|Any CPU.Build.0 = Release|Any CPU + {E63AA900-9DF1-4E11-9D36-6F325F3BCB11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E63AA900-9DF1-4E11-9D36-6F325F3BCB11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E63AA900-9DF1-4E11-9D36-6F325F3BCB11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E63AA900-9DF1-4E11-9D36-6F325F3BCB11}.Release|Any CPU.Build.0 = Release|Any CPU + {626C3566-C5D5-4A1C-B9BB-A766C1608B86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {626C3566-C5D5-4A1C-B9BB-A766C1608B86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {626C3566-C5D5-4A1C-B9BB-A766C1608B86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {626C3566-C5D5-4A1C-B9BB-A766C1608B86}.Release|Any CPU.Build.0 = Release|Any CPU + {25A9FE86-420E-4B21-A1D4-6BFE76E79790}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25A9FE86-420E-4B21-A1D4-6BFE76E79790}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25A9FE86-420E-4B21-A1D4-6BFE76E79790}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25A9FE86-420E-4B21-A1D4-6BFE76E79790}.Release|Any CPU.Build.0 = Release|Any CPU + {C662D24D-4EB6-425E-B63B-CAD944ABF689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C662D24D-4EB6-425E-B63B-CAD944ABF689}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C662D24D-4EB6-425E-B63B-CAD944ABF689}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C662D24D-4EB6-425E-B63B-CAD944ABF689}.Release|Any CPU.Build.0 = Release|Any CPU + {8872921C-5BF9-4B4C-B882-6AF8CC78D2CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8872921C-5BF9-4B4C-B882-6AF8CC78D2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8872921C-5BF9-4B4C-B882-6AF8CC78D2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8872921C-5BF9-4B4C-B882-6AF8CC78D2CF}.Release|Any CPU.Build.0 = Release|Any CPU + {E5994C85-C1C2-44F3-BF10-3277CA6CF2C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5994C85-C1C2-44F3-BF10-3277CA6CF2C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5994C85-C1C2-44F3-BF10-3277CA6CF2C9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5994C85-C1C2-44F3-BF10-3277CA6CF2C9}.Release|Any CPU.Build.0 = Release|Any CPU + {15852D6F-4110-4B98-B89D-5747777E8908}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15852D6F-4110-4B98-B89D-5747777E8908}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15852D6F-4110-4B98-B89D-5747777E8908}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15852D6F-4110-4B98-B89D-5747777E8908}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -600,6 +680,22 @@ Global {EFC415F8-872F-4C7E-8645-31A51481BCFC} = {CC2EBB07-A070-4158-AB37-A0C0BBAEA9F5} {800A02FA-EA70-4492-9A93-13C820692F1D} = {EFC415F8-872F-4C7E-8645-31A51481BCFC} {A7206D58-8107-4BB9-8962-30C845ACB6DC} = {EFC415F8-872F-4C7E-8645-31A51481BCFC} + {073D8348-DDEE-42EE-B34B-888A68FA296D} = {F8A8EB2A-2D4B-464F-9A13-F8F7B6A8FAA3} + {ED9C412B-0D49-46A3-B11F-669D2DC4A4EB} = {073D8348-DDEE-42EE-B34B-888A68FA296D} + {2F21DF25-C489-4BCD-8460-41BF0500E17F} = {073D8348-DDEE-42EE-B34B-888A68FA296D} + {3FE23400-A323-46ED-A7F4-30BFF8916D64} = {073D8348-DDEE-42EE-B34B-888A68FA296D} + {42812354-1C2C-45C0-91FE-056851CFA835} = {2F21DF25-C489-4BCD-8460-41BF0500E17F} + {7491214D-0335-47F2-9AE8-92A68CA0EA75} = {2F21DF25-C489-4BCD-8460-41BF0500E17F} + {451999B4-0BE6-4ADD-9B8F-5905AEF63D94} = {2F21DF25-C489-4BCD-8460-41BF0500E17F} + {84592572-EC8B-49A3-8F42-83438F0CEE97} = {2F21DF25-C489-4BCD-8460-41BF0500E17F} + {4AA19933-C5EE-47BC-8AC7-688D02117F69} = {2F21DF25-C489-4BCD-8460-41BF0500E17F} + {E63AA900-9DF1-4E11-9D36-6F325F3BCB11} = {2F21DF25-C489-4BCD-8460-41BF0500E17F} + {626C3566-C5D5-4A1C-B9BB-A766C1608B86} = {2F21DF25-C489-4BCD-8460-41BF0500E17F} + {25A9FE86-420E-4B21-A1D4-6BFE76E79790} = {ED9C412B-0D49-46A3-B11F-669D2DC4A4EB} + {C662D24D-4EB6-425E-B63B-CAD944ABF689} = {3FE23400-A323-46ED-A7F4-30BFF8916D64} + {8872921C-5BF9-4B4C-B882-6AF8CC78D2CF} = {3FE23400-A323-46ED-A7F4-30BFF8916D64} + {E5994C85-C1C2-44F3-BF10-3277CA6CF2C9} = {3FE23400-A323-46ED-A7F4-30BFF8916D64} + {15852D6F-4110-4B98-B89D-5747777E8908} = {3FE23400-A323-46ED-A7F4-30BFF8916D64} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDbProperties.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDbProperties.cs index 4764abcb..a80b2528 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDbProperties.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDbProperties.cs @@ -2,7 +2,7 @@ namespace Lion.AbpPro.DataDictionaryManagement { public static class DataDictionaryManagementDbProperties { - public static string DbTablePrefix { get; set; } = ""; + public static string DbTablePrefix { get; set; } = "Abp"; public static string DbSchema { get; set; } = null; diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContext.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContext.cs index 50df2a95..f96035da 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContext.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContext.cs @@ -6,7 +6,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore /* Add DbSet for each Aggregate Root here. Example: * public DbSet Questions { get; set; } */ - public DbSet DataDictionary { get; set; } + public DbSet DataDictionaries { get; set; } public DataDictionaryManagementDbContext(DbContextOptions options) : base(options) diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs index 0fe9ca47..831c5934 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/DataDictionaryManagementDbContextModelCreatingExtensions.cs @@ -9,14 +9,14 @@ namespace Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore builder.Entity(b => { - b.ToTable(DataDictionaryManagementDbProperties.DbTablePrefix + nameof(DataDictionary), DataDictionaryManagementDbProperties.DbSchema); + b.ToTable(DataDictionaryManagementDbProperties.DbTablePrefix + "DataDictionaries", DataDictionaryManagementDbProperties.DbSchema); b.HasMany(e => e.Details).WithOne().HasForeignKey(uc => uc.DataDictionaryId).IsRequired(); b.ConfigureByConvention(); }); builder.Entity(b => { - b.ToTable(DataDictionaryManagementDbProperties.DbTablePrefix + nameof(DataDictionaryDetail), DataDictionaryManagementDbProperties.DbSchema); + b.ToTable(DataDictionaryManagementDbProperties.DbTablePrefix + "DataDictionaryDetails", DataDictionaryManagementDbProperties.DbSchema); b.ConfigureByConvention(); }); } diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/IDataDictionaryManagementDbContext.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/IDataDictionaryManagementDbContext.cs index 1649be14..8b1a0ada 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/IDataDictionaryManagementDbContext.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/IDataDictionaryManagementDbContext.cs @@ -6,6 +6,6 @@ namespace Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore /* Add DbSet for each Aggregate Root here. Example: * DbSet Questions { get; } */ - DbSet DataDictionary { get; } + DbSet DataDictionaries { get; } } } \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/Lion.AbpPro.LanguageManagement.sln b/aspnet-core/modules/LanguageManagement/Lion.AbpPro.LanguageManagement.sln new file mode 100644 index 00000000..53e7305d --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/Lion.AbpPro.LanguageManagement.sln @@ -0,0 +1,119 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32630.192 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{DB7C4A00-8538-4C69-BC14-6D680A22287E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{013E1408-EDF4-4394-95E6-AFF0F7E81CAF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B8FE9F89-1CBC-49F8-A888-1600C7A6F60A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.Application", "src\Lion.AbpPro.LanguageManagement.Application\Lion.AbpPro.LanguageManagement.Application.csproj", "{0960777B-0375-440D-AFD3-CD12F8B67ED2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.Application.Contracts", "src\Lion.AbpPro.LanguageManagement.Application.Contracts\Lion.AbpPro.LanguageManagement.Application.Contracts.csproj", "{E7ACD36D-7BFA-4E31-9E30-855E938A040B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.Domain", "src\Lion.AbpPro.LanguageManagement.Domain\Lion.AbpPro.LanguageManagement.Domain.csproj", "{53DBEDC9-C4CB-4118-ABE4-F2E792BE74BF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.Domain.Shared", "src\Lion.AbpPro.LanguageManagement.Domain.Shared\Lion.AbpPro.LanguageManagement.Domain.Shared.csproj", "{B98CE0C0-AEC1-4FC0-ACE2-6E06C4093444}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.EntityFrameworkCore", "src\Lion.AbpPro.LanguageManagement.EntityFrameworkCore\Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj", "{EFBB8E00-5B36-440C-AC3D-6095A937D784}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.HttpApi.Client", "src\Lion.AbpPro.LanguageManagement.HttpApi.Client\Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj", "{5C109B06-59A5-4B6E-8909-AED8FD7F80E3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.HttpApi", "src\Lion.AbpPro.LanguageManagement.HttpApi\Lion.AbpPro.LanguageManagement.HttpApi.csproj", "{3870F577-A49E-48D1-8CB0-7B73E11CE68D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.Domain.Tests", "test\Lion.AbpPro.LanguageManagement.Domain.Tests\Lion.AbpPro.LanguageManagement.Domain.Tests.csproj", "{81D1D5F8-2CAA-48D4-9AEF-F94F27EB913A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests", "test\Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests\Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj", "{4BE100BB-D519-41A9-8265-054A436CDACF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.TestBase", "test\Lion.AbpPro.LanguageManagement.TestBase\Lion.AbpPro.LanguageManagement.TestBase.csproj", "{B7C25B05-818B-48B6-9919-47BCA07C01BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.HttpApi.Host", "host\Lion.AbpPro.LanguageManagement.HttpApi.Host\Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj", "{DD712B57-563F-46E4-91D0-7239C60F5AE6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lion.AbpPro.LanguageManagement.Application.Tests", "test\Lion.AbpPro.LanguageManagement.Application.Tests\Lion.AbpPro.LanguageManagement.Application.Tests.csproj", "{7C4EE2EC-8793-4A96-817C-83318C0D5DCD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Solution Items", "0.Solution Items", "{A1585563-E304-4C1A-982F-EFB9A17212B4}" + ProjectSection(SolutionItems) = preProject + Directory.Build.Lion.targets = Directory.Build.Lion.targets + Directory.Build.Microsoft.targets = Directory.Build.Microsoft.targets + Directory.Build.targets = Directory.Build.targets + Directory.Build.Volo.targets = Directory.Build.Volo.targets + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0960777B-0375-440D-AFD3-CD12F8B67ED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0960777B-0375-440D-AFD3-CD12F8B67ED2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0960777B-0375-440D-AFD3-CD12F8B67ED2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0960777B-0375-440D-AFD3-CD12F8B67ED2}.Release|Any CPU.Build.0 = Release|Any CPU + {E7ACD36D-7BFA-4E31-9E30-855E938A040B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7ACD36D-7BFA-4E31-9E30-855E938A040B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7ACD36D-7BFA-4E31-9E30-855E938A040B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7ACD36D-7BFA-4E31-9E30-855E938A040B}.Release|Any CPU.Build.0 = Release|Any CPU + {53DBEDC9-C4CB-4118-ABE4-F2E792BE74BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53DBEDC9-C4CB-4118-ABE4-F2E792BE74BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53DBEDC9-C4CB-4118-ABE4-F2E792BE74BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53DBEDC9-C4CB-4118-ABE4-F2E792BE74BF}.Release|Any CPU.Build.0 = Release|Any CPU + {B98CE0C0-AEC1-4FC0-ACE2-6E06C4093444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B98CE0C0-AEC1-4FC0-ACE2-6E06C4093444}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B98CE0C0-AEC1-4FC0-ACE2-6E06C4093444}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B98CE0C0-AEC1-4FC0-ACE2-6E06C4093444}.Release|Any CPU.Build.0 = Release|Any CPU + {EFBB8E00-5B36-440C-AC3D-6095A937D784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EFBB8E00-5B36-440C-AC3D-6095A937D784}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EFBB8E00-5B36-440C-AC3D-6095A937D784}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EFBB8E00-5B36-440C-AC3D-6095A937D784}.Release|Any CPU.Build.0 = Release|Any CPU + {5C109B06-59A5-4B6E-8909-AED8FD7F80E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C109B06-59A5-4B6E-8909-AED8FD7F80E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C109B06-59A5-4B6E-8909-AED8FD7F80E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C109B06-59A5-4B6E-8909-AED8FD7F80E3}.Release|Any CPU.Build.0 = Release|Any CPU + {3870F577-A49E-48D1-8CB0-7B73E11CE68D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3870F577-A49E-48D1-8CB0-7B73E11CE68D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3870F577-A49E-48D1-8CB0-7B73E11CE68D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3870F577-A49E-48D1-8CB0-7B73E11CE68D}.Release|Any CPU.Build.0 = Release|Any CPU + {81D1D5F8-2CAA-48D4-9AEF-F94F27EB913A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81D1D5F8-2CAA-48D4-9AEF-F94F27EB913A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81D1D5F8-2CAA-48D4-9AEF-F94F27EB913A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81D1D5F8-2CAA-48D4-9AEF-F94F27EB913A}.Release|Any CPU.Build.0 = Release|Any CPU + {4BE100BB-D519-41A9-8265-054A436CDACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BE100BB-D519-41A9-8265-054A436CDACF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BE100BB-D519-41A9-8265-054A436CDACF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BE100BB-D519-41A9-8265-054A436CDACF}.Release|Any CPU.Build.0 = Release|Any CPU + {B7C25B05-818B-48B6-9919-47BCA07C01BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7C25B05-818B-48B6-9919-47BCA07C01BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7C25B05-818B-48B6-9919-47BCA07C01BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7C25B05-818B-48B6-9919-47BCA07C01BC}.Release|Any CPU.Build.0 = Release|Any CPU + {DD712B57-563F-46E4-91D0-7239C60F5AE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD712B57-563F-46E4-91D0-7239C60F5AE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD712B57-563F-46E4-91D0-7239C60F5AE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD712B57-563F-46E4-91D0-7239C60F5AE6}.Release|Any CPU.Build.0 = Release|Any CPU + {7C4EE2EC-8793-4A96-817C-83318C0D5DCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C4EE2EC-8793-4A96-817C-83318C0D5DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C4EE2EC-8793-4A96-817C-83318C0D5DCD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C4EE2EC-8793-4A96-817C-83318C0D5DCD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {0960777B-0375-440D-AFD3-CD12F8B67ED2} = {013E1408-EDF4-4394-95E6-AFF0F7E81CAF} + {E7ACD36D-7BFA-4E31-9E30-855E938A040B} = {013E1408-EDF4-4394-95E6-AFF0F7E81CAF} + {53DBEDC9-C4CB-4118-ABE4-F2E792BE74BF} = {013E1408-EDF4-4394-95E6-AFF0F7E81CAF} + {B98CE0C0-AEC1-4FC0-ACE2-6E06C4093444} = {013E1408-EDF4-4394-95E6-AFF0F7E81CAF} + {EFBB8E00-5B36-440C-AC3D-6095A937D784} = {013E1408-EDF4-4394-95E6-AFF0F7E81CAF} + {5C109B06-59A5-4B6E-8909-AED8FD7F80E3} = {013E1408-EDF4-4394-95E6-AFF0F7E81CAF} + {3870F577-A49E-48D1-8CB0-7B73E11CE68D} = {013E1408-EDF4-4394-95E6-AFF0F7E81CAF} + {81D1D5F8-2CAA-48D4-9AEF-F94F27EB913A} = {B8FE9F89-1CBC-49F8-A888-1600C7A6F60A} + {4BE100BB-D519-41A9-8265-054A436CDACF} = {B8FE9F89-1CBC-49F8-A888-1600C7A6F60A} + {B7C25B05-818B-48B6-9919-47BCA07C01BC} = {B8FE9F89-1CBC-49F8-A888-1600C7A6F60A} + {DD712B57-563F-46E4-91D0-7239C60F5AE6} = {DB7C4A00-8538-4C69-BC14-6D680A22287E} + {7C4EE2EC-8793-4A96-817C-83318C0D5DCD} = {B8FE9F89-1CBC-49F8-A888-1600C7A6F60A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9FB64593-B84A-4E0E-94F4-756EE90A01E8} + EndGlobalSection +EndGlobal diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Controllers/HomeController.cs new file mode 100644 index 00000000..8ccd2016 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Controllers/HomeController.cs @@ -0,0 +1,10 @@ +namespace Lion.AbpPro.LanguageManagement.Controllers +{ + public class HomeController : AbpController + { + public ActionResult Index() + { + return Redirect("~/swagger"); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Dockerfile b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Dockerfile new file mode 100644 index 00000000..5d202881 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Dockerfile @@ -0,0 +1,18 @@ +FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base +WORKDIR /app +EXPOSE 80 + +FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build +WORKDIR /src +COPY . . +WORKDIR /src/templates/service/host/Lion.AbpPro.LanguageManagement.HttpApi.Host +RUN dotnet restore -nowarn:msb3202,nu1503 +RUN dotnet build --no-restore -c Release -o /app + +FROM build AS publish +RUN dotnet publish --no-restore -c Release -o /app + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . +ENTRYPOINT ["dotnet", "Lion.AbpPro.LanguageManagement.HttpApi.Host.dll"] diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContext.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContext.cs new file mode 100644 index 00000000..60dabec0 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContext.cs @@ -0,0 +1,18 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + public class LanguageManagementHttpApiHostMigrationsDbContext : AbpDbContext + { + public LanguageManagementHttpApiHostMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureLanguageManagement(); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContextFactory.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContextFactory.cs new file mode 100644 index 00000000..f39fe948 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/EntityFrameworkCore/LanguageManagementHttpApiHostMigrationsDbContextFactory.cs @@ -0,0 +1,23 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + public class LanguageManagementHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory + { + public LanguageManagementHttpApiHostMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + + var builder = new DbContextOptionsBuilder() + .UseMySql(configuration.GetConnectionString("LanguageManagement"), MySqlServerVersion.LatestSupportedServerVersion); + return new LanguageManagementHttpApiHostMigrationsDbContext(builder.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs new file mode 100644 index 00000000..2752dfde --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs @@ -0,0 +1,39 @@ +// Global using directives + +global using System; +global using System.Collections.Generic; +global using System.IO; +global using System.Linq; +global using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; +global using Microsoft.AspNetCore.Authentication.JwtBearer; +global using Microsoft.AspNetCore.Builder; +global using Microsoft.AspNetCore.Cors; +global using Microsoft.AspNetCore.DataProtection; +global using Microsoft.AspNetCore.Hosting; +global using Microsoft.AspNetCore.Mvc; +global using Microsoft.EntityFrameworkCore; +global using Microsoft.EntityFrameworkCore.Design; +global using Microsoft.Extensions.Configuration; +global using Microsoft.Extensions.DependencyInjection; +global using Microsoft.Extensions.Hosting; +global using Microsoft.OpenApi.Models; +global using Serilog; +global using Serilog.Events; +global using StackExchange.Redis; +global using Volo.Abp; +global using Volo.Abp.AspNetCore.Mvc; +global using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; +global using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +global using Volo.Abp.AspNetCore.Serilog; +global using Volo.Abp.AuditLogging.EntityFrameworkCore; +global using Volo.Abp.Autofac; +global using Volo.Abp.Caching; +global using Volo.Abp.Caching.StackExchangeRedis; +global using Volo.Abp.EntityFrameworkCore; +global using Volo.Abp.EntityFrameworkCore.MySQL; +global using Volo.Abp.Localization; +global using Volo.Abp.Modularity; +global using Volo.Abp.PermissionManagement.EntityFrameworkCore; +global using Volo.Abp.SettingManagement.EntityFrameworkCore; +global using Volo.Abp.Swashbuckle; +global using Volo.Abp.VirtualFileSystem; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs new file mode 100644 index 00000000..006a0551 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs @@ -0,0 +1,194 @@ +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(LanguageManagementApplicationModule), + typeof(LanguageManagementEntityFrameworkCoreModule), + typeof(LanguageManagementHttpApiModule), + typeof(AbpAspNetCoreMvcUiMultiTenancyModule), + typeof(AbpAutofacModule), + typeof(AbpCachingStackExchangeRedisModule), + typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpAuditLoggingEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpAspNetCoreSerilogModule), + typeof(AbpSwashbuckleModule) + )] + public class LanguageManagementHttpApiHostModule : AbpModule + { + private const string DefaultCorsPolicyName = "Default"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysAllowAuthorization(); + ConfigureSwaggerServices(context); + ConfigureCache(context); + ConfigureCors(context); + ConfigureDB(); + ConfigureLocalization(); + ConfigureVirtualFileSystem(context); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseErrorPage(); + app.UseHsts(); + } + + app.UseHttpsRedirection(); + app.UseCorrelationId(); + app.UseStaticFiles(); + app.UseRouting(); + app.UseCors(DefaultCorsPolicyName); + app.UseAuthentication(); + app.UseAbpRequestLocalization(); + app.UseAuthorization(); + app.UseSwagger(); + app.UseAbpSwaggerUI(options => + { + options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API"); + + var configuration = context.GetConfiguration(); + options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); + options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); + options.OAuthScopes("LanguageManagement"); + }); + app.UseAuditing(); + app.UseAbpSerilogEnrichers(); + app.UseConfiguredEndpoints(); + } + + /// + /// 配置跨域 + /// + /// + private void ConfigureCors(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + context.Services.AddCors(options => + { + options.AddPolicy(DefaultCorsPolicyName, builder => + { + builder + .WithOrigins( + configuration["App:CorsOrigins"] + .Split(",", StringSplitOptions.RemoveEmptyEntries) + .Select(o => o.RemovePostFix("/")) + .ToArray() + ) + .WithAbpExposedHeaders() + .SetIsOriginAllowedToAllowWildcardSubdomains() + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); + }); + } + + /// + /// 配置SwaggerUI + /// + /// + private static void ConfigureSwaggerServices(ServiceConfigurationContext context) + { + context.Services.AddSwaggerGen( + options => + { + options.SwaggerDoc("v1", new OpenApiInfo {Title = "LanguageManagement API", Version = "v1"}); + + options.DocInclusionPredicate((docName, description) => true); + + #region 添加token + + options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, new OpenApiSecurityScheme() + { + Description = "请输入Token", + Name = "Authorization", + In = ParameterLocation.Header, + Type = SecuritySchemeType.Http, + Scheme = JwtBearerDefaults.AuthenticationScheme, + BearerFormat = "JWT" + }); + options.AddSecurityRequirement(new OpenApiSecurityRequirement + { + { + new OpenApiSecurityScheme + { + Reference = new OpenApiReference + { + Type = ReferenceType.SecurityScheme, Id = "Bearer" + } + }, + new List() + } + }); + + #endregion + }); + } + + /// + /// Redis缓存 + /// + /// + private void ConfigureCache(ServiceConfigurationContext context) + { + var hostingEnvironment = context.Services.GetHostingEnvironment(); + var configuration = context.Services.GetConfiguration(); + Configure(options => { options.KeyPrefix = "LanguageManagement:"; }); + + if (!hostingEnvironment.IsDevelopment()) + { + var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); + context.Services + .AddDataProtection() + .PersistKeysToStackExchangeRedis(redis, "LanguageManagement-Protection-Keys"); + } + } + + private void ConfigureDB() + { + Configure(options => { options.UseMySQL(); }); + } + + /// + ///配置本地化 + /// + private void ConfigureLocalization() + { + Configure(options => + { + options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); + options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); + options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); + options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); + options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); + }); + } + /// + /// 配置虚拟文件系统 + /// + /// + private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj new file mode 100644 index 00000000..0d6b7bb2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj @@ -0,0 +1,41 @@ + + + + + net7.0 + Lion.AbpPro.LanguageManagement + true + Lion.AbpPro.LanguageManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Logs/logs.txt b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Logs/logs.txt new file mode 100644 index 00000000..c9a7f196 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Logs/logs.txt @@ -0,0 +1,494 @@ +2023-03-18 10:08:53.347 +08:00 [INF] Starting web host. +2023-03-18 10:08:56.165 +08:00 [INF] User profile is available. Using 'C:\Users\wangjun\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2023-03-18 10:08:56.282 +08:00 [INF] Loaded ABP modules: +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementHttpApiHostModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementApplicationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementDomainModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Domain.AbpDddDomainModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Data.AbpDataModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.ObjectExtending.AbpObjectExtendingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Validation.AbpValidationAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Uow.AbpUnitOfWorkModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.EventBus.Abstractions.AbpEventBusAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Json.AbpJsonModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Json.SystemTextJson.AbpJsonSystemTextJsonModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Json.AbpJsonAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Timing.AbpTimingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Settings.AbpSettingsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Security.AbpSecurityModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Threading.AbpThreadingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingContractsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.EventBus.AbpEventBusModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Guids.AbpGuidsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.BackgroundWorkers.AbpBackgroundWorkersModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.DistributedLocking.AbpDistributedLockingAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.ObjectMapping.AbpObjectMappingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.ExceptionHandling.AbpExceptionHandlingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Specifications.AbpSpecificationsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Caching.AbpCachingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Serialization.AbpSerializationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementDomainSharedModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Validation.AbpValidationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.Core.LionAbpProCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LionAbpProLocalizationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AutoMapper.AbpAutoMapperModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementApplicationContractsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationContractsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Http.AbpHttpAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Features.AbpFeaturesModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.GlobalFeatures.AbpGlobalFeaturesModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LanguageManagement.EntityFrameworkCore.LanguageManagementEntityFrameworkCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementHttpApiModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Http.AbpHttpModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Minify.AbpMinifyModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcContractsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.UI.Navigation.AbpUiNavigationModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.UI.AbpUiModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.AbpAspNetCoreMvcUiMultiTenancyModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.AbpAspNetCoreMvcUiThemeSharedModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.AbpAspNetCoreMvcUiBootstrapModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.AbpAspNetCoreMvcUiModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Packages.AbpAspNetCoreMvcUiPackagesModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingAbstractionsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Widgets.AbpAspNetCoreMvcUiWidgetsModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.MultiTenancy.AbpAspNetCoreMultiTenancyModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Caching.StackExchangeRedis.AbpCachingStackExchangeRedisModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.MySQL.AbpEntityFrameworkCoreMySQLModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainSharedModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.PermissionManagement.EntityFrameworkCore.AbpPermissionManagementEntityFrameworkCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainSharedModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.SettingManagement.EntityFrameworkCore.AbpSettingManagementEntityFrameworkCoreModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainSharedModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule +2023-03-18 10:08:56.282 +08:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule +2023-03-18 10:08:58.241 +08:00 [INF] Initialized all ABP modules. +2023-03-18 10:08:58.407 +08:00 [INF] Now listening on: https://localhost:44333 +2023-03-18 10:08:58.407 +08:00 [INF] Application started. Press Ctrl+C to shut down. +2023-03-18 10:08:58.407 +08:00 [INF] Hosting environment: Development +2023-03-18 10:08:58.407 +08:00 [INF] Content root path: D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\LanguageManagement\host\Lion.AbpPro.LanguageManagement.HttpApi.Host +2023-03-18 10:08:59.687 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/ - - +2023-03-18 10:09:18.551 +08:00 [INF] Executed DbCommand (64ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`DisplayName`, `a`.`ExtraProperties`, `a`.`Name` +FROM `AbpPermissionGroups` AS `a` +2023-03-18 10:09:18.556 +08:00 [INF] Executed DbCommand (7ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__isEnabled_0='?' (DbType = Boolean)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`ConcurrencyStamp`, `a`.`CreationTime`, `a`.`CreatorId`, `a`.`CultureName`, `a`.`DeleterId`, `a`.`DeletionTime`, `a`.`DisplayName`, `a`.`ExtraProperties`, `a`.`FlagIcon`, `a`.`IsDeleted`, `a`.`IsEnabled`, `a`.`LastModificationTime`, `a`.`LastModifierId`, `a`.`UiCultureName` +FROM `AbpLanguages` AS `a` +WHERE (@__ef_filter__p_0 OR NOT (`a`.`IsDeleted`)) AND (`a`.`IsEnabled` = @__isEnabled_0) +2023-03-18 10:09:18.834 +08:00 [INF] Executed DbCommand (4ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`DisplayName`, `a`.`ExtraProperties`, `a`.`GroupName`, `a`.`IsEnabled`, `a`.`MultiTenancySide`, `a`.`Name`, `a`.`ParentName`, `a`.`Providers`, `a`.`StateCheckers` +FROM `AbpPermissions` AS `a` +2023-03-18 10:09:28.281 +08:00 [INF] Executed DbCommand (27ms) [Parameters=[@__providerName_0='?' (Size = 64)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`Name`, `a`.`ProviderKey`, `a`.`ProviderName`, `a`.`Value` +FROM `AbpSettings` AS `a` +WHERE (`a`.`ProviderName` = @__providerName_0) AND `a`.`ProviderKey` IS NULL +2023-03-18 10:09:28.323 +08:00 [INF] Executed DbCommand (6ms) [Parameters=[@__providerName_0='?' (Size = 64)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`Name`, `a`.`ProviderKey`, `a`.`ProviderName`, `a`.`Value` +FROM `AbpSettings` AS `a` +WHERE (`a`.`ProviderName` = @__providerName_0) AND `a`.`ProviderKey` IS NULL +2023-03-18 10:09:28.410 +08:00 [INF] Executing endpoint 'Lion.AbpPro.LanguageManagement.Controllers.HomeController.Index (Lion.AbpPro.LanguageManagement.HttpApi.Host)' +2023-03-18 10:09:28.445 +08:00 [INF] Route matched with {action = "Index", controller = "Home", area = "", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult Index() on controller Lion.AbpPro.LanguageManagement.Controllers.HomeController (Lion.AbpPro.LanguageManagement.HttpApi.Host). +2023-03-18 10:09:28.479 +08:00 [INF] Executing RedirectResult, redirecting to /swagger. +2023-03-18 10:09:28.484 +08:00 [INF] Executed action Lion.AbpPro.LanguageManagement.Controllers.HomeController.Index (Lion.AbpPro.LanguageManagement.HttpApi.Host) in 34.2797ms +2023-03-18 10:09:28.484 +08:00 [INF] Executed endpoint 'Lion.AbpPro.LanguageManagement.Controllers.HomeController.Index (Lion.AbpPro.LanguageManagement.HttpApi.Host)' +2023-03-18 10:09:28.497 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/ - - - 302 0 - 28815.5267ms +2023-03-18 10:09:28.524 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/swagger/index.html - - +2023-03-18 10:09:28.611 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/swagger/index.html - - - 200 - text/html;charset=utf-8 86.9083ms +2023-03-18 10:09:28.663 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/swagger/ui/abp.js - - +2023-03-18 10:09:28.676 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/swagger/ui/abp.swagger.js - - +2023-03-18 10:09:28.686 +08:00 [INF] Sending file. Request path: '/swagger/ui/abp.swagger.js'. Physical path: 'N/A' +2023-03-18 10:09:28.686 +08:00 [INF] Sending file. Request path: '/swagger/ui/abp.js'. Physical path: 'N/A' +2023-03-18 10:09:28.687 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/swagger/ui/abp.js - - - 200 3122 application/javascript 24.0180ms +2023-03-18 10:09:28.687 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/swagger/ui/abp.swagger.js - - - 200 1363 application/javascript 10.6484ms +2023-03-18 10:09:28.894 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/swagger/v1/swagger.json - - +2023-03-18 10:09:28.940 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/swagger/favicon-32x32.png - - +2023-03-18 10:09:28.947 +08:00 [INF] Sending file. Request path: '/favicon-32x32.png'. Physical path: 'N/A' +2023-03-18 10:09:28.947 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/swagger/favicon-32x32.png - - - 200 628 image/png 7.1563ms +2023-03-18 10:09:29.090 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/swagger/v1/swagger.json - - - 200 - application/json;charset=utf-8 195.9779ms +2023-03-18 10:09:38.152 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/abp/Swashbuckle/SetCsrfCookie application/json - +2023-03-18 10:09:38.155 +08:00 [INF] Executing endpoint 'Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle)' +2023-03-18 10:09:38.157 +08:00 [INF] Route matched with {area = "Abp", action = "SetCsrfCookie", controller = "AbpSwashbuckle", page = ""}. Executing controller action with signature Void SetCsrfCookie() on controller Volo.Abp.Swashbuckle.AbpSwashbuckleController (Volo.Abp.Swashbuckle). +2023-03-18 10:09:38.172 +08:00 [INF] Executed action Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle) in 14.3681ms +2023-03-18 10:09:38.172 +08:00 [INF] Executed endpoint 'Volo.Abp.Swashbuckle.AbpSwashbuckleController.SetCsrfCookie (Volo.Abp.Swashbuckle)' +2023-03-18 10:09:38.172 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/abp/Swashbuckle/SetCsrfCookie application/json - - 204 - - 19.6974ms +2023-03-18 10:09:38.214 +08:00 [INF] Request starting HTTP/2 POST https://localhost:44333/Languages/Create application/json 130 +2023-03-18 10:09:38.217 +08:00 [INF] CORS policy execution failed. +2023-03-18 10:09:38.217 +08:00 [INF] Request origin https://localhost:44333 does not have permission to access the resource. +2023-03-18 10:09:38.219 +08:00 [INF] Executing endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:09:38.228 +08:00 [INF] Route matched with {action = "Create", controller = "Language", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task CreateAsync(Lion.AbpPro.LanguageManagement.Languages.CreateLanguageInput) on controller Lion.AbpPro.LanguageManagement.Languages.LanguageController (Lion.AbpPro.LanguageManagement.HttpApi). +2023-03-18 10:09:38.340 +08:00 [INF] Executed DbCommand (2ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`ConcurrencyStamp`, `a`.`CreationTime`, `a`.`CreatorId`, `a`.`CultureName`, `a`.`DeleterId`, `a`.`DeletionTime`, `a`.`ExtraProperties`, `a`.`IsDeleted`, `a`.`LastModificationTime`, `a`.`LastModifierId`, `a`.`Name`, `a`.`ResourceName`, `a`.`TenantId`, `a`.`Value` +FROM `AbpLanguageTexts` AS `a` +WHERE (@__ef_filter__p_0 OR NOT (`a`.`IsDeleted`)) AND (@__ef_filter__p_1 OR (`a`.`TenantId` IS NULL)) +2023-03-18 10:09:38.345 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:09:38.374 +08:00 [INF] Executed DbCommand (2ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`ConcurrencyStamp`, `a`.`CreationTime`, `a`.`CreatorId`, `a`.`CultureName`, `a`.`DeleterId`, `a`.`DeletionTime`, `a`.`ExtraProperties`, `a`.`IsDeleted`, `a`.`LastModificationTime`, `a`.`LastModifierId`, `a`.`Name`, `a`.`ResourceName`, `a`.`TenantId`, `a`.`Value` +FROM `AbpLanguageTexts` AS `a` +WHERE (@__ef_filter__p_0 OR NOT (`a`.`IsDeleted`)) AND (@__ef_filter__p_1 OR (`a`.`TenantId` IS NULL)) +2023-03-18 10:09:38.376 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:09:38.714 +08:00 [INF] Executed DbCommand (1ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`ConcurrencyStamp`, `a`.`CreationTime`, `a`.`CreatorId`, `a`.`CultureName`, `a`.`DeleterId`, `a`.`DeletionTime`, `a`.`ExtraProperties`, `a`.`IsDeleted`, `a`.`LastModificationTime`, `a`.`LastModifierId`, `a`.`Name`, `a`.`ResourceName`, `a`.`TenantId`, `a`.`Value` +FROM `AbpLanguageTexts` AS `a` +WHERE (@__ef_filter__p_0 OR NOT (`a`.`IsDeleted`)) AND (@__ef_filter__p_1 OR (`a`.`TenantId` IS NULL)) +2023-03-18 10:09:38.715 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:09:38.733 +08:00 [INF] Executed DbCommand (1ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`ConcurrencyStamp`, `a`.`CreationTime`, `a`.`CreatorId`, `a`.`CultureName`, `a`.`DeleterId`, `a`.`DeletionTime`, `a`.`ExtraProperties`, `a`.`IsDeleted`, `a`.`LastModificationTime`, `a`.`LastModifierId`, `a`.`Name`, `a`.`ResourceName`, `a`.`TenantId`, `a`.`Value` +FROM `AbpLanguageTexts` AS `a` +WHERE (@__ef_filter__p_0 OR NOT (`a`.`IsDeleted`)) AND (@__ef_filter__p_1 OR (`a`.`TenantId` IS NULL)) +2023-03-18 10:09:38.734 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:09:38.742 +08:00 [ERR] ---------- RemoteServiceErrorInfo ---------- +{ + "code": null, + "message": "对不起,在处理你的请求期间,产生了一个服务器内部错误!", + "details": null, + "data": {}, + "validationErrors": null +} + +2023-03-18 10:09:38.744 +08:00 [ERR] Missing type map configuration or unsupported mapping. + +Mapping types: +Language -> LanguageDto +Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language -> Lion.AbpPro.LanguageManagement.Languages.LanguageDto +AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping. + +Mapping types: +Language -> LanguageDto +Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language -> Lion.AbpPro.LanguageManagement.Languages.LanguageDto + at lambda_method1585(Closure, Object, LanguageDto, ResolutionContext) + at Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider.Map[TSource,TDestination](Object source) + at Volo.Abp.ObjectMapping.DefaultObjectMapper.AutoMap[TSource,TDestination](Object source) + at Volo.Abp.ObjectMapping.DefaultObjectMapper.Map[TSource,TDestination](TSource source) + at Lion.AbpPro.LanguageManagement.Languages.LanguageManager.CreateAsync(Guid id, String cultureName, String uiCultureName, String displayName, String flagIcon, Boolean isEnabled) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Domain\Languages\LanguageManager.cs:line 45 + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) + at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync(CreateLanguageInput input) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.HttpApi\Languages\LanguageController.cs:line 24 + at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) +2023-03-18 10:09:38.777 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. +2023-03-18 10:09:38.791 +08:00 [INF] Executed action Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi) in 563.3355ms +2023-03-18 10:09:38.792 +08:00 [INF] Executed endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:09:39.248 +08:00 [INF] Executed DbCommand (61ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 96), @p2='?' (Size = 512), @p3='?' (Size = 64), @p4='?' (Size = 64), @p5='?' (Size = 128), @p6='?' (Size = 256), @p7='?' (Size = 40), @p8='?' (Size = 64), @p9='?' (Size = 4000), @p10='?' (DbType = Int32), @p11='?' (DbType = DateTime), @p12='?' (Size = 4000), @p13='?' (Size = 16), @p14='?' (DbType = Int32), @p15='?' (DbType = Guid), @p16='?' (Size = 64), @p17='?' (DbType = Guid), @p18='?' (Size = 256), @p19='?' (DbType = Guid), @p20='?' (Size = 64), @p21='?' (Size = 256), @p22='?' (DbType = Guid), @p23='?' (Size = 256), @p24='?' (DbType = Guid), @p25='?' (DbType = Guid), @p26='?' (DbType = Int32), @p27='?' (DbType = DateTime), @p28='?' (Size = 4000), @p29='?' (Size = 128), @p30='?' (Size = 2000), @p31='?' (Size = 256), @p32='?' (DbType = Guid), @p33='?' (DbType = Guid), @p34='?' (DbType = Guid), @p35='?' (DbType = Int32), @p36='?' (DbType = DateTime), @p37='?' (Size = 4000), @p38='?' (Size = 128), @p39='?' (Size = 2000), @p40='?' (Size = 256), @p41='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO `AbpAuditLogs` (`Id`, `ApplicationName`, `BrowserInfo`, `ClientId`, `ClientIpAddress`, `ClientName`, `Comments`, `ConcurrencyStamp`, `CorrelationId`, `Exceptions`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `HttpMethod`, `HttpStatusCode`, `ImpersonatorTenantId`, `ImpersonatorTenantName`, `ImpersonatorUserId`, `ImpersonatorUserName`, `TenantId`, `TenantName`, `Url`, `UserId`, `UserName`) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23); +INSERT INTO `AbpAuditLogActions` (`Id`, `AuditLogId`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `MethodName`, `Parameters`, `ServiceName`, `TenantId`) +VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32), +(@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40, @p41); +2023-03-18 10:09:39.272 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:09:39.284 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:09:39.287 +08:00 [INF] Request finished HTTP/2 POST https://localhost:44333/Languages/Create application/json 130 - 500 - application/json;+charset=utf-8 1073.4294ms +2023-03-18 10:11:04.330 +08:00 [INF] Request starting HTTP/2 POST https://localhost:44333/Languages/Create application/json 130 +2023-03-18 10:11:04.336 +08:00 [INF] CORS policy execution failed. +2023-03-18 10:11:04.336 +08:00 [INF] Request origin https://localhost:44333 does not have permission to access the resource. +2023-03-18 10:11:04.339 +08:00 [INF] Executing endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:11:04.339 +08:00 [INF] Route matched with {action = "Create", controller = "Language", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task CreateAsync(Lion.AbpPro.LanguageManagement.Languages.CreateLanguageInput) on controller Lion.AbpPro.LanguageManagement.Languages.LanguageController (Lion.AbpPro.LanguageManagement.HttpApi). +2023-03-18 10:11:22.748 +08:00 [ERR] ---------- RemoteServiceErrorInfo ---------- +{ + "code": null, + "message": "对不起,在处理你的请求期间,产生了一个服务器内部错误!", + "details": null, + "data": {}, + "validationErrors": null +} + +2023-03-18 10:11:22.748 +08:00 [ERR] Missing type map configuration or unsupported mapping. + +Mapping types: +Language -> LanguageDto +Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language -> Lion.AbpPro.LanguageManagement.Languages.LanguageDto +AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping. + +Mapping types: +Language -> LanguageDto +Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language -> Lion.AbpPro.LanguageManagement.Languages.LanguageDto + at lambda_method1585(Closure, Object, LanguageDto, ResolutionContext) + at Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider.Map[TSource,TDestination](Object source) + at Volo.Abp.ObjectMapping.DefaultObjectMapper.AutoMap[TSource,TDestination](Object source) + at Volo.Abp.ObjectMapping.DefaultObjectMapper.Map[TSource,TDestination](TSource source) + at Lion.AbpPro.LanguageManagement.Languages.LanguageManager.CreateAsync(Guid id, String cultureName, String uiCultureName, String displayName, String flagIcon, Boolean isEnabled) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Domain\Languages\LanguageManager.cs:line 45 + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) + at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() + at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync(CreateLanguageInput input) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.HttpApi\Languages\LanguageController.cs:line 24 + at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) + at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) +2023-03-18 10:11:22.749 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. +2023-03-18 10:11:22.749 +08:00 [INF] Executed action Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi) in 18412.1107ms +2023-03-18 10:11:22.750 +08:00 [INF] Executed endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:11:22.774 +08:00 [INF] Executed DbCommand (4ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 96), @p2='?' (Size = 512), @p3='?' (Size = 64), @p4='?' (Size = 64), @p5='?' (Size = 128), @p6='?' (Size = 256), @p7='?' (Size = 40), @p8='?' (Size = 64), @p9='?' (Size = 4000), @p10='?' (DbType = Int32), @p11='?' (DbType = DateTime), @p12='?' (Size = 4000), @p13='?' (Size = 16), @p14='?' (DbType = Int32), @p15='?' (DbType = Guid), @p16='?' (Size = 64), @p17='?' (DbType = Guid), @p18='?' (Size = 256), @p19='?' (DbType = Guid), @p20='?' (Size = 64), @p21='?' (Size = 256), @p22='?' (DbType = Guid), @p23='?' (Size = 256), @p24='?' (DbType = Guid), @p25='?' (DbType = Guid), @p26='?' (DbType = Int32), @p27='?' (DbType = DateTime), @p28='?' (Size = 4000), @p29='?' (Size = 128), @p30='?' (Size = 2000), @p31='?' (Size = 256), @p32='?' (DbType = Guid), @p33='?' (DbType = Guid), @p34='?' (DbType = Guid), @p35='?' (DbType = Int32), @p36='?' (DbType = DateTime), @p37='?' (Size = 4000), @p38='?' (Size = 128), @p39='?' (Size = 2000), @p40='?' (Size = 256), @p41='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO `AbpAuditLogs` (`Id`, `ApplicationName`, `BrowserInfo`, `ClientId`, `ClientIpAddress`, `ClientName`, `Comments`, `ConcurrencyStamp`, `CorrelationId`, `Exceptions`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `HttpMethod`, `HttpStatusCode`, `ImpersonatorTenantId`, `ImpersonatorTenantName`, `ImpersonatorUserId`, `ImpersonatorUserName`, `TenantId`, `TenantName`, `Url`, `UserId`, `UserName`) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23); +INSERT INTO `AbpAuditLogActions` (`Id`, `AuditLogId`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `MethodName`, `Parameters`, `ServiceName`, `TenantId`) +VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32), +(@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40, @p41); +2023-03-18 10:11:22.779 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:11:22.780 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:11:22.781 +08:00 [INF] Request finished HTTP/2 POST https://localhost:44333/Languages/Create application/json 130 - 500 - application/json;+charset=utf-8 18451.8659ms +2023-03-18 10:13:01.530 +08:00 [INF] Starting web host. +2023-03-18 10:13:04.571 +08:00 [INF] User profile is available. Using 'C:\Users\wangjun\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. +2023-03-18 10:13:04.631 +08:00 [INF] Loaded ABP modules: +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementHttpApiHostModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementApplicationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementDomainModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Domain.AbpDddDomainModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Data.AbpDataModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.ObjectExtending.AbpObjectExtendingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Validation.AbpValidationAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Uow.AbpUnitOfWorkModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.EventBus.Abstractions.AbpEventBusAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Json.AbpJsonModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Json.SystemTextJson.AbpJsonSystemTextJsonModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Json.AbpJsonAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Timing.AbpTimingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Settings.AbpSettingsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Security.AbpSecurityModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Threading.AbpThreadingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingContractsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.EventBus.AbpEventBusModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Guids.AbpGuidsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.BackgroundWorkers.AbpBackgroundWorkersModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.DistributedLocking.AbpDistributedLockingAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.ObjectMapping.AbpObjectMappingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.ExceptionHandling.AbpExceptionHandlingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Specifications.AbpSpecificationsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Caching.AbpCachingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Serialization.AbpSerializationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementDomainSharedModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Validation.AbpValidationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.Core.LionAbpProCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LionAbpProLocalizationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AutoMapper.AbpAutoMapperModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementApplicationContractsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationContractsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Http.AbpHttpAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Features.AbpFeaturesModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.GlobalFeatures.AbpGlobalFeaturesModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LanguageManagement.EntityFrameworkCore.LanguageManagementEntityFrameworkCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Lion.AbpPro.LanguageManagement.LanguageManagementHttpApiModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Http.AbpHttpModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Minify.AbpMinifyModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcContractsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.UI.Navigation.AbpUiNavigationModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.UI.AbpUiModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.AbpAspNetCoreMvcUiMultiTenancyModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.AbpAspNetCoreMvcUiThemeSharedModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.AbpAspNetCoreMvcUiBootstrapModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.AbpAspNetCoreMvcUiModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Packages.AbpAspNetCoreMvcUiPackagesModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingAbstractionsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Widgets.AbpAspNetCoreMvcUiWidgetsModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.MultiTenancy.AbpAspNetCoreMultiTenancyModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Caching.StackExchangeRedis.AbpCachingStackExchangeRedisModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.EntityFrameworkCore.MySQL.AbpEntityFrameworkCoreMySQLModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainSharedModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.PermissionManagement.EntityFrameworkCore.AbpPermissionManagementEntityFrameworkCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainSharedModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.SettingManagement.EntityFrameworkCore.AbpSettingManagementEntityFrameworkCoreModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainSharedModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule +2023-03-18 10:13:04.632 +08:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule +2023-03-18 10:13:05.632 +08:00 [INF] Initialized all ABP modules. +2023-03-18 10:13:05.723 +08:00 [INF] Now listening on: https://localhost:44333 +2023-03-18 10:13:05.723 +08:00 [INF] Application started. Press Ctrl+C to shut down. +2023-03-18 10:13:05.723 +08:00 [INF] Hosting environment: Development +2023-03-18 10:13:05.723 +08:00 [INF] Content root path: D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\modules\LanguageManagement\host\Lion.AbpPro.LanguageManagement.HttpApi.Host +2023-03-18 10:13:06.218 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44333/ - - +2023-03-18 10:13:13.659 +08:00 [INF] Request starting HTTP/2 POST https://localhost:44333/Languages/Create application/json 130 +2023-03-18 10:13:13.664 +08:00 [INF] CORS policy execution failed. +2023-03-18 10:13:13.664 +08:00 [INF] Request origin https://localhost:44333 does not have permission to access the resource. +2023-03-18 10:13:13.813 +08:00 [WRN] The operation was canceled. +System.OperationCanceledException: The operation was canceled. + at System.Threading.CancellationToken.ThrowOperationCanceledException() + at System.Threading.CancellationToken.ThrowIfCancellationRequested() + at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAsync(String key, CancellationToken token) + at Volo.Abp.Caching.DistributedCache`2.GetAsync(TCacheKey key, Nullable`1 hideErrors, Boolean considerUow, CancellationToken token) +2023-03-18 10:13:15.111 +08:00 [ERR] An error occurred using the connection to database 'LionAbpProDB' on server 'localhost'. +2023-03-18 10:13:15.142 +08:00 [ERR] An unhandled exception has occurred while executing the request. +System.OperationCanceledException: The operation was canceled. + at System.Threading.CancellationToken.ThrowOperationCanceledException() + at System.Threading.CancellationToken.ThrowIfCancellationRequested() + at MySqlConnector.MySqlConnection.OpenAsync(Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 389 + at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken) + at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken) + at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected) + at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlRelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected) + at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) + at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) + at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) + at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync() + at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken) + at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken) + at Volo.Abp.SettingManagement.EntityFrameworkCore.EfCoreSettingRepository.GetListAsync(String providerName, String providerKey, CancellationToken cancellationToken) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() + at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Volo.Abp.SettingManagement.SettingManagementStore.SetCacheItemsAsync(String providerName, String providerKey, String currentName, SettingCacheItem currentCacheItem) + at Volo.Abp.SettingManagement.SettingManagementStore.GetCacheItemAsync(String name, String providerName, String providerKey) + at Volo.Abp.SettingManagement.SettingManagementStore.GetOrNullAsync(String name, String providerName, String providerKey) + at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) + at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() + at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) + at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) + at Volo.Abp.Settings.TenantSettingValueProvider.GetOrNullAsync(SettingDefinition setting) + at Volo.Abp.Settings.SettingProvider.GetOrNullValueFromProvidersAsync(IEnumerable`1 providers, SettingDefinition setting) + at Volo.Abp.Settings.SettingProvider.GetOrNullAsync(String name) + at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync() + at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) + at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() +--- End of stack trace from previous location --- + at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) + at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) + at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() +--- End of stack trace from previous location --- + at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context) +2023-03-18 10:13:15.230 +08:00 [INF] Request finished HTTP/2 GET https://localhost:44333/ - - - 500 - text/html;+charset=utf-8 9012.9985ms +2023-03-18 10:13:15.385 +08:00 [INF] Executing endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:13:15.419 +08:00 [INF] Route matched with {action = "Create", controller = "Language", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task CreateAsync(Lion.AbpPro.LanguageManagement.Languages.CreateLanguageInput) on controller Lion.AbpPro.LanguageManagement.Languages.LanguageController (Lion.AbpPro.LanguageManagement.HttpApi). +2023-03-18 10:13:18.314 +08:00 [INF] Executed DbCommand (18ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 40), @p2='?' (DbType = DateTime), @p3='?' (DbType = Guid), @p4='?' (Size = 128), @p5='?' (DbType = Guid), @p6='?' (DbType = DateTime), @p7='?' (Size = 128), @p8='?' (Size = 4000), @p9='?' (Size = 4000), @p10='?' (DbType = Boolean), @p11='?' (DbType = DateTime), @p12='?' (DbType = Guid), @p13='?' (Size = 128)], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO `AbpLanguages` (`Id`, `ConcurrencyStamp`, `CreationTime`, `CreatorId`, `CultureName`, `DeleterId`, `DeletionTime`, `DisplayName`, `ExtraProperties`, `FlagIcon`, `IsEnabled`, `LastModificationTime`, `LastModifierId`, `UiCultureName`) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13); +SELECT `IsDeleted` +FROM `AbpLanguages` +WHERE ROW_COUNT() = 1 AND `Id` = @p0; +2023-03-18 10:13:18.360 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:18.390 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:18.420 +08:00 [INF] Executed action Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi) in 2997.0732ms +2023-03-18 10:13:18.421 +08:00 [INF] Executed endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:13:18.736 +08:00 [INF] Executed DbCommand (11ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 96), @p2='?' (Size = 512), @p3='?' (Size = 64), @p4='?' (Size = 64), @p5='?' (Size = 128), @p6='?' (Size = 256), @p7='?' (Size = 40), @p8='?' (Size = 64), @p9='?' (Size = 4000), @p10='?' (DbType = Int32), @p11='?' (DbType = DateTime), @p12='?' (Size = 4000), @p13='?' (Size = 16), @p14='?' (DbType = Int32), @p15='?' (DbType = Guid), @p16='?' (Size = 64), @p17='?' (DbType = Guid), @p18='?' (Size = 256), @p19='?' (DbType = Guid), @p20='?' (Size = 64), @p21='?' (Size = 256), @p22='?' (DbType = Guid), @p23='?' (Size = 256), @p24='?' (DbType = Guid), @p25='?' (DbType = Guid), @p26='?' (DbType = Int32), @p27='?' (DbType = DateTime), @p28='?' (Size = 4000), @p29='?' (Size = 128), @p30='?' (Size = 2000), @p31='?' (Size = 256), @p32='?' (DbType = Guid), @p33='?' (DbType = Guid), @p34='?' (DbType = Guid), @p35='?' (DbType = Int32), @p36='?' (DbType = DateTime), @p37='?' (Size = 4000), @p38='?' (Size = 128), @p39='?' (Size = 2000), @p40='?' (Size = 256), @p41='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO `AbpAuditLogs` (`Id`, `ApplicationName`, `BrowserInfo`, `ClientId`, `ClientIpAddress`, `ClientName`, `Comments`, `ConcurrencyStamp`, `CorrelationId`, `Exceptions`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `HttpMethod`, `HttpStatusCode`, `ImpersonatorTenantId`, `ImpersonatorTenantName`, `ImpersonatorUserId`, `ImpersonatorUserName`, `TenantId`, `TenantName`, `Url`, `UserId`, `UserName`) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23); +INSERT INTO `AbpAuditLogActions` (`Id`, `AuditLogId`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `MethodName`, `Parameters`, `ServiceName`, `TenantId`) +VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32), +(@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40, @p41); +2023-03-18 10:13:18.747 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:18.749 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:18.755 +08:00 [INF] Request finished HTTP/2 POST https://localhost:44333/Languages/Create application/json 130 - 204 - - 5096.6434ms +2023-03-18 10:13:32.772 +08:00 [INF] Request starting HTTP/2 POST https://localhost:44333/Languages/Page application/json 3 +2023-03-18 10:13:32.775 +08:00 [INF] CORS policy execution failed. +2023-03-18 10:13:32.775 +08:00 [INF] Request origin https://localhost:44333 does not have permission to access the resource. +2023-03-18 10:13:32.777 +08:00 [INF] Executing endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.PageAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:13:32.782 +08:00 [INF] Route matched with {action = "Page", controller = "Language", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Lion.AbpPro.LanguageManagement.Languages.PageLanguageOutput]] PageAsync(Lion.AbpPro.LanguageManagement.Languages.PageLanguageInput) on controller Lion.AbpPro.LanguageManagement.Languages.LanguageController (Lion.AbpPro.LanguageManagement.HttpApi). +2023-03-18 10:13:32.917 +08:00 [INF] Executed DbCommand (4ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean)], CommandType='"Text"', CommandTimeout='30'] +SELECT COUNT(*) +FROM `AbpLanguages` AS `a` +WHERE @__ef_filter__p_0 OR NOT (`a`.`IsDeleted`) +2023-03-18 10:13:32.960 +08:00 [INF] Executed DbCommand (3ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__p_1='?' (DbType = Int32), @__p_0='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] +SELECT `a`.`Id`, `a`.`ConcurrencyStamp`, `a`.`CreationTime`, `a`.`CreatorId`, `a`.`CultureName`, `a`.`DeleterId`, `a`.`DeletionTime`, `a`.`DisplayName`, `a`.`ExtraProperties`, `a`.`FlagIcon`, `a`.`IsDeleted`, `a`.`IsEnabled`, `a`.`LastModificationTime`, `a`.`LastModifierId`, `a`.`UiCultureName` +FROM `AbpLanguages` AS `a` +WHERE @__ef_filter__p_0 OR NOT (`a`.`IsDeleted`) +ORDER BY `a`.`CreationTime` DESC +LIMIT @__p_1 OFFSET @__p_0 +2023-03-18 10:13:32.991 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:32.998 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.PagedResultDto`1[[Lion.AbpPro.LanguageManagement.Languages.PageLanguageOutput, Lion.AbpPro.LanguageManagement.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. +2023-03-18 10:13:33.029 +08:00 [INF] Executed action Lion.AbpPro.LanguageManagement.Languages.LanguageController.PageAsync (Lion.AbpPro.LanguageManagement.HttpApi) in 246.8204ms +2023-03-18 10:13:33.029 +08:00 [INF] Executed endpoint 'Lion.AbpPro.LanguageManagement.Languages.LanguageController.PageAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:13:33.043 +08:00 [INF] Executed DbCommand (2ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 96), @p2='?' (Size = 512), @p3='?' (Size = 64), @p4='?' (Size = 64), @p5='?' (Size = 128), @p6='?' (Size = 256), @p7='?' (Size = 40), @p8='?' (Size = 64), @p9='?' (Size = 4000), @p10='?' (DbType = Int32), @p11='?' (DbType = DateTime), @p12='?' (Size = 4000), @p13='?' (Size = 16), @p14='?' (DbType = Int32), @p15='?' (DbType = Guid), @p16='?' (Size = 64), @p17='?' (DbType = Guid), @p18='?' (Size = 256), @p19='?' (DbType = Guid), @p20='?' (Size = 64), @p21='?' (Size = 256), @p22='?' (DbType = Guid), @p23='?' (Size = 256), @p24='?' (DbType = Guid), @p25='?' (DbType = Guid), @p26='?' (DbType = Int32), @p27='?' (DbType = DateTime), @p28='?' (Size = 4000), @p29='?' (Size = 128), @p30='?' (Size = 2000), @p31='?' (Size = 256), @p32='?' (DbType = Guid), @p33='?' (DbType = Guid), @p34='?' (DbType = Guid), @p35='?' (DbType = Int32), @p36='?' (DbType = DateTime), @p37='?' (Size = 4000), @p38='?' (Size = 128), @p39='?' (Size = 2000), @p40='?' (Size = 256), @p41='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO `AbpAuditLogs` (`Id`, `ApplicationName`, `BrowserInfo`, `ClientId`, `ClientIpAddress`, `ClientName`, `Comments`, `ConcurrencyStamp`, `CorrelationId`, `Exceptions`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `HttpMethod`, `HttpStatusCode`, `ImpersonatorTenantId`, `ImpersonatorTenantName`, `ImpersonatorUserId`, `ImpersonatorUserName`, `TenantId`, `TenantName`, `Url`, `UserId`, `UserName`) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23); +INSERT INTO `AbpAuditLogActions` (`Id`, `AuditLogId`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `MethodName`, `Parameters`, `ServiceName`, `TenantId`) +VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32), +(@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40, @p41); +2023-03-18 10:13:33.050 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:33.052 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:33.052 +08:00 [INF] Request finished HTTP/2 POST https://localhost:44333/Languages/Page application/json 3 - 200 - application/json;+charset=utf-8 279.9689ms +2023-03-18 10:13:41.511 +08:00 [INF] Request starting HTTP/2 POST https://localhost:44333/LanguageTexts/Create application/json 98 +2023-03-18 10:13:41.511 +08:00 [INF] CORS policy execution failed. +2023-03-18 10:13:41.511 +08:00 [INF] Request origin https://localhost:44333 does not have permission to access the resource. +2023-03-18 10:13:41.513 +08:00 [INF] Executing endpoint 'Lion.AbpPro.LanguageManagement.LanguageTexts.LanguageTextController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:13:41.516 +08:00 [INF] Route matched with {action = "Create", controller = "LanguageText", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task CreateAsync(Lion.AbpPro.LanguageManagement.LanguageTexts.CreateLanguageTextInput) on controller Lion.AbpPro.LanguageManagement.LanguageTexts.LanguageTextController (Lion.AbpPro.LanguageManagement.HttpApi). +2023-03-18 10:13:41.694 +08:00 [INF] Executed DbCommand (14ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 40), @p2='?' (DbType = DateTime), @p3='?' (DbType = Guid), @p4='?' (Size = 128), @p5='?' (DbType = Guid), @p6='?' (DbType = DateTime), @p7='?' (Size = 4000), @p8='?' (DbType = DateTime), @p9='?' (DbType = Guid), @p10='?' (Size = 256), @p11='?' (Size = 128), @p12='?' (DbType = Guid), @p13='?' (Size = 256)], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO `AbpLanguageTexts` (`Id`, `ConcurrencyStamp`, `CreationTime`, `CreatorId`, `CultureName`, `DeleterId`, `DeletionTime`, `ExtraProperties`, `LastModificationTime`, `LastModifierId`, `Name`, `ResourceName`, `TenantId`, `Value`) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13); +SELECT `IsDeleted` +FROM `AbpLanguageTexts` +WHERE ROW_COUNT() = 1 AND `Id` = @p0; +2023-03-18 10:13:41.698 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:41.701 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:41.706 +08:00 [INF] Executed action Lion.AbpPro.LanguageManagement.LanguageTexts.LanguageTextController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi) in 190.5879ms +2023-03-18 10:13:41.706 +08:00 [INF] Executed endpoint 'Lion.AbpPro.LanguageManagement.LanguageTexts.LanguageTextController.CreateAsync (Lion.AbpPro.LanguageManagement.HttpApi)' +2023-03-18 10:13:41.720 +08:00 [INF] Executed DbCommand (2ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 96), @p2='?' (Size = 512), @p3='?' (Size = 64), @p4='?' (Size = 64), @p5='?' (Size = 128), @p6='?' (Size = 256), @p7='?' (Size = 40), @p8='?' (Size = 64), @p9='?' (Size = 4000), @p10='?' (DbType = Int32), @p11='?' (DbType = DateTime), @p12='?' (Size = 4000), @p13='?' (Size = 16), @p14='?' (DbType = Int32), @p15='?' (DbType = Guid), @p16='?' (Size = 64), @p17='?' (DbType = Guid), @p18='?' (Size = 256), @p19='?' (DbType = Guid), @p20='?' (Size = 64), @p21='?' (Size = 256), @p22='?' (DbType = Guid), @p23='?' (Size = 256), @p24='?' (DbType = Guid), @p25='?' (DbType = Guid), @p26='?' (DbType = Int32), @p27='?' (DbType = DateTime), @p28='?' (Size = 4000), @p29='?' (Size = 128), @p30='?' (Size = 2000), @p31='?' (Size = 256), @p32='?' (DbType = Guid), @p33='?' (DbType = Guid), @p34='?' (DbType = Guid), @p35='?' (DbType = Int32), @p36='?' (DbType = DateTime), @p37='?' (Size = 4000), @p38='?' (Size = 128), @p39='?' (Size = 2000), @p40='?' (Size = 256), @p41='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO `AbpAuditLogs` (`Id`, `ApplicationName`, `BrowserInfo`, `ClientId`, `ClientIpAddress`, `ClientName`, `Comments`, `ConcurrencyStamp`, `CorrelationId`, `Exceptions`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `HttpMethod`, `HttpStatusCode`, `ImpersonatorTenantId`, `ImpersonatorTenantName`, `ImpersonatorUserId`, `ImpersonatorUserName`, `TenantId`, `TenantName`, `Url`, `UserId`, `UserName`) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23); +INSERT INTO `AbpAuditLogActions` (`Id`, `AuditLogId`, `ExecutionDuration`, `ExecutionTime`, `ExtraProperties`, `MethodName`, `Parameters`, `ServiceName`, `TenantId`) +VALUES (@p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32), +(@p33, @p34, @p35, @p36, @p37, @p38, @p39, @p40, @p41); +2023-03-18 10:13:41.724 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:41.725 +08:00 [DBG] Added 0 entity changes to the current audit log +2023-03-18 10:13:41.725 +08:00 [INF] Request finished HTTP/2 POST https://localhost:44333/LanguageTexts/Create application/json 98 - 204 - - 214.5777ms diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.Designer.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.Designer.cs new file mode 100644 index 00000000..6d55a322 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.Designer.cs @@ -0,0 +1,187 @@ +// +using System; +using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Lion.AbpPro.LanguageManagement.Migrations +{ + [DbContext(typeof(LanguageManagementHttpApiHostMigrationsDbContext))] + [Migration("20230318020647_Init")] + partial class Init + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .IsRequired() + .HasColumnType("longtext") + .HasComment("图标"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.ToTable("AbpLanguages", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.cs new file mode 100644 index 00000000..679ff5b4 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/20230318020647_Init.cs @@ -0,0 +1,97 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Lion.AbpPro.LanguageManagement.Migrations +{ + /// + public partial class Init : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpLanguages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称") + .Annotation("MySql:CharSet", "utf8mb4"), + UiCultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "Ui语言名称") + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "显示名称") + .Annotation("MySql:CharSet", "utf8mb4"), + FlagIcon = table.Column(type: "longtext", nullable: false, comment: "图标") + .Annotation("MySql:CharSet", "utf8mb4"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLanguages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpLanguageTexts", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ResourceName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "资源名称") + .Annotation("MySql:CharSet", "utf8mb4"), + CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称") + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "名称") + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "值") + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLanguageTexts", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLanguageTexts_TenantId_ResourceName_CultureName", + table: "AbpLanguageTexts", + columns: new[] { "TenantId", "ResourceName", "CultureName" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpLanguages"); + + migrationBuilder.DropTable( + name: "AbpLanguageTexts"); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/LanguageManagementHttpApiHostMigrationsDbContextModelSnapshot.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/LanguageManagementHttpApiHostMigrationsDbContextModelSnapshot.cs new file mode 100644 index 00000000..b7243fce --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Migrations/LanguageManagementHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,184 @@ +// +using System; +using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Lion.AbpPro.LanguageManagement.Migrations +{ + [DbContext(typeof(LanguageManagementHttpApiHostMigrationsDbContext))] + partial class LanguageManagementHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .IsRequired() + .HasColumnType("longtext") + .HasComment("图标"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.ToTable("AbpLanguages", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Program.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Program.cs new file mode 100644 index 00000000..98e626f4 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Program.cs @@ -0,0 +1,47 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public class Program + { + public static int Main(string[] args) + { + Log.Logger = new LoggerConfiguration() +#if DEBUG + .MinimumLevel.Debug() +#else + .MinimumLevel.Information() +#endif + .MinimumLevel.Override("Microsoft", LogEventLevel.Information) + .Enrich.FromLogContext() + .WriteTo.Async(c => c.File("Logs/logs.txt")) +#if DEBUG + .WriteTo.Async(c => c.Console()) +#endif + .CreateLogger(); + + try + { + Log.Information("Starting web host."); + CreateHostBuilder(args).Build().Run(); + return 0; + } + catch (Exception ex) + { + Log.Fatal(ex, "Host terminated unexpectedly!"); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } + + internal static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }) + .UseAutofac() + .UseSerilog(); + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Properties/launchSettings.json b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Properties/launchSettings.json new file mode 100644 index 00000000..6d6ae507 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "https://localhost:44333", + "sslPort": 44333 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Lion.AbpPro.LanguageManagement.HttpApi.Host": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:44333", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Startup.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Startup.cs new file mode 100644 index 00000000..ef25072e --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Startup.cs @@ -0,0 +1,15 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public class Startup + { + public void ConfigureServices(IServiceCollection services) + { + services.AddApplication(); + } + + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) + { + app.InitializeApplication(); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/appsettings.json b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/appsettings.json new file mode 100644 index 00000000..03444813 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/appsettings.json @@ -0,0 +1,13 @@ +{ + "App": { + "CorsOrigins": "https://*.LanguageManagement.com,http://localhost:4200,http://localhost:44307,https://localhost:44307" + }, + "ConnectionStrings": { + "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true", + "LanguageManagement": "Data Source=localhost;Database=LanguageManagement;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + }, + "Redis": { + "Configuration": "localhost,password=1q2w3E*", + "DatabaseId": 1 + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/GlobalUsings.cs new file mode 100644 index 00000000..6812945b --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Global using directives + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Text; +global using System.Threading; +global using System.Threading.Tasks; +global using Lion.AbpPro.Core; +global using Lion.AbpPro.LanguageManagement.Localization; +global using Volo.Abp.Application; +global using Volo.Abp.Application.Dtos; +global using Volo.Abp.Application.Services; +global using Volo.Abp.Authorization; +global using Volo.Abp.Authorization.Permissions; +global using Volo.Abp.Localization; +global using Volo.Abp.Modularity; +global using Volo.Abp.Reflection; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationContractsModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationContractsModule.cs new file mode 100644 index 00000000..2cba331c --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationContractsModule.cs @@ -0,0 +1,12 @@ +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(LanguageManagementDomainSharedModule), + typeof(AbpDddApplicationContractsModule), + typeof(AbpAuthorizationModule) + )] + public class LanguageManagementApplicationContractsModule : AbpModule + { + + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationException.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationException.cs new file mode 100644 index 00000000..4febcda7 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageManagementApplicationException.cs @@ -0,0 +1,17 @@ +using Microsoft.Extensions.Logging; +using Volo.Abp; + +namespace Lion.AbpPro.LanguageManagement; + +public class LanguageManagementApplicationException : BusinessException +{ + public LanguageManagementApplicationException( + string code = null, + string message = null, + string details = null, + Exception innerException = null, + LogLevel logLevel = LogLevel.Warning) + : base(code, message, details, innerException, logLevel) + { + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/CreateLanguageTextInput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/CreateLanguageTextInput.cs new file mode 100644 index 00000000..4514d4c3 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/CreateLanguageTextInput.cs @@ -0,0 +1,30 @@ +using System.ComponentModel.DataAnnotations; + +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +/// +/// 创建语言文本 +/// +public class CreateLanguageTextInput +{ + /// + /// 资源名称 + /// + [Required(ErrorMessage = "资源名称不能为空")] + public string ResourceName { get; set; } + /// + /// 语言名称 + /// + [Required(ErrorMessage = "语言名称不能为空")] + public string CultureName { get; set; } + /// + /// 名称 + /// + [Required(ErrorMessage = "名称不能为空")] + public string Name { get; set; } + /// + /// 值 + /// + [Required(ErrorMessage = "值不能为空")] + public string Value { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/ILanguageTextAppService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/ILanguageTextAppService.cs new file mode 100644 index 00000000..d435e86a --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/ILanguageTextAppService.cs @@ -0,0 +1,28 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + + +/// +/// 语言文本 +/// +public interface ILanguageTextAppService : IApplicationService +{ + /// + /// 获取所有资源 + /// + Task>> AllResourceListAsync(); + + /// + /// 分页查询语言文本 + /// + Task> PageAsync(PageLanguageTextInput input); + + /// + /// 创建语言文本 + /// + Task CreateAsync(CreateLanguageTextInput input); + + /// + /// 编辑语言文本 + /// + Task UpdateAsync(UpdateLanguageTextInput input); +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextInput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextInput.cs new file mode 100644 index 00000000..380efc80 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextInput.cs @@ -0,0 +1,24 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +/// +/// 创建语言文本 +/// +public class PageLanguageTextInput : PagingBase +{ + + /// + /// 语言 + /// + public string CultureName { get; set; } + + /// + /// 资源 + /// + public string ResourceName { get; set; } + + /// + /// 查询条件 name or value + /// + public string Filter { get; set; } + +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextOutput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextOutput.cs new file mode 100644 index 00000000..8aeea96f --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/PageLanguageTextOutput.cs @@ -0,0 +1,22 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +/// +/// 创建语言文本 +/// +public class PageLanguageTextOutput +{ + /// + /// 资源名称 + /// + public string ResourceName { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 值 + /// + public string Value { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/UpdateLanguageTextInput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/UpdateLanguageTextInput.cs new file mode 100644 index 00000000..1a7706aa --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/LanguageTexts/UpdateLanguageTextInput.cs @@ -0,0 +1,33 @@ +using System.ComponentModel.DataAnnotations; + +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +/// +/// 删除语言文本 +/// +public class UpdateLanguageTextInput +{ + /// + /// 资源名称 + /// + [Required(ErrorMessage = "资源名称不能为空")] + public string ResourceName { get; set; } + + /// + /// 语言名称 + /// + [Required(ErrorMessage = "语言名称不能为空")] + public string CultureName { get; set; } + + /// + /// 名称 + /// + [Required(ErrorMessage = "名称不能为空")] + public string Name { get; set; } + + /// + /// 值 + /// + [Required(ErrorMessage = "值不能为空")] + public string Value { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/CreateLanguageInput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/CreateLanguageInput.cs new file mode 100644 index 00000000..d1d635dc --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/CreateLanguageInput.cs @@ -0,0 +1,34 @@ +using System.ComponentModel.DataAnnotations; + +namespace Lion.AbpPro.LanguageManagement.Languages; + +/// +/// 创建语言 +/// +public class CreateLanguageInput +{ + /// + /// 语言名称 + /// + [Required(ErrorMessage = "语言名称不能为空")] + public string CultureName { get; set; } + /// + /// Ui语言名称 + /// + [Required(ErrorMessage = "Ui语言名称不能为空")] + public string UiCultureName { get; set; } + /// + /// 显示名称 + /// + [Required(ErrorMessage = "显示名称不能为空")] + public string DisplayName { get; set; } + /// + /// 图标 + /// + public string FlagIcon { get; set; } + /// + /// 是否启用 + /// + [Required(ErrorMessage = "是否启用不能为空")] + public bool IsEnabled { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/DeleteLanguageInput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/DeleteLanguageInput.cs new file mode 100644 index 00000000..70e54853 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/DeleteLanguageInput.cs @@ -0,0 +1,12 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +/// +/// 删除语言 +/// +public class DeleteLanguageInput +{ + /// + /// 语言Id + /// + public Guid Id { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/ILanguageAppService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/ILanguageAppService.cs new file mode 100644 index 00000000..8d1e7339 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/ILanguageAppService.cs @@ -0,0 +1,39 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + + +/// +/// 语言 +/// +public interface ILanguageAppService : IApplicationService +{ + + /// + /// 获取所有语言 + /// + Task> AllListAsync(); + + /// + /// 分页查询语言 + /// + Task> PageAsync(PageLanguageInput input); + + /// + /// 创建语言 + /// + Task CreateAsync(CreateLanguageInput input); + + /// + /// 编辑语言 + /// + Task UpdateAsync(UpdateLanguageInput input); + + /// + /// 删除语言 + /// + Task DeleteAsync(DeleteLanguageInput input); + + /// + /// 设置默认语言 + /// + Task SetDefaultAsync(IdInput input); +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageInput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageInput.cs new file mode 100644 index 00000000..1df258b1 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageInput.cs @@ -0,0 +1,9 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +/// +/// 创建语言 +/// +public class PageLanguageInput : PagingBase +{ + public string Filter { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageOutput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageOutput.cs new file mode 100644 index 00000000..1d2f8736 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/PageLanguageOutput.cs @@ -0,0 +1,43 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +/// +/// 创建语言 +/// +public class PageLanguageOutput +{ + /// + /// 语言Id + /// + public Guid Id { get; set; } + + /// + /// 语言名称 + /// + public string CultureName { get; set; } + /// + /// Ui语言名称 + /// + public string UiCultureName { get; set; } + /// + /// 显示名称 + /// + public string DisplayName { get; set; } + /// + /// 图标 + /// + public string FlagIcon { get; set; } + /// + /// 是否启用 + /// + public bool IsEnabled { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } + + /// + /// 是否是默认语言 + /// + public bool IsDefault { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/UpdateLanguageInput.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/UpdateLanguageInput.cs new file mode 100644 index 00000000..ab30de3f --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Languages/UpdateLanguageInput.cs @@ -0,0 +1,39 @@ +using System.ComponentModel.DataAnnotations; + +namespace Lion.AbpPro.LanguageManagement.Languages; + +/// +/// 删除语言 +/// +public class UpdateLanguageInput +{ + /// + /// 语言Id + /// + public Guid Id { get; set; } + + /// + /// 语言名称 + /// + [Required(ErrorMessage = "语言名称不能为空")] + public string CultureName { get; set; } + /// + /// Ui语言名称 + /// + [Required(ErrorMessage = "Ui语言名称不能为空")] + public string UiCultureName { get; set; } + /// + /// 显示名称 + /// + [Required(ErrorMessage = "显示名称不能为空")] + public string DisplayName { get; set; } + /// + /// 图标 + /// + public string FlagIcon { get; set; } + /// + /// 是否启用 + /// + [Required(ErrorMessage = "是否启用不能为空")] + public bool IsEnabled { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj new file mode 100644 index 00000000..074074c5 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj @@ -0,0 +1,17 @@ + + + + net7.0 + Lion.AbpPro.LanguageManagement + + + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissionDefinitionProvider.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissionDefinitionProvider.cs new file mode 100644 index 00000000..c849b180 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissionDefinitionProvider.cs @@ -0,0 +1,28 @@ +namespace Lion.AbpPro.LanguageManagement.Permissions +{ + public class LanguageManagementPermissionDefinitionProvider : PermissionDefinitionProvider + { + public override void Define(IPermissionDefinitionContext context) + { + var abpIdentityGroup = context.GetGroup("AbpIdentity"); + // var languageManagement = context.AddGroup(LanguageManagementPermissions.GroupName, L("Permission:LanguageManagement")); + + + var languages = abpIdentityGroup.AddPermission(LanguageManagementPermissions.Languages.Default, L("Permission:Languages")); + languages.AddChild(LanguageManagementPermissions.Languages.Create, L("Permission:Create")); + languages.AddChild(LanguageManagementPermissions.Languages.Edit, L("Permission:Edit")); + languages.AddChild(LanguageManagementPermissions.Languages.Delete, L("Permission:Delete")); + languages.AddChild(LanguageManagementPermissions.Languages.ChangeDefault, L("Permission:LanguagesChangeDefault")); + + + var languageTexts = abpIdentityGroup.AddPermission(LanguageManagementPermissions.LanguageTexts.Default, L("Permission:LanguageTexts")); + languageTexts.AddChild(LanguageManagementPermissions.LanguageTexts.Edit, L("Permission:Edit")); + languageTexts.AddChild(LanguageManagementPermissions.LanguageTexts.Create, L("Permission:Create")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissions.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissions.cs new file mode 100644 index 00000000..3a927162 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Permissions/LanguageManagementPermissions.cs @@ -0,0 +1,36 @@ +namespace Lion.AbpPro.LanguageManagement.Permissions +{ + public class LanguageManagementPermissions + { + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(LanguageManagementPermissions)); + } + + + //public const string GroupName = "LanguageManagement"; + public const string GroupName = "AbpIdentity"; + + public class LanguageTexts + { + public const string Default = "AbpIdentity.LanguageTexts"; + + public const string Create = "AbpIdentity.LanguageTexts.Create"; + + public const string Edit = "AbpIdentity.LanguageTexts.Edit"; + } + + public class Languages + { + public const string Default = "AbpIdentity.Languages"; + + public const string Edit = "AbpIdentity.Languages.Edit"; + + public const string Create = "AbpIdentity.Languages.Create"; + + public const string ChangeDefault = "AbpIdentity.Languages.ChangeDefault"; + + public const string Delete = "AbpIdentity.Languages.Delete"; + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs new file mode 100644 index 00000000..6a66cf0f --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs @@ -0,0 +1,24 @@ +// Global using directives + +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; +global using AutoMapper; +global using Lion.AbpPro.Core; +global using Lion.AbpPro.LanguageManagement.Languages.Aggregates; +global using Lion.AbpPro.LanguageManagement.Localization; +global using Lion.AbpPro.LanguageManagement.Permissions; +global using Microsoft.AspNetCore.Authorization; +global using Microsoft.Extensions.DependencyInjection; +global using Microsoft.Extensions.Localization; +global using Microsoft.Extensions.Options; +global using Volo.Abp; +global using Volo.Abp.Application; +global using Volo.Abp.Application.Dtos; +global using Volo.Abp.Application.Services; +global using Volo.Abp.AutoMapper; +global using Volo.Abp.Localization; +global using Volo.Abp.Localization.External; +global using Volo.Abp.Modularity; +global using Volo.Abp.SettingManagement; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementAppService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementAppService.cs new file mode 100644 index 00000000..adc5b200 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementAppService.cs @@ -0,0 +1,11 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public abstract class LanguageManagementAppService : ApplicationService + { + protected LanguageManagementAppService() + { + LocalizationResource = typeof(LanguageManagementResource); + ObjectMapperContext = typeof(LanguageManagementApplicationModule); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs new file mode 100644 index 00000000..405f31a0 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs @@ -0,0 +1,15 @@ +using Lion.AbpPro.LanguageManagement.Languages; +using Lion.AbpPro.LanguageManagement.LanguageTexts; + +namespace Lion.AbpPro.LanguageManagement +{ + public class LanguageManagementApplicationAutoMapperProfile : Profile + { + public LanguageManagementApplicationAutoMapperProfile() + { + CreateMap(); + CreateMap(); + CreateMap(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs new file mode 100644 index 00000000..5ddd490b --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs @@ -0,0 +1,20 @@ +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(LanguageManagementDomainModule), + typeof(LanguageManagementApplicationContractsModule), + typeof(AbpDddApplicationModule), + typeof(AbpAutoMapperModule) + )] + public class LanguageManagementApplicationModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: true); + }); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageTexts/LanguageTextAppService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageTexts/LanguageTextAppService.cs new file mode 100644 index 00000000..30cf0334 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageTexts/LanguageTextAppService.cs @@ -0,0 +1,165 @@ +using System.Globalization; +using Volo.Abp.Json; + +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +/// +/// 语言文本 +/// +[Authorize] +public class LanguageTextAppService : ApplicationService, ILanguageTextAppService +{ + private readonly ILanguageTextManager _languageTextManager; + private readonly IStringLocalizerFactory _stringLocalizerFactory; + private readonly ILocalizationHelper _localizationHelper; + + public LanguageTextAppService( + ILanguageTextManager languageTextManager, + IStringLocalizerFactory stringLocalizerFactory, + IOptions localizationOptions, + IExternalLocalizationStore externalLocalizationStore, + ILocalizationHelper localizationHelper) + { + _languageTextManager = languageTextManager; + _stringLocalizerFactory = stringLocalizerFactory; + _localizationHelper = localizationHelper; + } + + /// + /// 获取所有资源 + /// + public async Task>> AllResourceListAsync() + { + var result = new List>(); + foreach (var item in await _localizationHelper.GetAllResourceName()) + { + result.Add(new FromSelector(item, item)); + } + + return result; + } + + /// + /// 分页查询语言文本 + /// + public async Task> PageAsync(PageLanguageTextInput input) + { + if (!CultureHelper.IsValidCultureCode(input.CultureName)) + { + throw new LanguageManagementApplicationException(LanguageManagementErrorCodes.CultureNotValid); + } + + var list = await FindLocalizationsAsync(input.CultureName); + + var queryable = list + .AsQueryable() + .WhereIf(input.ResourceName.IsNotNullOrWhiteSpace(), e => e.ResourceName == input.ResourceName) + .WhereIf(input.Filter.IsNotNullOrWhiteSpace(), e => e.Name.Contains(input.Filter) || e.Value.Contains(input.Filter)); + var result = new PagedResultDto + { + Items = queryable.OrderBy(e => e.Name).PageBy(input.SkipCount, input.PageSize).ToList(), + TotalCount = queryable.Count() + }; + + return result; + } + + protected virtual async Task> FindLocalizationsAsync(string cultureName) + { + var list = new List(); + using (CultureHelper.Use(cultureName)) + { + foreach (var resource in await _localizationHelper.GetAllResourceName()) + { + var localizer = await _stringLocalizerFactory.CreateByResourceNameOrNullAsync(resource); + if (localizer != null) + { + foreach (var localizedString in await localizer.GetAllStringsAsync(false, false, true)) + { + var item = new PageLanguageTextOutput + { + //CultureName = resource.DefaultCultureName, + ResourceName = resource, + Name = localizedString.Name, + Value = localizedString.Value + }; + if (list.Contains(item)) continue; + list.Add(item); + } + } + } + } + + return list; + } + + + /// + /// 创建语言文本 + /// + [Authorize(LanguageManagementPermissions.LanguageTexts.Create)] + public async Task CreateAsync(CreateLanguageTextInput input) + { + var localizedString = await GetLocalizedStringAsync(input.ResourceName, input.CultureName, input.Name); + if (localizedString != null && localizedString.Value == input.Value) + { + throw new LanguageManagementApplicationException(LanguageManagementErrorCodes.LanguageTextExist).WithData("Name", input.Name); + } + + await _languageTextManager.CreateAsync( + GuidGenerator.Create(), + input.CultureName, + input.ResourceName, + input.Name, + input.Value + ); + } + + /// + /// 编辑语言文本 + /// + [Authorize(LanguageManagementPermissions.LanguageTexts.Edit)] + public async Task UpdateAsync(UpdateLanguageTextInput input) + { + var localizedString = await GetLocalizedStringAsync(input.ResourceName, input.CultureName, input.Name); + if (localizedString == null) throw new LanguageManagementApplicationException(LanguageManagementErrorCodes.ResourceNotFound); + if (localizedString.Value == input.Value) return; + + await _languageTextManager.UpdateAsync( + input.CultureName, + input.ResourceName, + input.Name, + input.Value + ); + } + + /// + /// 获取执行语言 + /// + protected virtual async Task GetLocalizedStringAsync(string resourceName, string cultureName, string name) + { + using (CultureHelper.Use(cultureName)) + { + if (!(await _localizationHelper.IsValidResourceName(resourceName))) + + { + throw new LanguageManagementApplicationException(LanguageManagementErrorCodes.ResourceNotFound); + } + + + var localizer = await _stringLocalizerFactory.CreateByResourceNameOrNullAsync(resourceName); + + if (localizer == null) + { + throw new LanguageManagementApplicationException(LanguageManagementErrorCodes.ResourceNotFound); + } + + var localizedStrings = await localizer.GetAllStringsAsync(); + + var localizedString = localizedStrings.FirstOrDefault(e => e.Name == name); + + + return localizedString; + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs new file mode 100644 index 00000000..575b075f --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs @@ -0,0 +1,94 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +/// +/// 语言 +/// +[Authorize] +public class LanguageAppService : ApplicationService, ILanguageAppService +{ + private readonly LanguageManager _languageManager; + private readonly ISettingManager _settingManager; + + public LanguageAppService(LanguageManager languageManager, ISettingManager settingManager) + { + _languageManager = languageManager; + _settingManager = settingManager; + } + + /// + /// 获取所有语言 + /// + public async Task> AllListAsync() + { + var languages = await _languageManager.ListAsync(); + var list = ObjectMapper.Map, List>(languages); + return list; + } + + + /// + /// 分页查询语言 + /// + public async Task> PageAsync(PageLanguageInput input) + { + var result = new PagedResultDto(); + var totalCount = await _languageManager.CountAsync(input.Filter); + result.TotalCount = totalCount; + if (totalCount <= 0) return result; + var list = await _languageManager.GetListAsync(input.PageSize, input.SkipCount, input.Filter); + result.Items = ObjectMapper.Map, List>(list); + return result; + } + + /// + /// 创建语言 + /// + [Authorize(LanguageManagementPermissions.Languages.Create)] + public Task CreateAsync(CreateLanguageInput input) + { + return _languageManager.CreateAsync( + GuidGenerator.Create(), + input.CultureName, + input.UiCultureName, + input.DisplayName, + input.FlagIcon, + input.IsEnabled + ); + } + + /// + /// 编辑语言 + /// + [Authorize(LanguageManagementPermissions.Languages.Edit)] + public Task UpdateAsync(UpdateLanguageInput input) + { + return _languageManager.UpdateAsync( + input.Id, + input.CultureName, + input.UiCultureName, + input.DisplayName, + input.FlagIcon, + input.IsEnabled + ); + } + + /// + /// 删除语言 + /// + [Authorize(LanguageManagementPermissions.Languages.Delete)] + public Task DeleteAsync(DeleteLanguageInput input) + { + return _languageManager.DeleteAsync(input.Id); + } + + /// + /// 设置默认语言 + /// + [Authorize(LanguageManagementPermissions.Languages.ChangeDefault)] + public async Task SetDefaultAsync(IdInput input) + { + var language = await _languageManager.GetAsync(input.Id); + await _settingManager.SetForCurrentTenantAsync(LanguageManagementConsts.SettingDefaultLanguage, language.CultureName + ";" + language.UiCultureName, false); + await _languageManager.SetDefaultAsync(input.Id); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj new file mode 100644 index 00000000..7aa325db --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj @@ -0,0 +1,15 @@ + + + + net7.0 + Lion.AbpPro.LanguageManagement + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/GlobalUsings.cs new file mode 100644 index 00000000..761603b0 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/GlobalUsings.cs @@ -0,0 +1,14 @@ +// Global using directives + +global using System; +global using System.Collections.Generic; +global using System.Runtime.Serialization; +global using Lion.AbpPro.LanguageManagement.Localization; +global using Microsoft.Extensions.Logging; +global using Volo.Abp; +global using Volo.Abp.Localization; +global using Volo.Abp.Localization.ExceptionHandling; +global using Volo.Abp.Modularity; +global using Volo.Abp.Validation; +global using Volo.Abp.Validation.Localization; +global using Volo.Abp.VirtualFileSystem; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementConsts.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementConsts.cs new file mode 100644 index 00000000..172cabce --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementConsts.cs @@ -0,0 +1,16 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public class LanguageManagementConsts + { + /// 名称空间 + public const string NameSpace = "Lion.AbpPro.LanguageManagement"; + + /// 默认语言 + public const string DefaultCultureName = "zh-Hans"; + + /// + /// setting默认语言配置 + /// + public const string SettingDefaultLanguage = "Abp.Localization.DefaultLanguage"; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainException.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainException.cs new file mode 100644 index 00000000..f4573436 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainException.cs @@ -0,0 +1,17 @@ +using Microsoft.Extensions.Logging; +using Volo.Abp; + +namespace Lion.AbpPro.LanguageManagement; + +public class LanguageManagementDomainException : BusinessException +{ + public LanguageManagementDomainException( + string code = null, + string message = null, + string details = null, + Exception innerException = null, + LogLevel logLevel = LogLevel.Warning) + : base(code, message, details, innerException, logLevel) + { + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs new file mode 100644 index 00000000..1a436001 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs @@ -0,0 +1,32 @@ +using Lion.AbpPro.Core; + +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(AbpValidationModule), + typeof(LionAbpProCoreModule) + )] + public class LanguageManagementDomainSharedModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Add(LanguageManagementConsts.DefaultCultureName) + .AddBaseTypes(typeof(AbpValidationResource)) + .AddVirtualJson("/Localization/LanguageManagement"); + }); + + Configure(options => + { + options.MapCodeNamespace(LanguageManagementConsts.NameSpace, typeof(LanguageManagementResource)); + }); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementErrorCodes.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementErrorCodes.cs new file mode 100644 index 00000000..d98d5434 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementErrorCodes.cs @@ -0,0 +1,12 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public static class LanguageManagementErrorCodes + { + public const string CultureNotValid = LanguageManagementConsts.NameSpace + ":100001"; + public const string ResourceNotFound = LanguageManagementConsts.NameSpace + ":100002"; + public const string LanguageNotFound = LanguageManagementConsts.NameSpace + ":100003"; + public const string LanguageExist = LanguageManagementConsts.NameSpace + ":100004"; + public const string LanguageTextNotFound = LanguageManagementConsts.NameSpace + ":100005"; + public const string LanguageTextExist = LanguageManagementConsts.NameSpace + ":100006"; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextCacheItem.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextCacheItem.cs new file mode 100644 index 00000000..44a3c30b --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextCacheItem.cs @@ -0,0 +1,16 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +public class LanguageTextCacheItem +{ + public Dictionary Dictionary { get; set; } + + public LanguageTextCacheItem() + { + this.Dictionary = new Dictionary(); + } + + public static string CalculateCacheKey(string resourceName, string cultureName) + { + return resourceName + "_" + cultureName; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextDto.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextDto.cs new file mode 100644 index 00000000..8f1ea63a --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageTexts/LanguageTextDto.cs @@ -0,0 +1,35 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +public class LanguageTextDto +{ + /// + /// 主键Id + /// + public Guid Id { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } + + /// + /// 资源名称 + /// + public string ResourceName { get; set; } + + /// + /// 语言名称 + /// + public string CultureName { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 值 + /// + public string Value { get; set; } + +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageDto.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageDto.cs new file mode 100644 index 00000000..b22b23c5 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageDto.cs @@ -0,0 +1,44 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +public class LanguageDto +{ + /// + /// 主键Id + /// + public Guid Id { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } + + /// + /// 语言名称 + /// + public string CultureName { get; set; } + + /// + /// Ui语言名称 + /// + public string UiCultureName { get; set; } + + /// + /// 显示名称 + /// + public string DisplayName { get; set; } + + /// + /// 图标 + /// + public string FlagIcon { get; set; } + + /// + /// 是否启用 + /// + public bool IsEnabled { get; set; } + + /// + /// 是否默认语言 + /// + public bool IsDefault { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageListCacheItem.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageListCacheItem.cs new file mode 100644 index 00000000..d7dfd1f4 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Languages/LanguageListCacheItem.cs @@ -0,0 +1,16 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +public class LanguageListCacheItem +{ + public List Languages { get; set; } + + public LanguageListCacheItem(List languages) + { + this.Languages = languages; + } + + public static string CalculateCacheKey() + { + return "AllLanguages"; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj new file mode 100644 index 00000000..b6a0da43 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj @@ -0,0 +1,24 @@ + + + + net7.0 + Lion.AbpPro.LanguageManagement + true + + + + + + + + + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/ar.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/ar.json new file mode 100644 index 00000000..f9012cde --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/ar.json @@ -0,0 +1,7 @@ +{ + "culture": "ar", + "texts": { + "ManageYourProfile": "إدارة ملفى", + "SamplePageMessage": "صفحة نموذجية للوحدة النمطية LanguageManagement" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/cs.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/cs.json new file mode 100644 index 00000000..812b2f0b --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/cs.json @@ -0,0 +1,7 @@ +{ + "culture": "cs", + "texts": { + "ManageYourProfile": "Spravovat profil", + "SamplePageMessage": "Ukázková stránka pro modul LanguageManagement" + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/de-DE.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/de-DE.json new file mode 100644 index 00000000..7a4cbf23 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/de-DE.json @@ -0,0 +1,7 @@ +{ + "culture": "de-DE", + "texts": { + "ManageYourProfile": "Verwalten Sie Ihr Profil", + "SamplePageMessage": "Eine Beispielseite für das Modul LanguageManagementModul" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en-GB.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en-GB.json new file mode 100644 index 00000000..510cd939 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "ManageYourProfile": "Manage your profile", + "SamplePageMessage": "A sample page for the LanguageManagement module" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en.json new file mode 100644 index 00000000..c037d61f --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/en.json @@ -0,0 +1,20 @@ +{ + "culture": "en", + "texts": { + "ManageYourProfile": "Manage your profile", + "SamplePageMessage": "A sample page for the LanguageManagement module", + "Permission:LanguageManagement": "LanguageManagement", + "Permission:Languages": "Languages", + "Permission:LanguageTexts": "LanguageText", + "Permission:Create": "Create", + "Permission:Update": "Update", + "Permission:Delete": "Delete", + "Permission:LanguagesChangeDefault": "Change Default Language", + "Lion.AbpPro.LanguageManagement:100001": "The selected culture is not valid! Make sure you enter a valid culture name", + "Lion.AbpPro.LanguageManagement:100002": "Language resources not found", + "Lion.AbpPro.LanguageManagement:100003": "Language not found", + "Lion.AbpPro.LanguageManagement:100004": "Language exists", + "Lion.AbpPro.LanguageManagement:100005": "'{Name}' not found", + "Lion.AbpPro.LanguageManagement:100006": "'{Name}'exists" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/es.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/es.json new file mode 100644 index 00000000..33e53309 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/es.json @@ -0,0 +1,7 @@ +{ + "culture": "es", + "texts": { + "ManageYourProfile": "Gestiona tu perfil", + "SamplePageMessage": "Una página de ejemplo para el módulo LanguageManagement " + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/fr.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/fr.json new file mode 100644 index 00000000..2326efea --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/fr.json @@ -0,0 +1,7 @@ +{ + "culture": "fr", + "texts": { + "ManageYourProfile": "Gérer votre profil", + "SamplePageMessage": "Exemple de page pour le module LanguageManagement" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/hu.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/hu.json new file mode 100644 index 00000000..ba9de930 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "ManageYourProfile": "Kezelje a profilját", + "SamplePageMessage": "Mintaoldal a LanguageManagement modulhoz" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/nl.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/nl.json new file mode 100644 index 00000000..0678f2ad --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/nl.json @@ -0,0 +1,7 @@ +{ + "culture": "nl", + "texts": { + "ManageYourProfile": "Beheer uw profiel", + "SamplePageMessage": "Een voorbeeldpagina voor de LanguageManagement module" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pl-PL.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pl-PL.json new file mode 100644 index 00000000..3ea7b190 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pl-PL.json @@ -0,0 +1,6 @@ +{ + "culture": "pl-PL", + "texts": { + + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pt-BR.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pt-BR.json new file mode 100644 index 00000000..6d746df0 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/pt-BR.json @@ -0,0 +1,6 @@ +{ + "culture": "pt-BR", + "texts": { + + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/sl.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/sl.json new file mode 100644 index 00000000..687d4257 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/sl.json @@ -0,0 +1,6 @@ +{ + "culture": "sl", + "texts": { + "ManageYourProfile": "Upravljajte svojim profilom" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/tr.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/tr.json new file mode 100644 index 00000000..b71159ed --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/tr.json @@ -0,0 +1,7 @@ +{ + "culture": "tr", + "texts": { + "ManageYourProfile": "Profil yönetimi", + "SamplePageMessage": "LanguageManagement modulünden örnek bir sayfa" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/vi.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/vi.json new file mode 100644 index 00000000..d8eb5f3c --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/vi.json @@ -0,0 +1,6 @@ +{ + "culture": "vi", + "texts": { + + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hans.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hans.json new file mode 100644 index 00000000..3ea59996 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hans.json @@ -0,0 +1,20 @@ +{ + "culture": "zh-Hans", + "texts": { + "ManageYourProfile": "管理个人资料", + "SamplePageMessage": "LanguageManagement模块的示例页面", + "Permission:LanguageManagement": "语言管理", + "Permission:Languages": "语言", + "Permission:LanguageTexts": "语言文本", + "Permission:Create": "创建", + "Permission:Update": "编辑", + "Permission:Delete": "删除", + "Permission:LanguagesChangeDefault": "修改默认语言", + "Lion.AbpPro.LanguageManagement:100001": "所选区域性无效!确保输入有效的区域性名称", + "Lion.AbpPro.LanguageManagement:100002": "语言资源未找到", + "Lion.AbpPro.LanguageManagement:100003": "语言未找到", + "Lion.AbpPro.LanguageManagement:100004": "语言已存在", + "Lion.AbpPro.LanguageManagement:100005": "'{Name}'未找到", + "Lion.AbpPro.LanguageManagement:100006": "'{Name}'已存在" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hant.json b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hant.json new file mode 100644 index 00000000..6b70e6ed --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagement/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hant", + "texts": { + "ManageYourProfile": "管理個人資料" + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagementResource.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagementResource.cs new file mode 100644 index 00000000..11ff9d83 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Localization/LanguageManagementResource.cs @@ -0,0 +1,8 @@ +namespace Lion.AbpPro.LanguageManagement.Localization +{ + [LocalizationResourceName("LanguageManagement")] + public class LanguageManagementResource + { + + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/AbpLocalizationOptionsExtensions.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/AbpLocalizationOptionsExtensions.cs new file mode 100644 index 00000000..8550d53d --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/AbpLocalizationOptionsExtensions.cs @@ -0,0 +1,10 @@ +namespace Lion.AbpPro.LanguageManagement; + +public static class AbpLocalizationOptionsExtensions +{ + public static AbpLocalizationOptions AddDynamicResource(this AbpLocalizationOptions localizationOptions) + { + localizationOptions.GlobalContributors.Add(); + return localizationOptions; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Data/LanguageManagementDataSeedContributor.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Data/LanguageManagementDataSeedContributor.cs new file mode 100644 index 00000000..38eaf76a --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Data/LanguageManagementDataSeedContributor.cs @@ -0,0 +1,51 @@ +using Lion.AbpPro.LanguageManagement.Languages; +using Volo.Abp.SettingManagement; + +namespace Lion.AbpPro.LanguageManagement.Data; + +public class LanguageManagementDataSeedContributor : ITransientDependency, IDataSeedContributor +{ + private readonly ILanguageRepository _languageRepository; + private readonly AbpLocalizationOptions _localizationOptions; + private readonly IDataFilter _softDeleteFilter; + private readonly IGuidGenerator _guidGenerator; + private readonly ISettingManager _settingManager; + public LanguageManagementDataSeedContributor( + ILanguageRepository languageRepository, + IOptions localizationOptions, + IDataFilter softDeleteFilter, + IGuidGenerator guidGenerator, + ISettingManager settingManager) + { + _languageRepository = languageRepository; + _softDeleteFilter = softDeleteFilter; + _guidGenerator = guidGenerator; + _settingManager = settingManager; + _localizationOptions = localizationOptions.Value; + } + + public async Task SeedAsync(DataSeedContext context) + { + var defaultLanguage = await _settingManager.GetOrNullDefaultAsync(LanguageManagementConsts.SettingDefaultLanguage); + using (_softDeleteFilter.Disable()) + { + var languages = await _languageRepository.GetListAsync(); + foreach (var language in _localizationOptions.Languages) + { + if (!languages.Any(e => e.CultureName == language.CultureName && e.UiCultureName == language.UiCultureName)) + { + var isDefault = language.CultureName == defaultLanguage; + await _languageRepository.InsertAsync( + new Language( + _guidGenerator.Create(), + language.CultureName, + language.UiCultureName, + language.DisplayName, + language.FlagIcon, + true, + isDefault)); + } + } + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs new file mode 100644 index 00000000..9fecf102 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs @@ -0,0 +1,28 @@ +using Lion.AbpPro.LanguageManagement.Languages; + +namespace Lion.AbpPro.LanguageManagement; + +[Dependency(ReplaceServices = true)] +public class DatabaseLanguageProvider : ILanguageProvider, ITransientDependency +{ + private readonly ILanguageManager _languageManager; + private readonly IDistributedCache _distributedCache; + private readonly IObjectMapper _objectMapper; + + public DatabaseLanguageProvider(ILanguageManager languageManager, IDistributedCache distributedCache, IObjectMapper objectMapper) + { + _languageManager = languageManager; + _distributedCache = distributedCache; + _objectMapper = objectMapper; + } + + public virtual async Task> GetLanguagesAsync() + { + var result = await _distributedCache.GetOrAddAsync(LanguageListCacheItem.CalculateCacheKey(), async () => + { + var languages = await _languageManager.ListAsync(true); + return new LanguageListCacheItem(_objectMapper.Map, List>(languages)); + }); + return result.Languages; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicLocalizationResourceContributor.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicLocalizationResourceContributor.cs new file mode 100644 index 00000000..065ff015 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicLocalizationResourceContributor.cs @@ -0,0 +1,38 @@ +namespace Lion.AbpPro.LanguageManagement; + +public class DynamicLocalizationResourceContributor : ILocalizationResourceContributor +{ + private IDynamicResourceLocalizer DynamicResourceLocalizer; + private LocalizationResourceBase Resource; + + public bool IsDynamic => true; + + public void Initialize(LocalizationResourceInitializationContext context) + { + Resource = context.Resource; + DynamicResourceLocalizer = context.ServiceProvider.GetRequiredService(); + } + + public LocalizedString GetOrNull(string cultureName, string name) + { + return DynamicResourceLocalizer.GetOrNull(Resource, cultureName, name); + } + + public void Fill(string cultureName, Dictionary dictionary) + { + DynamicResourceLocalizer.Fill(Resource, cultureName, dictionary); + } + + public Task FillAsync(string cultureName, Dictionary dictionary) + { + DynamicResourceLocalizer.Fill(Resource, cultureName, dictionary); + return Task.CompletedTask; + } + + public async Task> GetSupportedCulturesAsync() + { + // TODO + await Task.CompletedTask; + return null; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicResourceLocalizer.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicResourceLocalizer.cs new file mode 100644 index 00000000..d5ec12bf --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DynamicResourceLocalizer.cs @@ -0,0 +1,54 @@ +using Lion.AbpPro.LanguageManagement.LanguageTexts; + +namespace Lion.AbpPro.LanguageManagement; + +/// +/// 动态资源 +/// +public class DynamicResourceLocalizer : IDynamicResourceLocalizer, ISingletonDependency +{ + private readonly ILanguageTextManager _languageTextManager; + private readonly IDistributedCache _distributedCache; + + public DynamicResourceLocalizer(ILanguageTextManager languageTextManager, IDistributedCache distributedCache) + { + _languageTextManager = languageTextManager; + _distributedCache = distributedCache; + } + + public LocalizedString GetOrNull(LocalizationResourceBase resource, string cultureName, string name) + { + var languageText = GetCacheLanguageText(resource, cultureName).GetAwaiter().GetResult(); + var value = languageText.Dictionary.GetOrDefault(name); + if (value == null) return null; + return new LocalizedString(name, value); + } + + public void Fill(LocalizationResourceBase resource, string cultureName, Dictionary dictionary) + { + var languageText = GetCacheLanguageText(resource, cultureName).GetAwaiter().GetResult(); + foreach (var keyValuePair in languageText.Dictionary) + { + dictionary[keyValuePair.Key] = new LocalizedString(keyValuePair.Key, keyValuePair.Value); + } + } + + protected virtual async Task GetCacheLanguageText(LocalizationResourceBase resource, string cultureName) + { + var result = await _distributedCache.GetOrAddAsync(LanguageTextCacheItem.CalculateCacheKey(resource.ResourceName, cultureName), + async () => await CreateCacheLanguageText(resource, cultureName)); + return result; + } + + protected virtual async Task CreateCacheLanguageText(LocalizationResourceBase resource, string cultureName) + { + var languageTexts = await _languageTextManager.FindAsync(cultureName, resource.ResourceName); + var result = new LanguageTextCacheItem(); + foreach (var languageText in languageTexts) + { + result.Dictionary[languageText.Name] = languageText.Value; + } + + return result; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs new file mode 100644 index 00000000..ae0cfe74 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs @@ -0,0 +1,36 @@ +// Global using directives + +global using System; +global using System.Collections.Generic; +global using System.ComponentModel.DataAnnotations; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; +global using AutoMapper; +global using Lion.AbpPro.Core; +global using Lion.AbpPro.LanguageManagement.Languages.Aggregates; +global using Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates; +global using Microsoft.Extensions.DependencyInjection; +global using Microsoft.Extensions.Localization; +global using Microsoft.Extensions.Logging; +global using Microsoft.Extensions.Options; +global using Volo.Abp; +global using Volo.Abp.AutoMapper; +global using Volo.Abp.Caching; +global using Volo.Abp.Data; +global using Volo.Abp.DependencyInjection; +global using Volo.Abp.Domain; +global using Volo.Abp.Domain.Entities.Auditing; +global using Volo.Abp.Domain.Entities.Events; +global using Volo.Abp.Domain.Repositories; +global using Volo.Abp.Domain.Services; +global using Volo.Abp.EventBus; +global using Volo.Abp.EventBus.Distributed; +global using Volo.Abp.Guids; +global using Volo.Abp.Localization; +global using Volo.Abp.Localization.External; +global using Volo.Abp.Modularity; +global using Volo.Abp.MultiTenancy; +global using Volo.Abp.ObjectMapping; +global using Volo.Abp.Settings; +global using Volo.Abp.Uow; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/IDynamicResourceLocalizer.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/IDynamicResourceLocalizer.cs new file mode 100644 index 00000000..e8b92814 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/IDynamicResourceLocalizer.cs @@ -0,0 +1,8 @@ +namespace Lion.AbpPro.LanguageManagement; + +public interface IDynamicResourceLocalizer +{ + LocalizedString GetOrNull(LocalizationResourceBase resource, string cultureName, string name); + + void Fill(LocalizationResourceBase resource, string cultureName, Dictionary dictionary); +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/ILocalizationHelper.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/ILocalizationHelper.cs new file mode 100644 index 00000000..076e3f7b --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/ILocalizationHelper.cs @@ -0,0 +1,18 @@ +namespace Lion.AbpPro.LanguageManagement; + +public interface ILocalizationHelper +{ + /// + /// 资源是否有效 + /// + Task IsValidResourceName(string resourceName); + + /// + /// 获取所有资源名 + /// + Task> GetAllResourceName(); + + IStringLocalizer GetLocalizer(LocalizationResource resource); + IStringLocalizer GetLocalizer(string recourseName); + LocalizationResource GetLocalizationResource(string resourceName); +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDbProperties.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDbProperties.cs new file mode 100644 index 00000000..b85b7223 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDbProperties.cs @@ -0,0 +1,11 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public static class LanguageManagementDbProperties + { + public static string DbTablePrefix { get; set; } = "Abp"; + + public static string DbSchema { get; set; } = null; + + public const string ConnectionStringName = "LanguageManagement"; + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs new file mode 100644 index 00000000..90a1b178 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs @@ -0,0 +1,15 @@ +using Lion.AbpPro.LanguageManagement.Languages; +using Lion.AbpPro.LanguageManagement.LanguageTexts; + +namespace Lion.AbpPro.LanguageManagement +{ + public class LanguageManagementDomainAutoMapperProfile : Profile + { + public LanguageManagementDomainAutoMapperProfile() + { + CreateMap(); + CreateMap(); + CreateMap(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs new file mode 100644 index 00000000..b87f9f51 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs @@ -0,0 +1,26 @@ +using Volo.Abp.SettingManagement; + +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(AbpDddDomainModule), + typeof(LanguageManagementDomainSharedModule), + typeof(AbpCachingModule), + typeof(AbpAutoMapperModule), + typeof(AbpSettingManagementDomainModule) + )] + public class LanguageManagementDomainModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.AddDynamicResource(); + }); + Configure(options => + { + options.AddMaps(); + }); + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs new file mode 100644 index 00000000..cc2b561d --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs @@ -0,0 +1,31 @@ +using IObjectMapper = Volo.Abp.ObjectMapping.IObjectMapper; + +namespace Lion.AbpPro.LanguageManagement +{ + public abstract class LanguageManagementDomainService : DomainService + { + protected Type ObjectMapperContext { get; set; } + + /// + /// 工作单元管理器 + /// + protected IUnitOfWorkManager UnitOfWorkManager => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 分布式事件总线 + /// + protected IDistributedEventBus DistributedEventBus => + LazyServiceProvider.LazyGetRequiredService(); + + /// + /// 对象映射器 + /// + protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService( + provider => + ObjectMapperContext == null + ? provider.GetRequiredService() + : (IObjectMapper)provider.GetRequiredService( + typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext))); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Aggregates/LanguageText.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Aggregates/LanguageText.cs new file mode 100644 index 00000000..66af3b6e --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Aggregates/LanguageText.cs @@ -0,0 +1,102 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates; + +public class LanguageText : FullAuditedAggregateRoot, IMultiTenant +{ + private LanguageText() + { + } + + + public LanguageText( + Guid id, + string cultureName, + string resourceName, + string name, + string value, + Guid? tenantId = null + ) : base(id) + { + SetResourceName(resourceName); + SetCultureName(cultureName); + SetName(name); + SetValue(value); + TenantId = tenantId; + } + + public Guid? TenantId { get; private set; } + + /// + /// 语言名称 + /// + public string CultureName { get; private set; } + + + /// + /// 资源名称 + /// + public string ResourceName { get; private set; } + + + /// + /// 名称 + /// + public string Name { get; private set; } + + /// + /// 值 + /// + public string Value { get; private set; } + + + /// + /// 设置资源名称 + /// + private void SetResourceName(string resourceName) + { + Guard.NotNullOrWhiteSpace(resourceName, nameof(resourceName), 128); + ResourceName = resourceName; + } + + /// + /// 设置语言名称 + /// + private void SetCultureName(string cultureName) + { + Guard.NotNullOrWhiteSpace(cultureName, nameof(cultureName), 128); + CultureName = cultureName; + } + + /// + /// 设置名称 + /// + private void SetName(string name) + { + Guard.NotNullOrWhiteSpace(name, nameof(name), 256); + Name = name; + } + + /// + /// 设置值 + /// + private void SetValue(string value) + { + Guard.NotNullOrWhiteSpace(value, nameof(value), 256); + Value = value; + } + + /// + /// 更新语言文本 + /// + public void Update( + string cultureName, + string resourceName, + string name, + string value + ) + { + SetResourceName(resourceName); + SetCultureName(cultureName); + SetName(name); + SetValue(value); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Caches/LanguageTexCacheInvalidator.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Caches/LanguageTexCacheInvalidator.cs new file mode 100644 index 00000000..0f97a32f --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/Caches/LanguageTexCacheInvalidator.cs @@ -0,0 +1,16 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts.Caches; + +public class LanguageTexCacheInvalidator : ILocalEventHandler>, ITransientDependency +{ + private readonly IDistributedCache _distributedCache; + + public LanguageTexCacheInvalidator(IDistributedCache distributedCache) + { + _distributedCache = distributedCache; + } + + public virtual async Task HandleEventAsync(EntityChangedEventData eventData) + { + await _distributedCache.RemoveAsync(LanguageTextCacheItem.CalculateCacheKey(eventData.Entity.ResourceName, eventData.Entity.CultureName)); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextManager.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextManager.cs new file mode 100644 index 00000000..566ffd87 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextManager.cs @@ -0,0 +1,48 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +public interface ILanguageTextManager +{ + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + /// 返回最大条数 + /// 跳过条数 + Task> ListAsync(string cultureName, string resourceName, string filter = null, int maxResultCount = 10, int skipCount = 0); + + /// + /// 查询语言文本数量 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + Task CountAsync(string cultureName, string resourceName, string filter = null); + + /// + /// 创建语言文本 + /// + Task CreateAsync(Guid id, string cultureName, string resourceName, string name, string value); + + /// + /// 更新语言文本 + /// + /// 语言 + /// 资源名称 + /// 键 + /// 值 + Task UpdateAsync(string cultureName, string resourceName, string name, string value); + + /// + /// 删除语言文本 + /// + Task DeleteAsync(Guid id); + + /// + /// 根据资源名称和语言名称查询语言文本 + /// + /// 语言 + /// 资源名称 + Task> FindAsync(string cultureName, string resourceName); +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextRepository.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextRepository.cs new file mode 100644 index 00000000..0437dfc2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/ILanguageTextRepository.cs @@ -0,0 +1,43 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +public interface ILanguageTextRepository : IBasicRepository +{ + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + /// 返回最大条数 + /// 跳过条数 + Task> ListAsync(string cultureName, string resourceName, string filter = null, int maxResultCount = 10, int skipCount = 0); + + /// + /// 查询语言文本数量 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + Task CountAsync(string cultureName, string resourceName, string filter = null); + + /// + /// 查询语言文本 + /// + Task> FindAsync(string cultureName, string resourceName); + + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + Task FindOneAsync(string cultureName, string resourceName); + + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + /// 名称 + Task FindAsync(string cultureName, string resourceName, string name); + +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs new file mode 100644 index 00000000..3f50d337 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs @@ -0,0 +1,97 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +public class LanguageTextManager : LanguageManagementDomainService, ILanguageTextManager +{ + private readonly ILanguageTextRepository _languageTextRepository; + private readonly IObjectMapper _objectMapper; + + public LanguageTextManager(ILanguageTextRepository languageTextRepository, IObjectMapper objectMapper) + { + _languageTextRepository = languageTextRepository; + _objectMapper = objectMapper; + } + + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + /// 返回最大条数 + /// 跳过条数 + public async Task> ListAsync(string cultureName, string resourceName, string filter = null, int maxResultCount = 10, int skipCount = 0) + { + var list = await _languageTextRepository.ListAsync(cultureName, resourceName, filter, maxResultCount, skipCount); + return ObjectMapper.Map, List>(list); + } + + /// + /// 查询语言文本数量 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + public async Task CountAsync(string cultureName, string resourceName, string filter = null) + { + return await _languageTextRepository.CountAsync(cultureName, resourceName, filter); + } + + /// + /// 创建语言文本 + /// + public async Task CreateAsync(Guid id, string cultureName, string resourceName, string name, string value) + { + var entity = await _languageTextRepository.FindAsync(cultureName, resourceName, name); + if (entity != null) + { + throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageTextExist).WithData("Name", name); + } + + entity = new LanguageText(id, cultureName, resourceName, name, value, CurrentTenant.Id); + entity = await _languageTextRepository.InsertAsync(entity); + return _objectMapper.Map(entity); + } + + + /// + /// 更新语言文本 + /// + /// 语言 + /// 资源名称 + /// 键 + /// 值 + public async Task UpdateAsync(string cultureName, string resourceName, string name, string value) + { + var entity = await _languageTextRepository.FindAsync(cultureName, resourceName, name); + if (entity == null) + { + entity = new LanguageText(GuidGenerator.Create(), cultureName, resourceName, name, value, CurrentTenant.Id); + await _languageTextRepository.InsertAsync(entity); + } + + entity.Update(cultureName, resourceName, name, value); + entity = await _languageTextRepository.UpdateAsync(entity); + return _objectMapper.Map(entity); + } + + /// + /// 删除语言文本 + /// + public async Task DeleteAsync(Guid id) + { + var entity = await _languageTextRepository.FindAsync(id); + if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); + await _languageTextRepository.DeleteAsync(entity); + } + + /// + /// 根据资源名称和语言名称查询语言文本 + /// + /// 语言 + /// 资源名称 + public virtual async Task> FindAsync(string cultureName, string resourceName) + { + var languageTexts = await _languageTextRepository.FindAsync(cultureName, resourceName); + return _objectMapper.Map, List>(languageTexts); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Aggregates/Language.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Aggregates/Language.cs new file mode 100644 index 00000000..fadff7a6 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Aggregates/Language.cs @@ -0,0 +1,124 @@ +namespace Lion.AbpPro.LanguageManagement.Languages.Aggregates; + +public class Language : FullAuditedAggregateRoot, ILanguageInfo +{ + private Language() + { + } + + + public Language( + Guid id, + string cultureName, + string uiCultureName, + string displayName, + string flagIcon, + bool isEnabled, + bool isDefault + ) : base(id) + { + SetCultureName(cultureName); + SetUiCultureName(uiCultureName); + SetDisplayName(displayName); + SetFlagIcon(flagIcon); + SetEnabled(isEnabled); + SetDefault(isDefault); + } + + /// + /// 语言名称 + /// + public string CultureName { get; private set; } + + /// + /// Ui语言名称 + /// + public string UiCultureName { get; private set; } + + /// + /// 显示名称 + /// + public string DisplayName { get; private set; } + + /// + /// 图标 + /// + public string FlagIcon { get; private set; } + + /// + /// 是否启用 + /// + public bool IsEnabled { get; private set; } + + /// + /// 是否默认语言 + /// + public bool IsDefault { get; private set; } + + /// + /// 设置语言名称 + /// + private void SetCultureName(string cultureName) + { + Guard.NotNullOrWhiteSpace(cultureName, nameof(cultureName), 128, 0); + CultureName = cultureName; + } + + /// + /// 设置Ui语言名称 + /// + private void SetUiCultureName(string uiCultureName) + { + Guard.NotNullOrWhiteSpace(uiCultureName, nameof(uiCultureName), 128, 0); + UiCultureName = uiCultureName; + } + + /// + /// 设置显示名称 + /// + private void SetDisplayName(string displayName) + { + Guard.NotNullOrWhiteSpace(displayName, nameof(displayName), 128, 0); + DisplayName = displayName; + } + + /// + /// 设置图标 + /// + private void SetFlagIcon(string flagIcon) + { + Guard.Length(flagIcon, nameof(flagIcon), 128, 0); + FlagIcon = flagIcon; + } + + private void SetEnabled(bool isEnabled) + { + IsEnabled = isEnabled; + } + + /// + /// 更新语言 + /// + public void Update( + string cultureName, + string uiCultureName, + string displayName, + string flagIcon, + bool isEnabled = true, + bool isDefault = false + ) + { + SetCultureName(cultureName); + SetUiCultureName(uiCultureName); + SetDisplayName(displayName); + SetFlagIcon(flagIcon); + SetEnabled(isEnabled); + SetDefault(isDefault); + } + + + public void SetDefault(bool isDefault) + { + IsDefault = isDefault; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Caches/LanguageCacheInvalidator.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Caches/LanguageCacheInvalidator.cs new file mode 100644 index 00000000..2781eed2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/Caches/LanguageCacheInvalidator.cs @@ -0,0 +1,19 @@ +namespace Lion.AbpPro.LanguageManagement.Languages.Caches; + +/// +/// 当语言实体有改变的时候,清除缓存 +/// +public class LanguageCacheInvalidator : ILocalEventHandler>, ITransientDependency +{ + private readonly IDistributedCache _distributedCache; + + public LanguageCacheInvalidator(IDistributedCache distributedCache) + { + _distributedCache = distributedCache; + } + + public virtual async Task HandleEventAsync(EntityChangedEventData eventData) + { + await _distributedCache.RemoveAsync(LanguageListCacheItem.CalculateCacheKey()); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageManager.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageManager.cs new file mode 100644 index 00000000..57429150 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageManager.cs @@ -0,0 +1,64 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +public interface ILanguageManager +{ + /// + /// 查询语言 + /// + Task> ListAsync(bool? isEnabled = null); + + /// + /// 查询语言 + /// + Task> GetListAsync(int maxResultCount = 10, int skipCount = 0, string filter = null); + + /// + /// 获取总条数 + /// + /// 查询条件 cultureName or uiCultureName or displayName + Task CountAsync(string filter = null); + + /// + /// 创建语言 + /// + Task CreateAsync( + Guid id, + string cultureName, + string uiCultureName, + string displayName, + string flagIcon, + bool isEnabled + ); + + /// + /// 更新语言 + /// + Task UpdateAsync( + Guid id, + string cultureName, + string uiCultureName, + string displayName, + string flagIcon, + bool isEnabled + ); + + /// + /// 删除语言 + /// + Task DeleteAsync(Guid id); + + /// + /// 通过Id获取语言 + /// + Task GetAsync(Guid id); + + /// + /// 获取指定语言 + /// + Task GetAsync(string cultureName); + + /// + /// 设置默认语言 + /// + Task SetDefaultAsync(Guid id); +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageRepository.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageRepository.cs new file mode 100644 index 00000000..1a094324 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/ILanguageRepository.cs @@ -0,0 +1,33 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +public interface ILanguageRepository : IBasicRepository +{ + /// + /// 查询语言 + /// + Task> ListAsync(bool? isEnabled = null); + + /// + /// 查询语言 + /// + /// 返回最大条数 + /// 跳过条数 + /// 查询条件 cultureName or uiCultureName or displayName + Task> ListAsync(int maxResultCount = 10, int skipCount = 0, string filter = null); + + /// + /// 获取总条数 + /// + /// 查询条件 cultureName or uiCultureName or displayName + Task CountAsync(string filter = null); + + /// + /// 查询指定语言 + /// + Task FindAsync(string cultureName); + + /// + /// 获取默认语言 + /// + Task FindDefaultLanguageAsync(); +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs new file mode 100644 index 00000000..d7be9aa3 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs @@ -0,0 +1,129 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +public class LanguageManager : LanguageManagementDomainService, ILanguageManager +{ + private readonly ILanguageRepository _languageRepository; + + public LanguageManager(ILanguageRepository languageRepository) + { + _languageRepository = languageRepository; + } + + /// + /// 查询语言 + /// + public async Task> ListAsync(bool? isEnabled = null) + { + var list = await _languageRepository.ListAsync(isEnabled); + return list; + } + + /// + /// 查询语言 + /// + public async Task> GetListAsync(int maxResultCount = 10, int skipCount = 0, string filter = null) + { + var list = await _languageRepository.ListAsync(maxResultCount, skipCount, filter); + return ObjectMapper.Map, List>(list); + } + + /// + /// 获取总条数 + /// + /// 查询条件 cultureName or uiCultureName or displayName + public async Task CountAsync(string filter = null) + { + return await _languageRepository.CountAsync(filter); + } + + /// + /// 创建语言 + /// + public async Task CreateAsync( + Guid id, + string cultureName, + string uiCultureName, + string displayName, + string flagIcon, + bool isEnabled + ) + { + var entity = await _languageRepository.FindAsync(cultureName); + if (entity != null) + { + throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageExist); + } + + entity = new Language(id, cultureName, uiCultureName, displayName, flagIcon, isEnabled, false); + entity = await _languageRepository.InsertAsync(entity); + return ObjectMapper.Map(entity); + } + + /// + /// 更新语言 + /// + public async Task UpdateAsync( + Guid id, + string cultureName, + string uiCultureName, + string displayName, + string flagIcon, + bool isEnabled + ) + { + var entity = await _languageRepository.FindAsync(id); + if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); + entity.Update(cultureName, uiCultureName, displayName, flagIcon, isEnabled); + entity = await _languageRepository.UpdateAsync(entity); + return ObjectMapper.Map(entity); + } + + /// + /// 删除语言 + /// + public async Task DeleteAsync(Guid id) + { + var entity = await _languageRepository.FindAsync(id); + if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); + await _languageRepository.DeleteAsync(entity); + } + + /// + /// 通过Id获取语言 + /// + public async Task GetAsync(Guid id) + { + var entity = await _languageRepository.FindAsync(id); + if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); + return ObjectMapper.Map(entity); + } + + /// + /// 获取指定语言 + /// + public async Task GetAsync(string cultureName) + { + var entity = await _languageRepository.FindAsync(cultureName); + if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); + return ObjectMapper.Map(entity); + } + + /// + /// 设置默认语言 + /// + public async Task SetDefaultAsync(Guid id) + { + var entity = await _languageRepository.FindAsync(id); + if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); + + var defaultLanguage = await _languageRepository.FindDefaultLanguageAsync(); + + if (defaultLanguage != null && entity.Id == defaultLanguage.Id) return; + + defaultLanguage.SetDefault(false); + entity.SetDefault(true); + + await _languageRepository.UpdateAsync(entity); + await _languageRepository.UpdateAsync(defaultLanguage); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj new file mode 100644 index 00000000..ba8cc0f6 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj @@ -0,0 +1,16 @@ + + + + net7.0 + Lion.AbpPro.LanguageManagement + + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LocalizationHelper.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LocalizationHelper.cs new file mode 100644 index 00000000..164192bc --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LocalizationHelper.cs @@ -0,0 +1,74 @@ +namespace Lion.AbpPro.LanguageManagement; + +public class LocalizationHelper : LanguageManagementDomainService, ILocalizationHelper +{ + private readonly AbpLocalizationOptions _abpLocalizationOptions; + private readonly IExternalLocalizationStore _externalLocalizationStore; + private readonly IStringLocalizerFactory _stringLocalizerFactory; + + public LocalizationHelper( + IOptions abpLocalizationOptions, + IExternalLocalizationStore externalLocalizationStore, + IStringLocalizerFactory stringLocalizerFactory) + { + _abpLocalizationOptions = abpLocalizationOptions.Value; + _externalLocalizationStore = externalLocalizationStore; + _stringLocalizerFactory = stringLocalizerFactory; + } + + /// + /// 资源是否有效 + /// + public virtual async Task IsValidResourceName(string resourceName) + { + var resource = _abpLocalizationOptions + .Resources + .Values + .Union( + new[] { await _externalLocalizationStore.GetResourceOrNullAsync(resourceName) } + ) + .FirstOrDefault(e => e.ResourceName == resourceName); + if (resource == null) + { + return false; + } + + return true; + } + + /// + /// 获取所有资源名 + /// + public virtual async Task> GetAllResourceName() + { + var resources = _abpLocalizationOptions + .Resources + .Values + .Select(x => x.ResourceName) + .Union( + await _externalLocalizationStore.GetResourceNamesAsync() + ); + return await Task.FromResult(resources.Distinct().ToList()); + } + + public virtual IStringLocalizer GetLocalizer(LocalizationResource resource) + { + return _stringLocalizerFactory.Create(resource.ResourceType); + } + + public virtual IStringLocalizer GetLocalizer(string recourseName) + { + return this.GetLocalizer(GetLocalizationResource(recourseName)); + } + + public virtual LocalizationResource GetLocalizationResource(string resourceName) + { + var localizationResource = _abpLocalizationOptions.Resources.Values.FirstOrDefault(r => r.ResourceName == resourceName); + if (localizationResource == null) + { + throw new LanguageManagementDomainException(LanguageManagementErrorCodes.ResourceNotFound); + } + + return localizationResource as LocalizationResource; + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettingDefinitionProvider.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettingDefinitionProvider.cs new file mode 100644 index 00000000..5dd4c58b --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettingDefinitionProvider.cs @@ -0,0 +1,12 @@ +namespace Lion.AbpPro.LanguageManagement.Settings +{ + public class LanguageManagementSettingDefinitionProvider : SettingDefinitionProvider + { + public override void Define(ISettingDefinitionContext context) + { + /* Define module settings here. + * Use names from LanguageManagementSettings class. + */ + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettings.cs new file mode 100644 index 00000000..e81d756a --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Settings/LanguageManagementSettings.cs @@ -0,0 +1,11 @@ +namespace Lion.AbpPro.LanguageManagement.Settings +{ + public static class LanguageManagementSettings + { + public const string GroupName = "LanguageManagement"; + + /* Add constants for setting names. Example: + * public const string MySettingName = GroupName + ".MySettingName"; + */ + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/ILanguageManagementDbContext.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/ILanguageManagementDbContext.cs new file mode 100644 index 00000000..fa10264c --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/ILanguageManagementDbContext.cs @@ -0,0 +1,9 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + [ConnectionStringName(LanguageManagementDbProperties.ConnectionStringName)] + public interface ILanguageManagementDbContext : IEfCoreDbContext + { + DbSet Languages { get; set; } + DbSet LanguageTexts { get; set; } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContext.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContext.cs new file mode 100644 index 00000000..c300cb25 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContext.cs @@ -0,0 +1,22 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + [ConnectionStringName(LanguageManagementDbProperties.ConnectionStringName)] + public class LanguageManagementDbContext : AbpDbContext, ILanguageManagementDbContext + { + public DbSet Languages { get; set; } + + public DbSet LanguageTexts { get; set; } + + public LanguageManagementDbContext(DbContextOptions options) + : base(options) + { + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigureLanguageManagement(); + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContextModelCreatingExtensions.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContextModelCreatingExtensions.cs new file mode 100644 index 00000000..7b2616ac --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementDbContextModelCreatingExtensions.cs @@ -0,0 +1,34 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + public static class LanguageManagementDbContextModelCreatingExtensions + { + public static void ConfigureLanguageManagement( + this ModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + + builder.Entity(b => + { + b.ToTable(LanguageManagementDbProperties.DbTablePrefix + "Languages"); + b.Property(e => e.CultureName).IsRequired().HasMaxLength(128).HasComment("语言名称"); + b.Property(e => e.UiCultureName).IsRequired().HasMaxLength(128).HasComment("Ui语言名称"); + b.Property(e => e.DisplayName).IsRequired().HasMaxLength(128).HasComment("显示名称"); + b.Property(e => e.FlagIcon).IsRequired().HasComment("图标"); + b.Property(x => x.IsEnabled).IsRequired(); + b.HasIndex(e => e.CultureName).IsUnique(); + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(LanguageManagementDbProperties.DbTablePrefix + "LanguageTexts"); + b.Property(e => e.ResourceName).IsRequired().HasMaxLength(128).HasComment("资源名称"); + b.Property(e => e.CultureName).IsRequired().HasMaxLength(128).HasComment("语言名称"); + b.Property(e => e.Name).IsRequired().HasMaxLength(256).HasComment("名称"); + b.Property(e => e.Value).IsRequired().HasMaxLength(256).HasComment("值"); + b.HasIndex(x => new { x.TenantId, x.ResourceName, x.CultureName }); + b.ConfigureByConvention(); + }); + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreModule.cs new file mode 100644 index 00000000..e7439c9a --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreModule.cs @@ -0,0 +1,19 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + [DependsOn( + typeof(LanguageManagementDomainModule), + typeof(AbpEntityFrameworkCoreModule) + )] + public class LanguageManagementEntityFrameworkCoreModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementModelBuilderConfigurationOptions.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementModelBuilderConfigurationOptions.cs new file mode 100644 index 00000000..d1229673 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageManagementModelBuilderConfigurationOptions.cs @@ -0,0 +1,15 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + public class LanguageManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions + { + public LanguageManagementModelBuilderConfigurationOptions( + [NotNull] string tablePrefix = "", + [CanBeNull] string schema = null) + : base( + tablePrefix, + schema) + { + + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageTexts/EfCoreLanguageTextRepository.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageTexts/EfCoreLanguageTextRepository.cs new file mode 100644 index 00000000..d605fc40 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/LanguageTexts/EfCoreLanguageTextRepository.cs @@ -0,0 +1,85 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore.LanguageTexts; + +public class EfCoreLanguageTextRepository : + EfCoreRepository, + ILanguageTextRepository +{ + public EfCoreLanguageTextRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + /// 返回最大条数 + /// 跳过条数 + public async Task> ListAsync(string cultureName, string resourceName, string filter = null, int maxResultCount = 10, int skipCount = 0) + { + return await (await GetDbSetAsync()) + .WhereIf(cultureName.IsNotNullOrWhiteSpace(), e => e.CultureName == cultureName) + .WhereIf(resourceName.IsNotNullOrWhiteSpace(), e => e.ResourceName == resourceName) + .WhereIf(filter.IsNotNullOrWhiteSpace(), e => e.Name.Contains(filter) || e.Value.Contains(filter)) + .OrderByDescending(e => e.CreationTime) + .PageBy(skipCount, maxResultCount) + .ToListAsync(); + } + + /// + /// 查询语言文本数量 + /// + /// 语言 + /// 资源名称 + /// 筛选条件:name or value + public async Task CountAsync(string cultureName, string resourceName, string filter = null) + { + return await (await GetDbSetAsync()) + .WhereIf(cultureName.IsNotNullOrWhiteSpace(), e => e.CultureName == cultureName) + .WhereIf(resourceName.IsNotNullOrWhiteSpace(), e => e.ResourceName == resourceName) + .WhereIf(filter.IsNotNullOrWhiteSpace(), e => e.Name.Contains(filter) || e.Value.Contains(filter)) + .CountAsync(); + } + + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + public async Task> FindAsync(string cultureName, string resourceName) + { + return await (await GetDbSetAsync()) + .Where(e => e.CultureName == cultureName) + .Where(e => e.ResourceName == resourceName) + .ToListAsync(); + } + + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + public async Task FindOneAsync(string cultureName, string resourceName) + { + return await (await GetDbSetAsync()) + .Where(e => e.CultureName == cultureName) + .Where(e => e.ResourceName == resourceName) + .FirstOrDefaultAsync(); + } + + /// + /// 查询语言文本 + /// + /// 语言 + /// 资源名称 + /// 名称 + public async Task FindAsync(string cultureName, string resourceName, string name) + { + return await (await GetDbSetAsync()) + .Where(e => e.CultureName == cultureName) + .Where(e => e.ResourceName == resourceName) + .Where(e => e.Name == name) + .FirstOrDefaultAsync(); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/Languages/EfCoreLanguageRepository.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/Languages/EfCoreLanguageRepository.cs new file mode 100644 index 00000000..7b8387c4 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/EntityFrameworkCore/Languages/EfCoreLanguageRepository.cs @@ -0,0 +1,66 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Languages; + +public class EfCoreLanguageRepository : + EfCoreRepository, + ILanguageRepository +{ + public EfCoreLanguageRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + /// + /// 查询语言 + /// + public virtual async Task> ListAsync(bool? isEnabled = null) + { + return await (await GetDbSetAsync()) + .WhereIf(isEnabled != null, e => e.IsEnabled == isEnabled) + .ToListAsync(); + } + + /// + /// 查询语言 + /// + /// 返回最大条数 + /// 跳过条数 + /// 查询条件 cultureName or uiCultureName or displayName + public async Task> ListAsync(int maxResultCount = 10, int skipCount = 0, string filter = null) + { + return await (await GetDbSetAsync()) + .WhereIf(filter.IsNotNullOrWhiteSpace(), e => e.CultureName.Contains(filter) || e.UiCultureName.Contains(filter) || e.DisplayName.Contains(filter)) + .OrderByDescending(e => e.CreationTime) + .PageBy(skipCount, maxResultCount) + .ToListAsync(); + } + + /// + /// 获取总条数 + /// + /// 查询条件 cultureName or uiCultureName or displayName + public async Task CountAsync( string filter = null) + { + return await (await GetDbSetAsync()) + .WhereIf(filter.IsNotNullOrWhiteSpace(), e => e.CultureName.Contains(filter) || e.UiCultureName.Contains(filter) || e.DisplayName.Contains(filter)) + .CountAsync(); + } + + /// + /// 查询指定语言 + /// + public async Task FindAsync(string cultureName) + { + return await (await GetDbSetAsync()) + .Where(e => e.CultureName == cultureName) + .FirstOrDefaultAsync(); + } + + /// + /// 获取默认语言 + /// + public async Task FindDefaultLanguageAsync() + { + return await (await GetDbSetAsync()) + .Where(e => e.IsDefault) + .FirstOrDefaultAsync(); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/GlobalUsings.cs new file mode 100644 index 00000000..5a920bb5 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/GlobalUsings.cs @@ -0,0 +1,20 @@ +// Global using directives + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; +global using JetBrains.Annotations; +global using Lion.AbpPro.LanguageManagement.Languages; +global using Lion.AbpPro.LanguageManagement.Languages.Aggregates; +global using Lion.AbpPro.LanguageManagement.LanguageTexts; +global using Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates; +global using Microsoft.EntityFrameworkCore; +global using Microsoft.Extensions.DependencyInjection; +global using Volo.Abp; +global using Volo.Abp.Data; +global using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +global using Volo.Abp.EntityFrameworkCore; +global using Volo.Abp.EntityFrameworkCore.Modeling; +global using Volo.Abp.Modularity; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj new file mode 100644 index 00000000..fae86957 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj @@ -0,0 +1,13 @@ + + + + net7.0 + Lion.AbpPro.LanguageManagement + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/GlobalUsings.cs new file mode 100644 index 00000000..609ebbf4 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/GlobalUsings.cs @@ -0,0 +1,5 @@ +// Global using directives + +global using Microsoft.Extensions.DependencyInjection; +global using Volo.Abp.Http.Client; +global using Volo.Abp.Modularity; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/LanguageManagementHttpApiClientModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/LanguageManagementHttpApiClientModule.cs new file mode 100644 index 00000000..8b19e872 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/LanguageManagementHttpApiClientModule.cs @@ -0,0 +1,18 @@ +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(LanguageManagementApplicationContractsModule), + typeof(AbpHttpClientModule))] + public class LanguageManagementHttpApiClientModule : AbpModule + { + public const string RemoteServiceName = "LanguageManagement"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies( + typeof(LanguageManagementApplicationContractsModule).Assembly, + RemoteServiceName + ); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj new file mode 100644 index 00000000..e68b6640 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj @@ -0,0 +1,16 @@ + + + + net7.0 + Lion.AbpPro.LanguageManagement + + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/GlobalUsings.cs new file mode 100644 index 00000000..27ae0ff7 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/GlobalUsings.cs @@ -0,0 +1,7 @@ +// Global using directives + +global using System.Threading.Tasks; +global using Lion.AbpPro.Core; +global using Microsoft.AspNetCore.Mvc; +global using Swashbuckle.AspNetCore.Annotations; +global using Volo.Abp.Application.Dtos; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementController.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementController.cs new file mode 100644 index 00000000..e3f1562c --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementController.cs @@ -0,0 +1,13 @@ +using Lion.AbpPro.LanguageManagement.Localization; +using Volo.Abp.AspNetCore.Mvc; + +namespace Lion.AbpPro.LanguageManagement +{ + public abstract class LanguageManagementController : AbpController + { + protected LanguageManagementController() + { + LocalizationResource = typeof(LanguageManagementResource); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementHttpApiModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementHttpApiModule.cs new file mode 100644 index 00000000..332df0f7 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageManagementHttpApiModule.cs @@ -0,0 +1,33 @@ +using Localization.Resources.AbpUi; +using Lion.AbpPro.LanguageManagement.Localization; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; + +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(LanguageManagementApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule))] + public class LanguageManagementHttpApiModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(LanguageManagementHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageTexts/LanguageTextController.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageTexts/LanguageTextController.cs new file mode 100644 index 00000000..0a5b2437 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/LanguageTexts/LanguageTextController.cs @@ -0,0 +1,40 @@ +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; + +[Route("LanguageTexts")] +public class LanguageTextController : LanguageManagementController, ILanguageTextAppService +{ + private readonly ILanguageTextAppService _languageTextAppService; + + public LanguageTextController(ILanguageTextAppService languageTextAppService) + { + _languageTextAppService = languageTextAppService; + } + + [HttpPost("AllResource")] + [SwaggerOperation(summary: "获取所有资源", Tags = new[] { "LanguageTexts" })] + public async Task>> AllResourceListAsync() + { + return await _languageTextAppService.AllResourceListAsync(); + } + + [HttpPost("Page")] + [SwaggerOperation(summary: "分页查询语言文本", Tags = new[] { "LanguageTexts" })] + public async Task> PageAsync(PageLanguageTextInput input) + { + return await _languageTextAppService.PageAsync(input); + } + + [HttpPost("Create")] + [SwaggerOperation(summary: "创建语言文本", Tags = new[] { "LanguageTexts" })] + public async Task CreateAsync(CreateLanguageTextInput input) + { + await _languageTextAppService.CreateAsync(input); + } + + [HttpPost("Update")] + [SwaggerOperation(summary: "编辑语言文本", Tags = new[] { "LanguageTexts" })] + public async Task UpdateAsync(UpdateLanguageTextInput input) + { + await _languageTextAppService.UpdateAsync(input); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Languages/LanguageController.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Languages/LanguageController.cs new file mode 100644 index 00000000..ff9f9e51 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Languages/LanguageController.cs @@ -0,0 +1,54 @@ +namespace Lion.AbpPro.LanguageManagement.Languages; + +[Route("Languages")] +public class LanguageController : LanguageManagementController, ILanguageAppService +{ + private readonly ILanguageAppService _languageAppService; + + public LanguageController(ILanguageAppService languageAppService) + { + _languageAppService = languageAppService; + } + + [HttpPost("All")] + [SwaggerOperation(summary: "获取所有语言", Tags = new[] { "Languages" })] + public async Task> AllListAsync() + { + return await _languageAppService.AllListAsync(); + } + + [HttpPost("Page")] + [SwaggerOperation(summary: "分页查询语言", Tags = new[] { "Languages" })] + public async Task> PageAsync(PageLanguageInput input) + { + return await _languageAppService.PageAsync(input); + } + + [HttpPost("Create")] + [SwaggerOperation(summary: "创建语言", Tags = new[] { "Languages" })] + public async Task CreateAsync(CreateLanguageInput input) + { + await _languageAppService.CreateAsync(input); + } + + [HttpPost("Update")] + [SwaggerOperation(summary: "编辑语言", Tags = new[] { "Languages" })] + public async Task UpdateAsync(UpdateLanguageInput input) + { + await _languageAppService.UpdateAsync(input); + } + + [HttpPost("Delete")] + [SwaggerOperation(summary: "删除语言", Tags = new[] { "Languages" })] + public async Task DeleteAsync(DeleteLanguageInput input) + { + await _languageAppService.DeleteAsync(input); + } + + [HttpPost("SetDefault")] + [SwaggerOperation(summary: "设置默认语言", Tags = new[] { "Languages" })] + public async Task SetDefaultAsync(IdInput input) + { + await _languageAppService.SetDefaultAsync(input); + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj new file mode 100644 index 00000000..1e49ed37 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj @@ -0,0 +1,14 @@ + + + + net7.0 + Lion.AbpPro.LanguageManagement + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/GlobalUsings.cs new file mode 100644 index 00000000..a14c8d0f --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/GlobalUsings.cs @@ -0,0 +1,7 @@ +// Global using directives + +global using System.Linq; +global using System.Threading.Tasks; +global using Shouldly; +global using Volo.Abp.Modularity; +global using Xunit; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestBase.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestBase.cs new file mode 100644 index 00000000..03b28d2e --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestBase.cs @@ -0,0 +1,10 @@ +namespace Lion.AbpPro.LanguageManagement +{ + /* Inherit from this class for your application layer tests. + * See SampleAppService_Tests for example. + */ + public abstract class LanguageManagementApplicationTestBase : LanguageManagementTestBase + { + + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestModule.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestModule.cs new file mode 100644 index 00000000..019b4699 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/LanguageManagementApplicationTestModule.cs @@ -0,0 +1,11 @@ +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(LanguageManagementApplicationModule), + typeof(LanguageManagementDomainTestModule) + )] + public class LanguageManagementApplicationTestModule : AbpModule + { + + } +} diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj new file mode 100644 index 00000000..ed44ed5b --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj @@ -0,0 +1,16 @@ + + + + + net7.0 + Lion.AbpPro.LanguageManagement + false + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs new file mode 100644 index 00000000..4efda282 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs @@ -0,0 +1,10 @@ +// Global using directives + +global using System; +global using System.Linq; +global using System.Threading.Tasks; +global using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; +global using Shouldly; +global using Volo.Abp.AutoMapper; +global using Volo.Abp.Modularity; +global using Xunit; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestBase.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestBase.cs new file mode 100644 index 00000000..671de4ac --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestBase.cs @@ -0,0 +1,10 @@ +namespace Lion.AbpPro.LanguageManagement +{ + /* Inherit from this class for your domain layer tests. + * See SampleManager_Tests for example. + */ + public abstract class LanguageManagementDomainTestBase : LanguageManagementTestBase + { + + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs new file mode 100644 index 00000000..a085f179 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs @@ -0,0 +1,20 @@ +namespace Lion.AbpPro.LanguageManagement +{ + /* Domain tests are configured to use the EF Core provider. + * You can switch to MongoDB, however your domain tests should be + * database independent anyway. + */ + [DependsOn( + typeof(LanguageManagementEntityFrameworkCoreTestModule) + )] + public class LanguageManagementDomainTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.AddMaps(validate: true); + }); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj new file mode 100644 index 00000000..bbbd175a --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj @@ -0,0 +1,15 @@ + + + + + net7.0 + Lion.AbpPro.LanguageManagement + false + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestBase.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestBase.cs new file mode 100644 index 00000000..6ce21eea --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestBase.cs @@ -0,0 +1,10 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + /* This class can be used as a base class for EF Core integration tests, + * while SampleRepository_Tests uses a different approach. + */ + public abstract class LanguageManagementEntityFrameworkCoreTestBase : LanguageManagementTestBase + { + + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestModule.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestModule.cs new file mode 100644 index 00000000..339bb464 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/LanguageManagementEntityFrameworkCoreTestModule.cs @@ -0,0 +1,35 @@ +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore +{ + [DependsOn( + typeof(LanguageManagementTestBaseModule), + typeof(LanguageManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreSqliteModule) + )] + public class LanguageManagementEntityFrameworkCoreTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new SqliteConnection("Data Source=:memory:"); + connection.Open(); + + new LanguageManagementDbContext( + new DbContextOptionsBuilder().UseSqlite(connection).Options + ).GetService().CreateTables(); + + return connection; + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs new file mode 100644 index 00000000..faf0f811 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs @@ -0,0 +1,13 @@ +using Lion.AbpPro.LanguageManagement.Samples; + +namespace Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Samples +{ + public class SampleRepository_Tests : SampleRepository_Tests + { + /* Don't write custom repository tests here, instead write to + * the base class. + * One exception can be some specific tests related to EF core. + */ + + } +} diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/GlobalUsings.cs new file mode 100644 index 00000000..bfd1d1b2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/GlobalUsings.cs @@ -0,0 +1,14 @@ +// Global using directives + +global using System; +global using System.Linq; +global using System.Threading.Tasks; +global using Microsoft.Data.Sqlite; +global using Microsoft.EntityFrameworkCore; +global using Microsoft.EntityFrameworkCore.Infrastructure; +global using Microsoft.EntityFrameworkCore.Storage; +global using Shouldly; +global using Volo.Abp.EntityFrameworkCore; +global using Volo.Abp.EntityFrameworkCore.Sqlite; +global using Volo.Abp.Modularity; +global using Xunit; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj new file mode 100644 index 00000000..825f0922 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj @@ -0,0 +1,18 @@ + + + + + net7.0 + Lion.AbpPro.LanguageManagement + false + + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xml b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xml new file mode 100644 index 00000000..be0de3a9 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xsd b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xsd new file mode 100644 index 00000000..3f3946e2 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/GlobalUsings.cs new file mode 100644 index 00000000..b2fdc619 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/GlobalUsings.cs @@ -0,0 +1,20 @@ +// Global using directives + +global using System; +global using System.Collections.Generic; +global using System.Security.Claims; +global using System.Threading.Tasks; +global using Microsoft.Extensions.DependencyInjection; +global using Volo.Abp; +global using Volo.Abp.Authorization; +global using Volo.Abp.Autofac; +global using Volo.Abp.Data; +global using Volo.Abp.DependencyInjection; +global using Volo.Abp.Guids; +global using Volo.Abp.Modularity; +global using Volo.Abp.MultiTenancy; +global using Volo.Abp.Security.Claims; +global using Volo.Abp.Testing; +global using Volo.Abp.Threading; +global using Volo.Abp.Uow; +global using Xunit; \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementDataSeedContributor.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementDataSeedContributor.cs new file mode 100644 index 00000000..8a271059 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementDataSeedContributor.cs @@ -0,0 +1,25 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public class LanguageManagementDataSeedContributor : IDataSeedContributor, ITransientDependency + { + private readonly IGuidGenerator _guidGenerator; + private readonly ICurrentTenant _currentTenant; + + + public LanguageManagementDataSeedContributor( + IGuidGenerator guidGenerator, + ICurrentTenant currentTenant) + { + _guidGenerator = guidGenerator; + _currentTenant = currentTenant; + } + + public async Task SeedAsync(DataSeedContext context) + { + /* Instead of returning the Task.CompletedTask, you can insert your test data + * at this point! + */ + await Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBase.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBase.cs new file mode 100644 index 00000000..10d95178 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBase.cs @@ -0,0 +1,52 @@ +namespace Lion.AbpPro.LanguageManagement +{ + /* All test classes are derived from this class, directly or indirectly. */ + public abstract class LanguageManagementTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + protected virtual Task WithUnitOfWorkAsync(Func func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + await action(); + + await uow.CompleteAsync(); + } + } + } + + protected virtual Task WithUnitOfWorkAsync(Func> func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + var result = await func(); + await uow.CompleteAsync(); + return result; + } + } + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBaseModule.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBaseModule.cs new file mode 100644 index 00000000..5b62f880 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestBaseModule.cs @@ -0,0 +1,34 @@ +namespace Lion.AbpPro.LanguageManagement +{ + [DependsOn( + typeof(AbpAutofacModule), + typeof(AbpTestBaseModule), + typeof(AbpAuthorizationModule), + typeof(LanguageManagementDomainModule) + )] + public class LanguageManagementTestBaseModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysAllowAuthorization(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + SeedTestData(context); + } + + private static void SeedTestData(ApplicationInitializationContext context) + { + AsyncHelper.RunSync(async () => + { + using (var scope = context.ServiceProvider.CreateScope()) + { + await scope.ServiceProvider + .GetRequiredService() + .SeedAsync(); + } + }); + } + } +} diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestConsts.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestConsts.cs new file mode 100644 index 00000000..ce999b30 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/LanguageManagementTestConsts.cs @@ -0,0 +1,7 @@ +namespace Lion.AbpPro.LanguageManagement +{ + public class LanguageManagementTestConsts + { + + } +} \ No newline at end of file diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj new file mode 100644 index 00000000..1c171559 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj @@ -0,0 +1,23 @@ + + + + + net7.0 + Lion.AbpPro.LanguageManagement + false + + + + + + + + + + + + + + + + diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Samples/SampleRepository_Tests.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Samples/SampleRepository_Tests.cs new file mode 100644 index 00000000..6ef76408 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Samples/SampleRepository_Tests.cs @@ -0,0 +1,18 @@ +namespace Lion.AbpPro.LanguageManagement.Samples +{ + /* Write your custom repository tests like that, in this project, as abstract classes. + * Then inherit these abstract classes from EF Core & MongoDB test projects. + * In this way, both database providers are tests with the same set tests. + */ + public abstract class SampleRepository_Tests : LanguageManagementTestBase + where TStartupModule : IAbpModule + { + //private readonly ISampleRepository _sampleRepository; + + protected SampleRepository_Tests() + { + //_sampleRepository = GetRequiredService(); + } + + } +} diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs new file mode 100644 index 00000000..cac95860 --- /dev/null +++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Security/FakeCurrentPrincipalAccessor.cs @@ -0,0 +1,38 @@ +namespace Lion.AbpPro.LanguageManagement.Security +{ + [Dependency(ReplaceServices = true)] + public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor + { + protected override ClaimsPrincipal GetClaimsPrincipal() + { + return GetPrincipal(); + } + + private ClaimsPrincipal _principal; + + private ClaimsPrincipal GetPrincipal() + { + if (_principal == null) + { + lock (this) + { + if (_principal == null) + { + _principal = new ClaimsPrincipal( + new ClaimsIdentity( + new List + { + new Claim(AbpClaimTypes.UserId,"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"), + new Claim(AbpClaimTypes.UserName,"admin"), + new Claim(AbpClaimTypes.Email,"admin@abp.io") + } + ) + ); + } + } + } + + return _principal; + } + } +} diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDbProperties.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDbProperties.cs index 5eab26b6..ad7c4008 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDbProperties.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDbProperties.cs @@ -2,7 +2,7 @@ namespace Lion.AbpPro.NotificationManagement { public static class NotificationManagementDbProperties { - public static string DbTablePrefix { get; set; } = ""; + public static string DbTablePrefix { get; set; } = "Abp"; public static string DbSchema { get; set; } = null; diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs index e3dab4cf..bc64aca8 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/EntityFrameworkCore/NotificationManagementDbContextModelCreatingExtensions.cs @@ -9,14 +9,14 @@ namespace Lion.AbpPro.NotificationManagement.EntityFrameworkCore builder.Entity(b => { - b.ToTable(NotificationManagementDbProperties.DbTablePrefix + nameof(Notification),NotificationManagementDbProperties.DbSchema); + b.ToTable(NotificationManagementDbProperties.DbTablePrefix + "Notifications", NotificationManagementDbProperties.DbSchema); b.HasMany(e => e.NotificationSubscriptions).WithOne().HasForeignKey(uc => uc.NotificationId).IsRequired(); b.ConfigureByConvention(); }); - + builder.Entity(b => { - b.ToTable(NotificationManagementDbProperties.DbTablePrefix + nameof(NotificationSubscription),NotificationManagementDbProperties.DbSchema); + b.ToTable(NotificationManagementDbProperties.DbTablePrefix + "NotificationSubscriptions", NotificationManagementDbProperties.DbSchema); b.ConfigureByConvention(); }); } diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs index 4144af20..aedba6e8 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs @@ -101,7 +101,8 @@ namespace Lion.AbpPro Configure(options => { options.IsJobExecutionEnabled = true; }); context.Services.AddHangfire(config => { - config.UseRedisStorage(ConnectionMultiplexer.Connect(context.Services.GetConfiguration().GetValue("Hangfire:Redis:Host")), redisStorageOptions).WithJobExpirationTimeout(TimeSpan.FromDays(7)); + config.UseRedisStorage(ConnectionMultiplexer.Connect(context.Services.GetConfiguration().GetValue("Hangfire:Redis:Host")), redisStorageOptions) + .WithJobExpirationTimeout(TimeSpan.FromDays(7)); var delaysInSeconds = new[] { 10, 60, 60 * 3 }; // 重试时间间隔 const int Attempts = 3; // 重试次数 config.UseFilter(new AutomaticRetryAttribute() { Attempts = Attempts, DelaysInSeconds = delaysInSeconds }); @@ -298,7 +299,9 @@ namespace Lion.AbpPro var hostingEnvironment = context.Services.GetHostingEnvironment(); bool auth = !hostingEnvironment.IsDevelopment(); - capOptions.UseDashboard(options => { options.UseAuth = auth; + capOptions.UseDashboard(options => + { + options.UseAuth = auth; options.AuthorizationPolicy = LionAbpProCapPermissions.CapManagement.Cap; }); }); diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json index 55571f54..ae97a4c7 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json @@ -34,7 +34,7 @@ "CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100" }, "ConnectionStrings": { - "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true", + "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" }, "Hangfire": { "Redis": { diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs index ec286633..21f99d72 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs @@ -1,4 +1,5 @@ using Lion.AbpPro.BasicManagement; +using Lion.AbpPro.LanguageManagement; namespace Lion.AbpPro { @@ -6,7 +7,8 @@ namespace Lion.AbpPro typeof(AbpProDomainSharedModule), typeof(AbpObjectExtendingModule), typeof(BasicManagementApplicationContractsModule), - typeof(DataDictionaryManagementApplicationContractsModule) + typeof(DataDictionaryManagementApplicationContractsModule), + typeof(LanguageManagementApplicationContractsModule) )] public class AbpProApplicationContractsModule : AbpModule { diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Lion.AbpPro.Application.Contracts.csproj b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Lion.AbpPro.Application.Contracts.csproj index 8ad7435d..b3b169d3 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Lion.AbpPro.Application.Contracts.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Lion.AbpPro.Application.Contracts.csproj @@ -9,6 +9,8 @@ + + diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs index db437270..d1a68476 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs @@ -1,3 +1,5 @@ +using Lion.AbpPro.LanguageManagement; + namespace Lion.AbpPro { [DependsOn( @@ -6,16 +8,14 @@ namespace Lion.AbpPro typeof(BasicManagementApplicationModule), typeof(DataDictionaryManagementApplicationModule), typeof(NotificationManagementApplicationModule), + typeof(LanguageManagementApplicationModule), typeof(AbpProFreeSqlModule) - )] + )] public class AbpProApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => - { - options.AddMaps(); - }); + Configure(options => { options.AddMaps(); }); } } -} +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/ElasticSearches/LionAbpProLogAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/ElasticSearches/LionAbpProLogAppService.cs index 6da7b8cf..9edeaa55 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/ElasticSearches/LionAbpProLogAppService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/ElasticSearches/LionAbpProLogAppService.cs @@ -8,6 +8,7 @@ namespace Lion.AbpPro.ElasticSearches // 时区 private const string TimeZone = "Asia/Shanghai"; + public LionAbpProLogAppService( IElasticsearchProvider elasticsearchProvider, IConfiguration configuration) : base(elasticsearchProvider) @@ -39,7 +40,7 @@ namespace Lion.AbpPro.ElasticSearches { mustFilters.Add ( - t => t.MatchPhrase(f => f.Field(fd => fd.Message).Query(input.Filter.Trim())) + t => t.Match(f => f.Field(fd => fd.Message).Query(input.Filter.Trim()).Fuzziness(Fuzziness.Auto)) ); } diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs b/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs index fc3ab136..19f10f3f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs @@ -15,6 +15,7 @@ global using Lion.AbpPro.NotificationManagement; global using Lion.AbpPro.Permissions; global using Microsoft.AspNetCore.Authorization; global using Microsoft.Extensions.Configuration; +global using Microsoft.Extensions.Localization; global using Nest; global using Volo.Abp.Application.Services; global using Volo.Abp.AutoMapper; diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj b/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj index 2366a8b8..85843a8b 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj @@ -10,6 +10,7 @@ + diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs index 63d7933e..223ca881 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs @@ -1,3 +1,6 @@ +using Volo.Abp.Localization; +using Volo.Abp.Settings; + namespace Lion.AbpPro.DbMigrator { [DependsOn( @@ -10,6 +13,25 @@ namespace Lion.AbpPro.DbMigrator public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => options.IsJobExecutionEnabled = false); + ConfigureLocalization(); + } + + /// + /// 多语言配置 + /// + private void ConfigureLocalization() + { + Configure(options => + { + options.Languages.Add(new LanguageInfo("en", "en", "English", "de")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文", "Hans")); + options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文", "Hant")); + }); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + context.ServiceProvider.GetRequiredService().Get(LocalizationSettingNames.DefaultLanguage).DefaultValue = "zh-Hans"; } } } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs index 5fc54d51..5983d16c 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs @@ -1,14 +1,16 @@ using Lion.AbpPro.BasicManagement; using Lion.AbpPro.BasicManagement.Localization; using Lion.AbpPro.Core; +using Lion.AbpPro.LanguageManagement; namespace Lion.AbpPro { [DependsOn( + typeof(LionAbpProCoreModule), typeof(BasicManagementDomainSharedModule), typeof(DataDictionaryManagementDomainSharedModule), typeof(NotificationManagementDomainSharedModule), - typeof(LionAbpProCoreModule) + typeof(LanguageManagementDomainSharedModule) )] public class AbpProDomainSharedModule : AbpModule { @@ -20,11 +22,8 @@ namespace Lion.AbpPro public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => - { - options.FileSets.AddEmbedded(AbpProDomainSharedConsts.NameSpace); - }); - + Configure(options => { options.FileSets.AddEmbedded(AbpProDomainSharedConsts.NameSpace); }); + Configure(options => { options.Resources @@ -36,12 +35,7 @@ namespace Lion.AbpPro options.DefaultResourceType = typeof(AbpProResource); }); - Configure(options => - { - options.MapCodeNamespace(AbpProDomainSharedConsts.NameSpace, typeof(AbpProResource)); - }); + Configure(options => { options.MapCodeNamespace(AbpProDomainSharedConsts.NameSpace, typeof(AbpProResource)); }); } - - } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Lion.AbpPro.Domain.Shared.csproj b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Lion.AbpPro.Domain.Shared.csproj index 153f50e3..bc51560f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Lion.AbpPro.Domain.Shared.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Lion.AbpPro.Domain.Shared.csproj @@ -18,6 +18,7 @@ + diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs index 4a5dcb3a..23bdb17c 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs @@ -1,11 +1,14 @@ +using Lion.AbpPro.LanguageManagement; + namespace Lion.AbpPro { [DependsOn( typeof(AbpProDomainSharedModule), + typeof(AbpEmailingModule), typeof(BasicManagementDomainModule), typeof(DataDictionaryManagementDomainModule), typeof(NotificationManagementDomainModule), - typeof(AbpEmailingModule) + typeof(LanguageManagementDomainModule) )] public class AbpProDomainModule : AbpModule { diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj b/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj index e67ea470..35c943fb 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Lion.AbpPro.Domain.csproj @@ -11,6 +11,7 @@ + diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs index d0f0c980..86b5ae43 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs @@ -1,4 +1,7 @@ using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates; +using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; +using Lion.AbpPro.LanguageManagement.Languages.Aggregates; +using Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates; using Lion.AbpPro.NotificationManagement.Notifications.Aggregates; namespace Lion.AbpPro.EntityFrameworkCore @@ -16,7 +19,8 @@ namespace Lion.AbpPro.EntityFrameworkCore public class AbpProDbContext : AbpDbContext, IAbpProDbContext, IBasicManagementDbContext, INotificationManagementDbContext, - IDataDictionaryManagementDbContext + IDataDictionaryManagementDbContext, + ILanguageManagementDbContext { public DbSet Users { get; set; } public DbSet Roles { get; set; } @@ -36,8 +40,10 @@ namespace Lion.AbpPro.EntityFrameworkCore public DbSet BackgroundJobs { get; set; } public DbSet AuditLogs { get; set; } public DbSet Notifications { get; set; } - public DbSet DataDictionary { get; set; } - + public DbSet DataDictionaries { get; set; } + public DbSet Languages { get; set; } + public DbSet LanguageTexts { get; set; } + public AbpProDbContext(DbContextOptions options) : base(options) { @@ -49,6 +55,7 @@ namespace Lion.AbpPro.EntityFrameworkCore // 如何设置表前缀 // Abp框架表前缀 Abp得不建议修改表前缀 // AbpCommonDbProperties.DbTablePrefix = "xxx"; + // 数据字典表前缀 //DataDictionaryManagementDbProperties=“xxx” // 通知模块 @@ -67,8 +74,9 @@ namespace Lion.AbpPro.EntityFrameworkCore // 消息通知 builder.ConfigureNotificationManagement(); + // 多语言 + builder.ConfigureLanguageManagement(); } - } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs index be378d36..cba04d49 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs @@ -1,3 +1,4 @@ +using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; using Volo.Abp.Guids; namespace Lion.AbpPro.EntityFrameworkCore @@ -7,7 +8,8 @@ namespace Lion.AbpPro.EntityFrameworkCore typeof(BasicManagementEntityFrameworkCoreModule), typeof(AbpEntityFrameworkCoreMySQLModule), typeof(DataDictionaryManagementEntityFrameworkCoreModule), - typeof(NotificationManagementEntityFrameworkCoreModule) + typeof(NotificationManagementEntityFrameworkCoreModule), + typeof(LanguageManagementEntityFrameworkCoreModule) )] public class AbpProEntityFrameworkCoreModule : AbpModule { diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj index 8864a6c9..ba4a93d1 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj @@ -10,6 +10,7 @@ + diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.Designer.cs new file mode 100644 index 00000000..eb60fd60 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.Designer.cs @@ -0,0 +1,1870 @@ +// +using System; +using Lion.AbpPro.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + [DbContext(typeof(AbpProDbContext))] + [Migration("20230318021951_AddLanguage")] + partial class AddLanguage + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DataDictionary", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("char(36)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayText") + .HasColumnType("longtext"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("DataDictionaryDetail", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .IsRequired() + .HasColumnType("longtext") + .HasComment("图标"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.ToTable("AbpLanguages", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("int"); + + b.Property("MessageType") + .HasColumnType("int"); + + b.Property("SenderId") + .HasColumnType("char(36)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.ToTable("Notification", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("char(36)"); + + b.Property("Read") + .HasColumnType("tinyint(1)"); + + b.Property("ReadTime") + .HasColumnType("datetime(6)"); + + b.Property("ReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("NotificationId"); + + b.ToTable("NotificationSubscription", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("longtext"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime(6)") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint unsigned") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("char(36)"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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") + .HasColumnType("char(36)"); + + b.Property("EntityChangeId") + .HasColumnType("char(36)"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime(6)"); + + b.Property("NextTryTime") + .HasColumnType("datetime(6)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint unsigned") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(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("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.HasOne("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) + .WithMany("Details") + .HasForeignKey("DataDictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.HasOne("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", null) + .WithMany("NotificationSubscriptions") + .HasForeignKey("NotificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + 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.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Navigation("NotificationSubscriptions"); + }); + + 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/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.cs new file mode 100644 index 00000000..f3d731e0 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230318021951_AddLanguage.cs @@ -0,0 +1,94 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + /// + public partial class AddLanguage : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpLanguages", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称") + .Annotation("MySql:CharSet", "utf8mb4"), + UiCultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "Ui语言名称") + .Annotation("MySql:CharSet", "utf8mb4"), + DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "显示名称") + .Annotation("MySql:CharSet", "utf8mb4"), + FlagIcon = table.Column(type: "longtext", nullable: false, comment: "图标") + .Annotation("MySql:CharSet", "utf8mb4"), + IsEnabled = table.Column(type: "tinyint(1)", nullable: false), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLanguages", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "AbpLanguageTexts", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + ResourceName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "资源名称") + .Annotation("MySql:CharSet", "utf8mb4"), + CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称") + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "名称") + .Annotation("MySql:CharSet", "utf8mb4"), + Value = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "值") + .Annotation("MySql:CharSet", "utf8mb4"), + ExtraProperties = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLanguageTexts", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLanguageTexts_TenantId_ResourceName_CultureName", + table: "AbpLanguageTexts", + columns: new[] { "TenantId", "ResourceName", "CultureName" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpLanguages"); + + migrationBuilder.DropTable( + name: "AbpLanguageTexts"); + } + } +} diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.Designer.cs new file mode 100644 index 00000000..3ff4d2c2 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.Designer.cs @@ -0,0 +1,1873 @@ +// +using System; +using Lion.AbpPro.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + [DbContext(typeof(AbpProDbContext))] + [Migration("20230320050728_AddLanguageDefault")] + partial class AddLanguageDefault + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("DataDictionary", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("char(36)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayText") + .HasColumnType("longtext"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("DataDictionaryDetail", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .IsRequired() + .HasColumnType("longtext") + .HasComment("图标"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.ToTable("AbpLanguages", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("int"); + + b.Property("MessageType") + .HasColumnType("int"); + + b.Property("SenderId") + .HasColumnType("char(36)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.ToTable("Notification", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("char(36)"); + + b.Property("Read") + .HasColumnType("tinyint(1)"); + + b.Property("ReadTime") + .HasColumnType("datetime(6)"); + + b.Property("ReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("NotificationId"); + + b.ToTable("NotificationSubscription", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("longtext"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime(6)") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint unsigned") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("char(36)"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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") + .HasColumnType("char(36)"); + + b.Property("EntityChangeId") + .HasColumnType("char(36)"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime(6)"); + + b.Property("NextTryTime") + .HasColumnType("datetime(6)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint unsigned") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(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("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.HasOne("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) + .WithMany("Details") + .HasForeignKey("DataDictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.HasOne("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", null) + .WithMany("NotificationSubscriptions") + .HasForeignKey("NotificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + 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.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Navigation("NotificationSubscriptions"); + }); + + 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/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.cs new file mode 100644 index 00000000..0f633dd9 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230320050728_AddLanguageDefault.cs @@ -0,0 +1,29 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + /// + public partial class AddLanguageDefault : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "IsDefault", + table: "AbpLanguages", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IsDefault", + table: "AbpLanguages"); + } + } +} diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.Designer.cs new file mode 100644 index 00000000..fde8ee47 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.Designer.cs @@ -0,0 +1,1876 @@ +// +using System; +using Lion.AbpPro.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + [DbContext(typeof(AbpProDbContext))] + [Migration("20230329141512_UpdateTablePrefix")] + partial class UpdateTablePrefix + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "7.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpDataDictionaries", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("char(36)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisplayText") + .HasColumnType("longtext"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("AbpDataDictionaryDetails", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .IsRequired() + .HasColumnType("longtext") + .HasComment("图标"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.HasIndex("CultureName") + .IsUnique(); + + b.ToTable("AbpLanguages", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("int"); + + b.Property("MessageType") + .HasColumnType("int"); + + b.Property("SenderId") + .HasColumnType("char(36)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.ToTable("AbpNotifications", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("char(36)"); + + b.Property("Read") + .HasColumnType("tinyint(1)"); + + b.Property("ReadTime") + .HasColumnType("datetime(6)"); + + b.Property("ReceiveId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("NotificationId"); + + b.ToTable("AbpNotificationSubscriptions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("longtext"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("char(36)") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("char(36)") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime(6)") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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") + .HasColumnType("char(36)"); + + b.Property("AuditLogId") + .HasColumnType("char(36)") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime(6)") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint unsigned") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("char(36)"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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") + .HasColumnType("char(36)"); + + b.Property("EntityChangeId") + .HasColumnType("char(36)"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("longtext"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("LastTryTime") + .HasColumnType("datetime(6)"); + + b.Property("NextTryTime") + .HasColumnType("datetime(6)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint unsigned") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(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("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .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("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(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") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.HasOne("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", null) + .WithMany("Details") + .HasForeignKey("DataDictionaryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.HasOne("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", null) + .WithMany("NotificationSubscriptions") + .HasForeignKey("NotificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + 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.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => + { + b.Navigation("NotificationSubscriptions"); + }); + + 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/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.cs new file mode 100644 index 00000000..031465b7 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20230329141512_UpdateTablePrefix.cs @@ -0,0 +1,200 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Lion.AbpPro.Migrations +{ + /// + public partial class UpdateTablePrefix : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_DataDictionaryDetail_DataDictionary_DataDictionaryId", + table: "DataDictionaryDetail"); + + migrationBuilder.DropForeignKey( + name: "FK_NotificationSubscription_Notification_NotificationId", + table: "NotificationSubscription"); + + migrationBuilder.DropPrimaryKey( + name: "PK_NotificationSubscription", + table: "NotificationSubscription"); + + migrationBuilder.DropPrimaryKey( + name: "PK_Notification", + table: "Notification"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DataDictionaryDetail", + table: "DataDictionaryDetail"); + + migrationBuilder.DropPrimaryKey( + name: "PK_DataDictionary", + table: "DataDictionary"); + + migrationBuilder.RenameTable( + name: "NotificationSubscription", + newName: "AbpNotificationSubscriptions"); + + migrationBuilder.RenameTable( + name: "Notification", + newName: "AbpNotifications"); + + migrationBuilder.RenameTable( + name: "DataDictionaryDetail", + newName: "AbpDataDictionaryDetails"); + + migrationBuilder.RenameTable( + name: "DataDictionary", + newName: "AbpDataDictionaries"); + + migrationBuilder.RenameIndex( + name: "IX_NotificationSubscription_NotificationId", + table: "AbpNotificationSubscriptions", + newName: "IX_AbpNotificationSubscriptions_NotificationId"); + + migrationBuilder.RenameIndex( + name: "IX_DataDictionaryDetail_DataDictionaryId", + table: "AbpDataDictionaryDetails", + newName: "IX_AbpDataDictionaryDetails_DataDictionaryId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AbpNotificationSubscriptions", + table: "AbpNotificationSubscriptions", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AbpNotifications", + table: "AbpNotifications", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AbpDataDictionaryDetails", + table: "AbpDataDictionaryDetails", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_AbpDataDictionaries", + table: "AbpDataDictionaries", + column: "Id"); + + migrationBuilder.CreateIndex( + name: "IX_AbpLanguages_CultureName", + table: "AbpLanguages", + column: "CultureName", + unique: true); + + migrationBuilder.AddForeignKey( + name: "FK_AbpDataDictionaryDetails_AbpDataDictionaries_DataDictionaryId", + table: "AbpDataDictionaryDetails", + column: "DataDictionaryId", + principalTable: "AbpDataDictionaries", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_AbpNotificationSubscriptions_AbpNotifications_NotificationId", + table: "AbpNotificationSubscriptions", + column: "NotificationId", + principalTable: "AbpNotifications", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_AbpDataDictionaryDetails_AbpDataDictionaries_DataDictionaryId", + table: "AbpDataDictionaryDetails"); + + migrationBuilder.DropForeignKey( + name: "FK_AbpNotificationSubscriptions_AbpNotifications_NotificationId", + table: "AbpNotificationSubscriptions"); + + migrationBuilder.DropIndex( + name: "IX_AbpLanguages_CultureName", + table: "AbpLanguages"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AbpNotificationSubscriptions", + table: "AbpNotificationSubscriptions"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AbpNotifications", + table: "AbpNotifications"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AbpDataDictionaryDetails", + table: "AbpDataDictionaryDetails"); + + migrationBuilder.DropPrimaryKey( + name: "PK_AbpDataDictionaries", + table: "AbpDataDictionaries"); + + migrationBuilder.RenameTable( + name: "AbpNotificationSubscriptions", + newName: "NotificationSubscription"); + + migrationBuilder.RenameTable( + name: "AbpNotifications", + newName: "Notification"); + + migrationBuilder.RenameTable( + name: "AbpDataDictionaryDetails", + newName: "DataDictionaryDetail"); + + migrationBuilder.RenameTable( + name: "AbpDataDictionaries", + newName: "DataDictionary"); + + migrationBuilder.RenameIndex( + name: "IX_AbpNotificationSubscriptions_NotificationId", + table: "NotificationSubscription", + newName: "IX_NotificationSubscription_NotificationId"); + + migrationBuilder.RenameIndex( + name: "IX_AbpDataDictionaryDetails_DataDictionaryId", + table: "DataDictionaryDetail", + newName: "IX_DataDictionaryDetail_DataDictionaryId"); + + migrationBuilder.AddPrimaryKey( + name: "PK_NotificationSubscription", + table: "NotificationSubscription", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_Notification", + table: "Notification", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DataDictionaryDetail", + table: "DataDictionaryDetail", + column: "Id"); + + migrationBuilder.AddPrimaryKey( + name: "PK_DataDictionary", + table: "DataDictionary", + column: "Id"); + + migrationBuilder.AddForeignKey( + name: "FK_DataDictionaryDetail_DataDictionary_DataDictionaryId", + table: "DataDictionaryDetail", + column: "DataDictionaryId", + principalTable: "DataDictionary", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_NotificationSubscription_Notification_NotificationId", + table: "NotificationSubscription", + column: "NotificationId", + principalTable: "Notification", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + } +} diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs index 7373bbbd..ac72a77f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs @@ -87,7 +87,7 @@ namespace Lion.AbpPro.Migrations b.HasKey("Id"); - b.ToTable("DataDictionary", (string)null); + b.ToTable("AbpDataDictionaries", (string)null); }); modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => @@ -133,7 +133,169 @@ namespace Lion.AbpPro.Migrations b.HasIndex("DataDictionaryId"); - b.ToTable("DataDictionaryDetail", (string)null); + b.ToTable("AbpDataDictionaryDetails", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasComment("值"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ResourceName", "CultureName"); + + b.ToTable("AbpLanguageTexts", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .IsRequired() + .HasColumnType("longtext") + .HasComment("图标"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("Ui语言名称"); + + b.HasKey("Id"); + + b.HasIndex("CultureName") + .IsUnique(); + + b.ToTable("AbpLanguages", (string)null); }); modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => @@ -202,7 +364,7 @@ namespace Lion.AbpPro.Migrations b.HasKey("Id"); - b.ToTable("Notification", (string)null); + b.ToTable("AbpNotifications", (string)null); }); modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => @@ -256,7 +418,7 @@ namespace Lion.AbpPro.Migrations b.HasIndex("NotificationId"); - b.ToTable("NotificationSubscription", (string)null); + b.ToTable("AbpNotificationSubscriptions", (string)null); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => diff --git a/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/AbpProFreeSqlModule.cs b/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/AbpProFreeSqlModule.cs index 2eae218f..271b4a7f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/AbpProFreeSqlModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/AbpProFreeSqlModule.cs @@ -10,6 +10,12 @@ public class AbpProFreeSqlModule : AbpModule .UseConnectionString(FreeSql.DataType.MySql, connectionString) .Build(); + freeSql.Aop.CurdAfter += (s, e) => + { + Console.WriteLine($"ManagedThreadId:{Thread.CurrentThread.ManagedThreadId};" + + $" FullName:{e.EntityType.FullName} ElapsedMilliseconds:{e.ElapsedMilliseconds}ms, {e.Sql}"); + }; + context.Services.AddSingleton(freeSql); } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/AbpProHttpApiClientModule.cs b/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/AbpProHttpApiClientModule.cs index 75bfed42..e82b1b64 100644 --- a/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/AbpProHttpApiClientModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/AbpProHttpApiClientModule.cs @@ -1,11 +1,15 @@ using Lion.AbpPro.BasicManagement; +using Lion.AbpPro.LanguageManagement; +using Lion.AbpPro.NotificationManagement; namespace Lion.AbpPro { [DependsOn( typeof(AbpProApplicationContractsModule), typeof(BasicManagementHttpApiClientModule), - typeof(DataDictionaryManagementHttpApiClientModule) + typeof(DataDictionaryManagementHttpApiClientModule), + typeof(NotificationManagementHttpApiClientModule), + typeof(LanguageManagementHttpApiClientModule) )] public class AbpProHttpApiClientModule : AbpModule { diff --git a/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/Lion.AbpPro.HttpApi.Client.csproj b/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/Lion.AbpPro.HttpApi.Client.csproj index 698644e8..0ae476a9 100644 --- a/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/Lion.AbpPro.HttpApi.Client.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.HttpApi.Client/Lion.AbpPro.HttpApi.Client.csproj @@ -10,6 +10,8 @@ + + diff --git a/aspnet-core/services/src/Lion.AbpPro.HttpApi/AbpProHttpApiModule.cs b/aspnet-core/services/src/Lion.AbpPro.HttpApi/AbpProHttpApiModule.cs index 819a13ff..f1d7f5fc 100644 --- a/aspnet-core/services/src/Lion.AbpPro.HttpApi/AbpProHttpApiModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.HttpApi/AbpProHttpApiModule.cs @@ -1,4 +1,5 @@ using Lion.AbpPro.BasicManagement; +using Lion.AbpPro.LanguageManagement; namespace Lion.AbpPro { @@ -6,7 +7,8 @@ namespace Lion.AbpPro typeof(AbpProApplicationContractsModule), typeof(BasicManagementHttpApiModule), typeof(DataDictionaryManagementHttpApiModule), - typeof(NotificationManagementHttpApiModule) + typeof(NotificationManagementHttpApiModule), + typeof(LanguageManagementHttpApiModule) )] public class AbpProHttpApiModule : AbpModule { diff --git a/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj index 6dc38e5c..93f73038 100644 --- a/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Lion.AbpPro.HttpApi.csproj @@ -11,6 +11,7 @@ + diff --git a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs index 6b8d4b9b..0dbdd91f 100644 --- a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs +++ b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.DataProtection; using StackExchange.Redis; using Volo.Abp.Caching; +using Volo.Abp.Settings; namespace Lion.AbpPro; @@ -23,7 +24,13 @@ public class SharedHostingMicroserviceModule : AbpModule ConfigAntiForgery(); ConfigureAbpExceptions(context); } - + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + // 设置默认语言为简体中文 + context.ServiceProvider.GetRequiredService().Get(LocalizationSettingNames.DefaultLanguage).DefaultValue = "zh-Hans"; + } + /// /// 异常处理 /// diff --git a/vben28/nswag/nswag.json b/vben28/nswag/nswag.json index b9ee2b2d..92ebe360 100644 --- a/vben28/nswag/nswag.json +++ b/vben28/nswag/nswag.json @@ -1,5 +1,5 @@ { - "runtime": "Net60", + "runtime": "Net70", "defaultVariables": null, "documentGenerator": { "fromDocument": { diff --git a/vben28/nswag/refresh.bat b/vben28/nswag/refresh.bat index d7c1253d..0011273b 100644 --- a/vben28/nswag/refresh.bat +++ b/vben28/nswag/refresh.bat @@ -1 +1 @@ -"..\node_modules\.bin\nswag" run /runtime:Net60 +"..\node_modules\.bin\nswag" run /runtime:Net70 diff --git a/vben28/src/locales/lang/en/common.ts b/vben28/src/locales/lang/en/common.ts index 6d1ee68e..8aa78f45 100644 --- a/vben28/src/locales/lang/en/common.ts +++ b/vben28/src/locales/lang/en/common.ts @@ -33,5 +33,9 @@ export default { status: 'Status', active: 'IsActive', download: 'DownLoad', - export:"Export" + export: 'Export', + isEnabled: 'IsEnabled', + default: 'Default', + name: 'Name', + value: 'Value', }; diff --git a/vben28/src/locales/lang/en/routes/admin.ts b/vben28/src/locales/lang/en/routes/admin.ts index 3ae3d5a5..89826f14 100644 --- a/vben28/src/locales/lang/en/routes/admin.ts +++ b/vben28/src/locales/lang/en/routes/admin.ts @@ -2,7 +2,13 @@ export default { systemManagement: 'SystemManagement', userManagement: 'UserManagement', roleManagement: 'RoleManagement', - + languageManagement: 'LanguageManagement', + languageTextManagement: 'LanguageTextManagement', + language_cultureName: 'CultureName', + language_uiCultureName: 'UICultureName', + language_displayName: 'DisplayName', + language_flagIcon: 'FlagIcon', + languageTexts_resourceName: 'ResourceName', userManagement_userName: 'UserName', userManagement_name: 'Name', userManagement_email: 'Email', @@ -35,6 +41,7 @@ export default { audit_url: 'URL', audit_entityInfo: 'EntityInformation', audit_message: 'Message', + audit_hasException: 'HasException', audit_hasException_all: 'All', audit_hasException_yes: 'Yes', audit_hasException_no: 'No', diff --git a/vben28/src/locales/lang/zh-CN/common.ts b/vben28/src/locales/lang/zh-CN/common.ts index ffbf906e..499ab0ee 100644 --- a/vben28/src/locales/lang/zh-CN/common.ts +++ b/vben28/src/locales/lang/zh-CN/common.ts @@ -36,5 +36,9 @@ export default { status: '状态', active: '是否激活', download: '下载', - export:"导出" + export: '导出', + isEnabled: '是否启用', + default: '默认', + name: '名称', + value: '值', }; diff --git a/vben28/src/locales/lang/zh-CN/routes/admin.ts b/vben28/src/locales/lang/zh-CN/routes/admin.ts index 1577abca..d491368d 100644 --- a/vben28/src/locales/lang/zh-CN/routes/admin.ts +++ b/vben28/src/locales/lang/zh-CN/routes/admin.ts @@ -2,7 +2,13 @@ export default { systemManagement: '系统管理', userManagement: '用户管理', roleManagement: '角色管理', - + languageManagement: '语言管理', + languageTextManagement: '语言文本管理', + language_cultureName: '语言名称', + language_uiCultureName: 'UI语言名称', + language_displayName: '显示名称', + language_flagIcon: '图标', + languageTexts_resourceName: '资源名称', userManagement_userName: '用户名', userManagement_name: '真实名称', userManagement_email: '邮箱', diff --git a/vben28/src/router/routes/modules/admin.ts b/vben28/src/router/routes/modules/admin.ts index f72756c3..0c47d663 100644 --- a/vben28/src/router/routes/modules/admin.ts +++ b/vben28/src/router/routes/modules/admin.ts @@ -11,7 +11,7 @@ const admin: AppRouteModule = { orderNo: 20, icon: 'ion:grid-outline', title: t('routes.admin.systemManagement'), - policy: 'AbpIdentity' + policy: 'AbpIdentity', }, children: [ { @@ -21,7 +21,7 @@ const admin: AppRouteModule = { meta: { title: t('routes.admin.userManagement'), policy: 'AbpIdentity.Users', - icon: 'ant-design:skin-outlined', + icon: 'ant-design:user-outlined', }, }, { @@ -84,6 +84,26 @@ const admin: AppRouteModule = { policy: 'AbpIdentity.DataDictionaryManagement', }, }, + { + path: 'language', + name: 'language', + component: () => import('/@/views/admin/language/Index.vue'), + meta: { + title: t('routes.admin.languageManagement'), + icon: 'ant-design:read-outlined', + policy: 'AbpIdentity.Languages', + }, + }, + { + path: 'languageText', + name: 'languageText', + component: () => import('/@/views/admin/languageText/Index.vue'), + meta: { + title: t('routes.admin.languageTextManagement'), + icon: 'ant-design:font-size-outlined', + policy: 'AbpIdentity.LanguageTexts', + }, + }, // { // path: 'files', // name: 'files', diff --git a/vben28/src/services/ServiceProxies.ts b/vben28/src/services/ServiceProxies.ts index 36520518..afdb8be4 100644 --- a/vben28/src/services/ServiceProxies.ts +++ b/vben28/src/services/ServiceProxies.ts @@ -7,14606 +7,16150 @@ //---------------------- // ReSharper disable InconsistentNaming -import { ServiceProxyBase } from './ServiceProxyBase'; -import axios, { - AxiosError, - AxiosInstance, - AxiosRequestConfig, - AxiosResponse, - CancelToken, -} from 'axios'; +import {ServiceProxyBase} from './ServiceProxyBase' +import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelToken } from 'axios'; import dayjs from 'dayjs'; export class AbpApiDefinitionServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * @param includeTypes (optional) - * @return Success - */ - apiDefinition( - includeTypes: boolean | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/api/abp/api-definition?'; - if (includeTypes === null) throw new Error("The parameter 'includeTypes' cannot be null."); - else if (includeTypes !== undefined) - url_ += 'IncludeTypes=' + encodeURIComponent('' + includeTypes) + '&'; - url_ = url_.replace(/[?&]$/, ''); - - let options_ = { - method: 'GET', - url: url_, - headers: { - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processApiDefinition(_response), - ); - }); - } - - protected processApiDefinition(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = ApplicationApiDescriptionModel.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * @param includeTypes (optional) + * @return Success + */ + apiDefinition(includeTypes: boolean | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/api/abp/api-definition?"; + if (includeTypes === null) + throw new Error("The parameter 'includeTypes' cannot be null."); + else if (includeTypes !== undefined) + url_ += "IncludeTypes=" + encodeURIComponent("" + includeTypes) + "&"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "GET", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processApiDefinition(_response)); + }); + } + + protected processApiDefinition(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = ApplicationApiDescriptionModel.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class AbpApplicationConfigurationServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * @param includeLocalizationResources (optional) - * @return Success - */ - applicationConfiguration( - includeLocalizationResources: boolean | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/api/abp/application-configuration?'; - if (includeLocalizationResources === null) - throw new Error("The parameter 'includeLocalizationResources' cannot be null."); - else if (includeLocalizationResources !== undefined) - url_ += - 'IncludeLocalizationResources=' + - encodeURIComponent('' + includeLocalizationResources) + - '&'; - url_ = url_.replace(/[?&]$/, ''); - - let options_ = { - method: 'GET', - url: url_, - headers: { - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processApplicationConfiguration(_response), - ); - }); - } - - protected processApplicationConfiguration( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = ApplicationConfigurationDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * @param includeLocalizationResources (optional) + * @return Success + */ + applicationConfiguration(includeLocalizationResources: boolean | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/api/abp/application-configuration?"; + if (includeLocalizationResources === null) + throw new Error("The parameter 'includeLocalizationResources' cannot be null."); + else if (includeLocalizationResources !== undefined) + url_ += "IncludeLocalizationResources=" + encodeURIComponent("" + includeLocalizationResources) + "&"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "GET", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processApplicationConfiguration(_response)); + }); + } + + protected processApplicationConfiguration(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = ApplicationConfigurationDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class AbpApplicationLocalizationServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * @param onlyDynamics (optional) - * @return Success - */ - applicationLocalization( - cultureName: string, - onlyDynamics: boolean | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/api/abp/application-localization?'; - if (cultureName === undefined || cultureName === null) - throw new Error("The parameter 'cultureName' must be defined and cannot be null."); - else url_ += 'CultureName=' + encodeURIComponent('' + cultureName) + '&'; - if (onlyDynamics === null) throw new Error("The parameter 'onlyDynamics' cannot be null."); - else if (onlyDynamics !== undefined) - url_ += 'OnlyDynamics=' + encodeURIComponent('' + onlyDynamics) + '&'; - url_ = url_.replace(/[?&]$/, ''); - - let options_ = { - method: 'GET', - url: url_, - headers: { - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processApplicationLocalization(_response), - ); - }); - } - - protected processApplicationLocalization( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = ApplicationLocalizationDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * @param onlyDynamics (optional) + * @return Success + */ + applicationLocalization(cultureName: string, onlyDynamics: boolean | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/api/abp/application-localization?"; + if (cultureName === undefined || cultureName === null) + throw new Error("The parameter 'cultureName' must be defined and cannot be null."); + else + url_ += "CultureName=" + encodeURIComponent("" + cultureName) + "&"; + if (onlyDynamics === null) + throw new Error("The parameter 'onlyDynamics' cannot be null."); + else if (onlyDynamics !== undefined) + url_ += "OnlyDynamics=" + encodeURIComponent("" + onlyDynamics) + "&"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "GET", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processApplicationLocalization(_response)); + }); + } + + protected processApplicationLocalization(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = ApplicationLocalizationDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class AccountServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 登录 - * @param body (optional) - * @return Success - */ - login(body: LoginInput | undefined, cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/api/app/account/login'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processLogin(_response), - ); - }); - } - - protected processLogin(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = LoginOutput.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 登录 + * @param body (optional) + * @return Success + */ + login(body: LoginInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/api/app/account/login"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processLogin(_response)); + }); + } + + protected processLogin(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = LoginOutput.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class AuditLogsServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 分页获取审计日志信息 - * @param body (optional) - * @return Success - */ - page( - body: PagingAuditLogListInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/AuditLogs/page'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processPage(_response), - ); - }); - } - - protected processPage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = GetAuditLogPageListOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 分页获取审计日志信息 + * @param body (optional) + * @return Success + */ + page(body: PagingAuditLogListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/AuditLogs/page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = GetAuditLogPageListOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class DataDictionaryServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 分页字典类型 - * @param body (optional) - * @return Success - */ - page( - body: PagingDataDictionaryInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/page'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processPage(_response), - ); - }); - } - - protected processPage( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = PagingDataDictionaryOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 分页字典明细 - * @param body (optional) - * @return Success - */ - pageDetail( - body: PagingDataDictionaryDetailInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/pageDetail'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processPageDetail(_response), - ); - }); - } - - protected processPageDetail( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = PagingDataDictionaryDetailOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 创建字典类型 - * @param body (optional) - * @return Success - */ - create( - body: CreateDataDictinaryInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/create'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processCreate(_response), - ); - }); - } - - protected processCreate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 创建字典明细 - * @param body (optional) - * @return Success - */ - createDetail( - body: CreateDataDictinaryDetailInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/createDetail'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processCreateDetail(_response), - ); - }); - } - - protected processCreateDetail(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 设置字典明细状态 - * @param body (optional) - * @return Success - */ - status( - body: SetDataDictinaryDetailInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/status'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processStatus(_response), - ); - }); - } - - protected processStatus(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 更新字典明细 - * @param body (optional) - * @return Success - */ - updateDetail( - body: UpdateDetailInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/updateDetail'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdateDetail(_response), - ); - }); - } - - protected processUpdateDetail(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 删除字典明细 - * @param body (optional) - * @return Success - */ - delete( - body: DeleteDataDictionaryDetailInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/delete'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processDelete(_response), - ); - }); - } - - protected processDelete(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 删除字典类型 - * @param body (optional) - * @return Success - */ - deleteDataDictionaryType( - body: IdInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/deleteDataDictionaryType'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processDeleteDataDictionaryType(_response), - ); - }); - } - - protected processDeleteDataDictionaryType(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 修改字典类型 - * @param body (optional) - * @return Success - */ - update( - body: UpdateDataDictinaryInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/DataDictionary/update'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdate(_response), - ); - }); - } - - protected processUpdate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 分页字典类型 + * @param body (optional) + * @return Success + */ + page(body: PagingDataDictionaryInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PagingDataDictionaryOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页字典明细 + * @param body (optional) + * @return Success + */ + pageDetail(body: PagingDataDictionaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/pageDetail"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPageDetail(_response)); + }); + } + + protected processPageDetail(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PagingDataDictionaryDetailOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建字典类型 + * @param body (optional) + * @return Success + */ + create(body: CreateDataDictinaryInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建字典明细 + * @param body (optional) + * @return Success + */ + createDetail(body: CreateDataDictinaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/createDetail"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreateDetail(_response)); + }); + } + + protected processCreateDetail(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 设置字典明细状态 + * @param body (optional) + * @return Success + */ + status(body: SetDataDictinaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/status"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processStatus(_response)); + }); + } + + protected processStatus(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 更新字典明细 + * @param body (optional) + * @return Success + */ + updateDetail(body: UpdateDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/updateDetail"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdateDetail(_response)); + }); + } + + protected processUpdateDetail(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除字典明细 + * @param body (optional) + * @return Success + */ + delete(body: DeleteDataDictionaryDetailInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/delete"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + }); + } + + protected processDelete(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除字典类型 + * @param body (optional) + * @return Success + */ + deleteDataDictionaryType(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/deleteDataDictionaryType"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDeleteDataDictionaryType(_response)); + }); + } + + protected processDeleteDataDictionaryType(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 修改字典类型 + * @param body (optional) + * @return Success + */ + update(body: UpdateDataDictinaryInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/DataDictionary/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } +} + +export class LanguagesServiceProxy extends ServiceProxyBase { + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 获取所有语言 + * @return Success + */ + all( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Languages/All"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "POST", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAll(_response)); + }); + } + + protected processAll(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + if (Array.isArray(resultData200)) { + result200 = [] as any; + for (let item of resultData200) + result200!.push(PageLanguageOutput.fromJS(item)); + } + else { + result200 = null; + } + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页查询语言 + * @param body (optional) + * @return Success + */ + page(body: PageLanguageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Languages/Page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PageLanguageOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建语言 + * @param body (optional) + * @return Success + */ + create(body: CreateLanguageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Languages/Create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 编辑语言 + * @param body (optional) + * @return Success + */ + update(body: UpdateLanguageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Languages/Update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除语言 + * @param body (optional) + * @return Success + */ + delete(body: DeleteLanguageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Languages/Delete"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + }); + } + + protected processDelete(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 设置默认语言 + * @param body (optional) + * @return Success + */ + setDefault(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Languages/SetDefault"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSetDefault(_response)); + }); + } + + protected processSetDefault(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } +} + +export class LanguageTextsServiceProxy extends ServiceProxyBase { + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 获取所有资源 + * @return Success + */ + allResource( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/LanguageTexts/AllResource"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "POST", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAllResource(_response)); + }); + } + + protected processAllResource(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + if (Array.isArray(resultData200)) { + result200 = [] as any; + for (let item of resultData200) + result200!.push(StringStringFromSelector.fromJS(item)); + } + else { + result200 = null; + } + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页查询语言文本 + * @param body (optional) + * @return Success + */ + page(body: PageLanguageTextInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/LanguageTexts/Page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PageLanguageTextOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建语言文本 + * @param body (optional) + * @return Success + */ + create(body: CreateLanguageTextInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/LanguageTexts/Create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 编辑语言文本 + * @param body (optional) + * @return Success + */ + update(body: UpdateLanguageTextInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/LanguageTexts/Update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class EsLogServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 分页获取Es日志 - * @param body (optional) - * @return Success - */ - page( - body: PagingElasticSearchLogInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/EsLog/page'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processPage(_response), - ); - }); - } - - protected processPage( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = PagingElasticSearchLogOutputCustomPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 分页获取Es日志 + * @param body (optional) + * @return Success + */ + page(body: PagingElasticSearchLogInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/EsLog/page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PagingElasticSearchLogOutputCustomPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class NotificationServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 分页查询普通消息 - * @param body (optional) - * @return Success - */ - common( - body: PagingNotificationListInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/Common'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processCommon(_response), - ); - }); - } - - protected processCommon( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = PagingNotificationListOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 分页查询广播消息 - * @param body (optional) - * @return Success - */ - broadCast( - body: PagingNotificationListInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/BroadCast'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processBroadCast(_response), - ); - }); - } - - protected processBroadCast( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = PagingNotificationListOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 发送警告文本消息 - * @param body (optional) - * @return Success - */ - sendCommonWarningMessage( - body: SendCommonMessageInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/SendCommonWarningMessage'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processSendCommonWarningMessage(_response), - ); - }); - } - - protected processSendCommonWarningMessage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 发送普通文本消息 - * @param body (optional) - * @return Success - */ - sendCommonInformationMessage( - body: SendCommonMessageInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/SendCommonInformationMessage'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processSendCommonInformationMessage(_response), - ); - }); - } - - protected processSendCommonInformationMessage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 发送错误文本消息 - * @param body (optional) - * @return Success - */ - sendCommonErrorMessage( - body: SendCommonMessageInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/SendCommonErrorMessage'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processSendCommonErrorMessage(_response), - ); - }); - } - - protected processSendCommonErrorMessage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 发送警告广播消息 - * @param body (optional) - * @return Success - */ - sendBroadCastWarningMessage( - body: SendBroadCastMessageInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/SendBroadCastWarningMessage'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processSendBroadCastWarningMessage(_response), - ); - }); - } - - protected processSendBroadCastWarningMessage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 发送正常广播消息 - * @param body (optional) - * @return Success - */ - sendBroadCastInformationMessage( - body: SendBroadCastMessageInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/SendBroadCastInformationMessage'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processSendBroadCastInformationMessage(_response), - ); - }); - } - - protected processSendBroadCastInformationMessage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 发送错误广播消息 - * @param body (optional) - * @return Success - */ - sendBroadCastErrorMessage( - body: SendBroadCastMessageInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Notification/SendBroadCastErrorMessage'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processSendBroadCastErrorMessage(_response), - ); - }); - } - - protected processSendBroadCastErrorMessage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 消息设置为已读 - * @param body (optional) - * @return Success - */ - read(body: SetReadInput | undefined, cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/Notification/Read'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processRead(_response), - ); - }); - } - - protected processRead(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 分页获取用户普通文本消息 + * @param body (optional) + * @return Success + */ + common(body: PagingNotificationListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/Common"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCommon(_response)); + }); + } + + protected processCommon(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PagingNotificationListOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页获取广播消息 + * @param body (optional) + * @return Success + */ + broadCast(body: PagingNotificationListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/BroadCast"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processBroadCast(_response)); + }); + } + + protected processBroadCast(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PagingNotificationListOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 发送警告文本消息 + * @param body (optional) + * @return Success + */ + sendCommonWarningMessage(body: SendCommonMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/SendCommonWarningMessage"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSendCommonWarningMessage(_response)); + }); + } + + protected processSendCommonWarningMessage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 发送普通文本消息 + * @param body (optional) + * @return Success + */ + sendCommonInformationMessage(body: SendCommonMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/SendCommonInformationMessage"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSendCommonInformationMessage(_response)); + }); + } + + protected processSendCommonInformationMessage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 发送错误文本消息 + * @param body (optional) + * @return Success + */ + sendCommonErrorMessage(body: SendCommonMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/SendCommonErrorMessage"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSendCommonErrorMessage(_response)); + }); + } + + protected processSendCommonErrorMessage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 发送警告广播消息 + * @param body (optional) + * @return Success + */ + sendBroadCastWarningMessage(body: SendBroadCastMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/SendBroadCastWarningMessage"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSendBroadCastWarningMessage(_response)); + }); + } + + protected processSendBroadCastWarningMessage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 发送正常广播消息 + * @param body (optional) + * @return Success + */ + sendBroadCastInformationMessage(body: SendBroadCastMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/SendBroadCastInformationMessage"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSendBroadCastInformationMessage(_response)); + }); + } + + protected processSendBroadCastInformationMessage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 发送错误广播消息 + * @param body (optional) + * @return Success + */ + sendBroadCastErrorMessage(body: SendBroadCastMessageInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/SendBroadCastErrorMessage"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processSendBroadCastErrorMessage(_response)); + }); + } + + protected processSendBroadCastErrorMessage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 消息设置为已读 + * @param body (optional) + * @return Success + */ + read(body: SetReadInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Notification/Read"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRead(_response)); + }); + } + + protected processRead(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class OrganizationUnitsServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 获取组织机构树 - * @return Success - */ - tree(cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/tree'; - url_ = url_.replace(/[?&]$/, ''); - - let options_ = { - method: 'POST', - url: url_, - headers: { - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processTree(_response), - ); - }); - } - - protected processTree(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - if (Array.isArray(resultData200)) { - result200 = [] as any; - for (let item of resultData200) result200!.push(TreeOutput.fromJS(item)); - } else { - result200 = null; - } - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 创建组织机构 - * @param body (optional) - * @return Success - */ - create( - body: CreateOrganizationUnitInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/create'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processCreate(_response), - ); - }); - } - - protected processCreate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 删除组织机构 - * @param body (optional) - * @return Success - */ - delete(body: IdInput | undefined, cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/delete'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processDelete(_response), - ); - }); - } - - protected processDelete(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 编辑组织机构 - * @param body (optional) - * @return Success - */ - update( - body: UpdateOrganizationUnitInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/update'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdate(_response), - ); - }); - } - - protected processUpdate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 向组织机构添加角色 - * @param body (optional) - * @return Success - */ - addRoleToOrganizationUnit( - body: AddRoleToOrganizationUnitInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/addRoleToOrganizationUnitAsync'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processAddRoleToOrganizationUnit(_response), - ); - }); - } - - protected processAddRoleToOrganizationUnit(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 向组织机构删除角色 - * @param body (optional) - * @return Success - */ - removeRoleFromOrganizationUnit( - body: RemoveRoleToOrganizationUnitInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/removeRoleFromOrganizationUnitAsync'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processRemoveRoleFromOrganizationUnit(_response), - ); - }); - } - - protected processRemoveRoleFromOrganizationUnit(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 向组织机构添加用户 - * @param body (optional) - * @return Success - */ - addUserToOrganizationUnit( - body: AddUserToOrganizationUnitInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/addUserToOrganizationUnit'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processAddUserToOrganizationUnit(_response), - ); - }); - } - - protected processAddUserToOrganizationUnit(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 向组织机构删除用户 - * @param body (optional) - * @return Success - */ - removeUserFromOrganizationUnit( - body: RemoveUserToOrganizationUnitInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/removeUserFromOrganizationUnit'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processRemoveUserFromOrganizationUnit(_response), - ); - }); - } - - protected processRemoveUserFromOrganizationUnit(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 分页获取组织机构下用户 - * @param body (optional) - * @return Success - */ - getUsers( - body: GetOrganizationUnitUserInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/getUsers'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processGetUsers(_response), - ); - }); - } - - protected processGetUsers( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = GetOrganizationUnitUserOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 分页获取组织机构下角色 - * @param body (optional) - * @return Success - */ - getRoles( - body: GetOrganizationUnitRoleInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/getRoles'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processGetRoles(_response), - ); - }); - } - - protected processGetRoles( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = GetOrganizationUnitRoleOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 获取不在组织机构的用户 - * @param body (optional) - * @return Success - */ - getUnAddUsers( - body: GetUnAddUserInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/getUnAddUsers'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processGetUnAddUsers(_response), - ); - }); - } - - protected processGetUnAddUsers( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = GetUnAddUserOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 获取不在组织机构的角色 - * @param body (optional) - * @return Success - */ - getUnAddRoles( - body: GetUnAddRoleInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/OrganizationUnits/getUnAddRoles'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processGetUnAddRoles(_response), - ); - }); - } - - protected processGetUnAddRoles( - response: AxiosResponse, - ): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = GetUnAddRoleOutputPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 获取组织机构树 + * @return Success + */ + tree( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/tree"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "POST", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processTree(_response)); + }); + } + + protected processTree(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + if (Array.isArray(resultData200)) { + result200 = [] as any; + for (let item of resultData200) + result200!.push(TreeOutput.fromJS(item)); + } + else { + result200 = null; + } + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建组织机构 + * @param body (optional) + * @return Success + */ + create(body: CreateOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除组织机构 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/delete"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + }); + } + + protected processDelete(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 编辑组织机构 + * @param body (optional) + * @return Success + */ + update(body: UpdateOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 向组织机构添加角色 + * @param body (optional) + * @return Success + */ + addRoleToOrganizationUnit(body: AddRoleToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/addRoleToOrganizationUnitAsync"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAddRoleToOrganizationUnit(_response)); + }); + } + + protected processAddRoleToOrganizationUnit(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 向组织机构删除角色 + * @param body (optional) + * @return Success + */ + removeRoleFromOrganizationUnit(body: RemoveRoleToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/removeRoleFromOrganizationUnitAsync"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRemoveRoleFromOrganizationUnit(_response)); + }); + } + + protected processRemoveRoleFromOrganizationUnit(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 向组织机构添加用户 + * @param body (optional) + * @return Success + */ + addUserToOrganizationUnit(body: AddUserToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/addUserToOrganizationUnit"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAddUserToOrganizationUnit(_response)); + }); + } + + protected processAddUserToOrganizationUnit(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 向组织机构删除用户 + * @param body (optional) + * @return Success + */ + removeUserFromOrganizationUnit(body: RemoveUserToOrganizationUnitInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/removeUserFromOrganizationUnit"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRemoveUserFromOrganizationUnit(_response)); + }); + } + + protected processRemoveUserFromOrganizationUnit(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页获取组织机构下用户 + * @param body (optional) + * @return Success + */ + getUsers(body: GetOrganizationUnitUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getUsers"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetUsers(_response)); + }); + } + + protected processGetUsers(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = GetOrganizationUnitUserOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页获取组织机构下角色 + * @param body (optional) + * @return Success + */ + getRoles(body: GetOrganizationUnitRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getRoles"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetRoles(_response)); + }); + } + + protected processGetRoles(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = GetOrganizationUnitRoleOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 获取不在组织机构的用户 + * @param body (optional) + * @return Success + */ + getUnAddUsers(body: GetUnAddUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getUnAddUsers"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetUnAddUsers(_response)); + }); + } + + protected processGetUnAddUsers(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = GetUnAddUserOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 获取不在组织机构的角色 + * @param body (optional) + * @return Success + */ + getUnAddRoles(body: GetUnAddRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/OrganizationUnits/getUnAddRoles"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetUnAddRoles(_response)); + }); + } + + protected processGetUnAddRoles(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = GetUnAddRoleOutputPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class PermissionsServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 获取角色权限 - * @param body (optional) - * @return Success - */ - tree( - body: GetPermissionInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Permissions/tree'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processTree(_response), - ); - }); - } - - protected processTree(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = PermissionOutput.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 更新角色 - * @param body (optional) - * @return Success - */ - update( - body: UpdateRolePermissionsInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Permissions/update'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdate(_response), - ); - }); - } - - protected processUpdate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 获取角色权限 + * @param body (optional) + * @return Success + */ + tree(body: GetPermissionInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Permissions/tree"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processTree(_response)); + }); + } + + protected processTree(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = PermissionOutput.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 更新角色 + * @param body (optional) + * @return Success + */ + update(body: UpdateRolePermissionsInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Permissions/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class RolesServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 获取所有角色 - * @return Success - */ - all(cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/Roles/all'; - url_ = url_.replace(/[?&]$/, ''); - - let options_ = { - method: 'POST', - url: url_, - headers: { - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processAll(_response), - ); - }); - } - - protected processAll(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 分页获取角色 - * @param body (optional) - * @return Success - */ - page( - body: PagingRoleListInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Roles/page'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processPage(_response), - ); - }); - } - - protected processPage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDtoPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 创建角色 - * @param body (optional) - * @return Success - */ - create( - body: IdentityRoleCreateDto | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Roles/create'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processCreate(_response), - ); - }); - } - - protected processCreate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 更新角色 - * @param body (optional) - * @return Success - */ - update( - body: UpdateRoleInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Roles/update'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdate(_response), - ); - }); - } - - protected processUpdate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 删除角色 - * @param body (optional) - * @return Success - */ - delete(body: IdInput | undefined, cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/Roles/delete'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processDelete(_response), - ); - }); - } - - protected processDelete(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 获取所有角色 + * @return Success + */ + all( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/all"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "POST", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAll(_response)); + }); + } + + protected processAll(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页获取角色 + * @param body (optional) + * @return Success + */ + page(body: PagingRoleListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityRoleDtoPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建角色 + * @param body (optional) + * @return Success + */ + create(body: IdentityRoleCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityRoleDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 更新角色 + * @param body (optional) + * @return Success + */ + update(body: UpdateRoleInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityRoleDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除角色 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Roles/delete"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + }); + } + + protected processDelete(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class SettingsServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 获取所有Setting - * @return Success - */ - all(cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/Settings/all'; - url_ = url_.replace(/[?&]$/, ''); - - let options_ = { - method: 'POST', - url: url_, - headers: { - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processAll(_response), - ); - }); - } - - protected processAll(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - if (Array.isArray(resultData200)) { - result200 = [] as any; - for (let item of resultData200) result200!.push(SettingOutput.fromJS(item)); - } else { - result200 = null; - } - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 更新Setting - * @param body (optional) - * @return Success - */ - update( - body: UpdateSettingInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Settings/update'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdate(_response), - ); - }); - } - - protected processUpdate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 获取所有Setting + * @return Success + */ + all( cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Settings/all"; + url_ = url_.replace(/[?&]$/, ""); + + let options_ = { + method: "POST", + url: url_, + headers: { + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processAll(_response)); + }); + } + + protected processAll(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + if (Array.isArray(resultData200)) { + result200 = [] as any; + for (let item of resultData200) + result200!.push(SettingOutput.fromJS(item)); + } + else { + result200 = null; + } + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 更新Setting + * @param body (optional) + * @return Success + */ + update(body: UpdateSettingInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Settings/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class TenantsServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 通过名称获取租户信息 - * @param body (optional) - * @return Success - */ - find( - body: FindTenantByNameInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Tenants/find'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processFind(_response), - ); - }); - } - - protected processFind(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = FindTenantResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 分页获取租户信息 - * @param body (optional) - * @return Success - */ - page( - body: PagingTenantInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Tenants/page'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processPage(_response), - ); - }); - } - - protected processPage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = TenantDtoPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 创建租户 - * @param body (optional) - * @return Success - */ - create( - body: TenantCreateDto | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Tenants/create'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processCreate(_response), - ); - }); - } - - protected processCreate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = TenantDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 更新租户 - * @param body (optional) - * @return Success - */ - update( - body: UpdateTenantInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Tenants/update'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdate(_response), - ); - }); - } - - protected processUpdate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = TenantDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 删除租户 - * @param body (optional) - * @return Success - */ - delete(body: IdInput | undefined, cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/Tenants/delete'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processDelete(_response), - ); - }); - } - - protected processDelete(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 获取租户连接字符串 - * @param body (optional) - * @return Success - */ - getConnectionString( - body: IdInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Tenants/getConnectionString'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processGetConnectionString(_response), - ); - }); - } - - protected processGetConnectionString(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = resultData200 !== undefined ? resultData200 : null; - - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 更新租户连接字符串 - * @param body (optional) - * @return Success - */ - updateConnectionString( - body: UpdateConnectionStringInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Tenants/updateConnectionString'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdateConnectionString(_response), - ); - }); - } - - protected processUpdateConnectionString(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 删除租户连接字符串 - * @param body (optional) - * @return Success - */ - deleteConnectionString( - body: IdInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Tenants/deleteConnectionString'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processDeleteConnectionString(_response), - ); - }); - } - - protected processDeleteConnectionString(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 通过名称获取租户信息 + * @param body (optional) + * @return Success + */ + find(body: FindTenantByNameInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/find"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processFind(_response)); + }); + } + + protected processFind(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = FindTenantResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 分页获取租户信息 + * @param body (optional) + * @return Success + */ + page(body: PagingTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = TenantDtoPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建租户 + * @param body (optional) + * @return Success + */ + create(body: TenantCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = TenantDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 更新租户 + * @param body (optional) + * @return Success + */ + update(body: UpdateTenantInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = TenantDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除租户 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/delete"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + }); + } + + protected processDelete(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 获取租户连接字符串 + * @param body (optional) + * @return Success + */ + getConnectionString(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/getConnectionString"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processGetConnectionString(_response)); + }); + } + + protected processGetConnectionString(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = resultData200 !== undefined ? resultData200 : null; + + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 更新租户连接字符串 + * @param body (optional) + * @return Success + */ + updateConnectionString(body: UpdateConnectionStringInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/updateConnectionString"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdateConnectionString(_response)); + }); + } + + protected processUpdateConnectionString(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除租户连接字符串 + * @param body (optional) + * @return Success + */ + deleteConnectionString(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Tenants/deleteConnectionString"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDeleteConnectionString(_response)); + }); + } + + protected processDeleteConnectionString(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class UsersServiceProxy extends ServiceProxyBase { - private instance: AxiosInstance; - private baseUrl: string; - protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; - - constructor(baseUrl?: string, instance?: AxiosInstance) { - super(); - this.instance = instance ? instance : axios.create(); - this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ''; - } - - /** - * 分页获取用户信息 - * @param body (optional) - * @return Success - */ - page( - body: PagingUserListInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Users/page'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processPage(_response), - ); - }); - } - - protected processPage(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityUserDtoPagedResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 导出用户列表 - * @param body (optional) - * @return Success - */ - export( - body: PagingUserListInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Users/export'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - responseType: 'blob', - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processExport(_response), - ); - }); - } - - protected processExport(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200 || status === 206) { - const contentDisposition = response.headers - ? response.headers['content-disposition'] - : undefined; - let fileNameMatch = contentDisposition - ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) - : undefined; - let fileName = - fileNameMatch && fileNameMatch.length > 1 - ? fileNameMatch[3] || fileNameMatch[2] - : undefined; - if (fileName) { - fileName = decodeURIComponent(fileName); - } else { - fileNameMatch = contentDisposition - ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) - : undefined; - fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined; - } - return Promise.resolve({ - fileName: fileName, - status: status, - data: new Blob([response.data], { type: response.headers['content-type'] }), - headers: _headers, - }); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 创建用户 - * @param body (optional) - * @return Success - */ - create( - body: IdentityUserCreateDto | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Users/create'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processCreate(_response), - ); - }); - } - - protected processCreate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityUserDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 编辑用户 - * @param body (optional) - * @return Success - */ - update( - body: UpdateUserInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Users/update'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processUpdate(_response), - ); - }); - } - - protected processUpdate(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityUserDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 删除用户 - * @param body (optional) - * @return Success - */ - delete(body: IdInput | undefined, cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/Users/delete'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processDelete(_response), - ); - }); - } - - protected processDelete(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 获取用户角色信息 - * @param body (optional) - * @return Success - */ - role( - body: IdInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Users/role'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processRole(_response), - ); - }); - } - - protected processRole(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 修改当前用户密码 - * @param body (optional) - * @return Success - */ - changePassword( - body: ChangePasswordInput | undefined, - cancelToken?: CancelToken | undefined, - ): Promise { - let url_ = this.baseUrl + '/Users/changePassword'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - Accept: 'text/plain', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processChangePassword(_response), - ); - }); - } - - protected processChangePassword(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - let result200: any = null; - let resultData200 = _responseText; - result200 = resultData200 !== undefined ? resultData200 : null; - - return Promise.resolve(result200); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } - - /** - * 锁定用户 - * @param body (optional) - * @return Success - */ - lock(body: LockUserInput | undefined, cancelToken?: CancelToken | undefined): Promise { - let url_ = this.baseUrl + '/Users/lock'; - url_ = url_.replace(/[?&]$/, ''); - - const content_ = JSON.stringify(body); - - let options_ = { - data: content_, - method: 'POST', - url: url_, - headers: { - 'Content-Type': 'application/json', - }, - cancelToken, - }; - - return this.transformOptions(options_) - .then((transformedOptions_) => { - return this.instance.request(transformedOptions_); - }) - .catch((_error: any) => { - if (isAxiosError(_error) && _error.response) { - return _error.response; - } else { - throw _error; - } - }) - .then((_response: AxiosResponse) => { - return this.transformResult(url_, _response, (_response: AxiosResponse) => - this.processLock(_response), - ); - }); - } - - protected processLock(response: AxiosResponse): Promise { - const status = response.status; - let _headers: any = {}; - if (response.headers && typeof response.headers === 'object') { - for (let k in response.headers) { - if (response.headers.hasOwnProperty(k)) { - _headers[k] = response.headers[k]; - } - } - } - if (status === 200) { - const _responseText = response.data; - return Promise.resolve(null as any); - } else if (status === 403) { - const _responseText = response.data; - let result403: any = null; - let resultData403 = _responseText; - result403 = RemoteServiceErrorResponse.fromJS(resultData403); - return throwException('Forbidden', status, _responseText, _headers, result403); - } else if (status === 401) { - const _responseText = response.data; - let result401: any = null; - let resultData401 = _responseText; - result401 = RemoteServiceErrorResponse.fromJS(resultData401); - return throwException('Unauthorized', status, _responseText, _headers, result401); - } else if (status === 400) { - const _responseText = response.data; - let result400: any = null; - let resultData400 = _responseText; - result400 = RemoteServiceErrorResponse.fromJS(resultData400); - return throwException('Bad Request', status, _responseText, _headers, result400); - } else if (status === 404) { - const _responseText = response.data; - let result404: any = null; - let resultData404 = _responseText; - result404 = RemoteServiceErrorResponse.fromJS(resultData404); - return throwException('Not Found', status, _responseText, _headers, result404); - } else if (status === 501) { - const _responseText = response.data; - let result501: any = null; - let resultData501 = _responseText; - result501 = RemoteServiceErrorResponse.fromJS(resultData501); - return throwException('Server Error', status, _responseText, _headers, result501); - } else if (status === 500) { - const _responseText = response.data; - let result500: any = null; - let resultData500 = _responseText; - result500 = RemoteServiceErrorResponse.fromJS(resultData500); - return throwException('Server Error', status, _responseText, _headers, result500); - } else if (status !== 200 && status !== 204) { - const _responseText = response.data; - return throwException( - 'An unexpected server error occurred.', - status, - _responseText, - _headers, - ); - } - return Promise.resolve(null as any); - } + private instance: AxiosInstance; + private baseUrl: string; + protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined; + + constructor(baseUrl?: string, instance?: AxiosInstance) { + super(); + this.instance = instance ? instance : axios.create(); + this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : ""; + } + + /** + * 分页获取用户信息 + * @param body (optional) + * @return Success + */ + page(body: PagingUserListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/page"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processPage(_response)); + }); + } + + protected processPage(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityUserDtoPagedResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 导出用户列表 + * @param body (optional) + * @return Success + */ + export(body: PagingUserListInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/export"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + responseType: "blob", + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processExport(_response)); + }); + } + + protected processExport(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200 || status === 206) { + const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined; + let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined; + let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined; + if (fileName) { + fileName = decodeURIComponent(fileName); + } else { + fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined; + fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined; + } + return Promise.resolve({ fileName: fileName, status: status, data: new Blob([response.data], { type: response.headers["content-type"] }), headers: _headers }); + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 创建用户 + * @param body (optional) + * @return Success + */ + create(body: IdentityUserCreateDto | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/create"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processCreate(_response)); + }); + } + + protected processCreate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityUserDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 编辑用户 + * @param body (optional) + * @return Success + */ + update(body: UpdateUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/update"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processUpdate(_response)); + }); + } + + protected processUpdate(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityUserDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 删除用户 + * @param body (optional) + * @return Success + */ + delete(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/delete"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processDelete(_response)); + }); + } + + protected processDelete(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 获取用户角色信息 + * @param body (optional) + * @return Success + */ + role(body: IdInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/role"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processRole(_response)); + }); + } + + protected processRole(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = IdentityRoleDtoListResultDto.fromJS(resultData200); + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 修改当前用户密码 + * @param body (optional) + * @return Success + */ + changePassword(body: ChangePasswordInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/changePassword"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + "Accept": "text/plain" + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processChangePassword(_response)); + }); + } + + protected processChangePassword(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + let result200: any = null; + let resultData200 = _responseText; + result200 = resultData200 !== undefined ? resultData200 : null; + + return Promise.resolve(result200); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } + + /** + * 锁定用户 + * @param body (optional) + * @return Success + */ + lock(body: LockUserInput | undefined , cancelToken?: CancelToken | undefined): Promise { + let url_ = this.baseUrl + "/Users/lock"; + url_ = url_.replace(/[?&]$/, ""); + + const content_ = JSON.stringify(body); + + let options_ = { + data: content_, + method: "POST", + url: url_, + headers: { + "Content-Type": "application/json", + }, + cancelToken + }; + + return this.transformOptions(options_).then(transformedOptions_ => { + return this.instance.request(transformedOptions_); + }).catch((_error: any) => { + if (isAxiosError(_error) && _error.response) { + return _error.response; + } else { + throw _error; + } + }).then((_response: AxiosResponse) => { + return this.transformResult(url_, _response, (_response: AxiosResponse) => this.processLock(_response)); + }); + } + + protected processLock(response: AxiosResponse): Promise { + const status = response.status; + let _headers: any = {}; + if (response.headers && typeof response.headers === "object") { + for (let k in response.headers) { + if (response.headers.hasOwnProperty(k)) { + _headers[k] = response.headers[k]; + } + } + } + if (status === 200) { + const _responseText = response.data; + return Promise.resolve(null as any); + + } else if (status === 403) { + const _responseText = response.data; + let result403: any = null; + let resultData403 = _responseText; + result403 = RemoteServiceErrorResponse.fromJS(resultData403); + return throwException("Forbidden", status, _responseText, _headers, result403); + + } else if (status === 401) { + const _responseText = response.data; + let result401: any = null; + let resultData401 = _responseText; + result401 = RemoteServiceErrorResponse.fromJS(resultData401); + return throwException("Unauthorized", status, _responseText, _headers, result401); + + } else if (status === 400) { + const _responseText = response.data; + let result400: any = null; + let resultData400 = _responseText; + result400 = RemoteServiceErrorResponse.fromJS(resultData400); + return throwException("Bad Request", status, _responseText, _headers, result400); + + } else if (status === 404) { + const _responseText = response.data; + let result404: any = null; + let resultData404 = _responseText; + result404 = RemoteServiceErrorResponse.fromJS(resultData404); + return throwException("Not Found", status, _responseText, _headers, result404); + + } else if (status === 501) { + const _responseText = response.data; + let result501: any = null; + let resultData501 = _responseText; + result501 = RemoteServiceErrorResponse.fromJS(resultData501); + return throwException("Server Error", status, _responseText, _headers, result501); + + } else if (status === 500) { + const _responseText = response.data; + let result500: any = null; + let resultData500 = _responseText; + result500 = RemoteServiceErrorResponse.fromJS(resultData500); + return throwException("Server Error", status, _responseText, _headers, result500); + + } else if (status !== 200 && status !== 204) { + const _responseText = response.data; + return throwException("An unexpected server error occurred.", status, _responseText, _headers); + } + return Promise.resolve(null as any); + } } export class AbpLoginResult implements IAbpLoginResult { - result!: LoginResultType; - readonly description!: string | undefined; + result!: LoginResultType; + readonly description!: string | undefined; - constructor(data?: IAbpLoginResult) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IAbpLoginResult) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.result = _data['result']; - (this).description = _data['description']; + init(_data?: any) { + if (_data) { + this.result = _data["result"]; + (this).description = _data["description"]; + } } - } - static fromJS(data: any): AbpLoginResult { - data = typeof data === 'object' ? data : {}; - let result = new AbpLoginResult(); - result.init(data); - return result; - } + static fromJS(data: any): AbpLoginResult { + data = typeof data === 'object' ? data : {}; + let result = new AbpLoginResult(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['result'] = this.result; - data['description'] = this.description; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["result"] = this.result; + data["description"] = this.description; + return data; + } } export interface IAbpLoginResult { - result: LoginResultType; - description: string | undefined; + result: LoginResultType; + description: string | undefined; } export class ActionApiDescriptionModel implements IActionApiDescriptionModel { - uniqueName!: string | undefined; - name!: string | undefined; - httpMethod!: string | undefined; - url!: string | undefined; - supportedVersions!: string[] | undefined; - parametersOnMethod!: MethodParameterApiDescriptionModel[] | undefined; - parameters!: ParameterApiDescriptionModel[] | undefined; - returnValue!: ReturnValueApiDescriptionModel; - allowAnonymous!: boolean | undefined; - implementFrom!: string | undefined; - - constructor(data?: IActionApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.uniqueName = _data['uniqueName']; - this.name = _data['name']; - this.httpMethod = _data['httpMethod']; - this.url = _data['url']; - if (Array.isArray(_data['supportedVersions'])) { - this.supportedVersions = [] as any; - for (let item of _data['supportedVersions']) this.supportedVersions!.push(item); - } - if (Array.isArray(_data['parametersOnMethod'])) { - this.parametersOnMethod = [] as any; - for (let item of _data['parametersOnMethod']) - this.parametersOnMethod!.push(MethodParameterApiDescriptionModel.fromJS(item)); - } - if (Array.isArray(_data['parameters'])) { - this.parameters = [] as any; - for (let item of _data['parameters']) - this.parameters!.push(ParameterApiDescriptionModel.fromJS(item)); - } - this.returnValue = _data['returnValue'] - ? ReturnValueApiDescriptionModel.fromJS(_data['returnValue']) - : undefined; - this.allowAnonymous = _data['allowAnonymous']; - this.implementFrom = _data['implementFrom']; - } - } - - static fromJS(data: any): ActionApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ActionApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['uniqueName'] = this.uniqueName; - data['name'] = this.name; - data['httpMethod'] = this.httpMethod; - data['url'] = this.url; - if (Array.isArray(this.supportedVersions)) { - data['supportedVersions'] = []; - for (let item of this.supportedVersions) data['supportedVersions'].push(item); - } - if (Array.isArray(this.parametersOnMethod)) { - data['parametersOnMethod'] = []; - for (let item of this.parametersOnMethod) data['parametersOnMethod'].push(item.toJSON()); - } - if (Array.isArray(this.parameters)) { - data['parameters'] = []; - for (let item of this.parameters) data['parameters'].push(item.toJSON()); - } - data['returnValue'] = this.returnValue ? this.returnValue.toJSON() : undefined; - data['allowAnonymous'] = this.allowAnonymous; - data['implementFrom'] = this.implementFrom; - return data; - } + uniqueName!: string | undefined; + name!: string | undefined; + httpMethod!: string | undefined; + url!: string | undefined; + supportedVersions!: string[] | undefined; + parametersOnMethod!: MethodParameterApiDescriptionModel[] | undefined; + parameters!: ParameterApiDescriptionModel[] | undefined; + returnValue!: ReturnValueApiDescriptionModel; + allowAnonymous!: boolean | undefined; + implementFrom!: string | undefined; + + constructor(data?: IActionApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.uniqueName = _data["uniqueName"]; + this.name = _data["name"]; + this.httpMethod = _data["httpMethod"]; + this.url = _data["url"]; + if (Array.isArray(_data["supportedVersions"])) { + this.supportedVersions = [] as any; + for (let item of _data["supportedVersions"]) + this.supportedVersions!.push(item); + } + if (Array.isArray(_data["parametersOnMethod"])) { + this.parametersOnMethod = [] as any; + for (let item of _data["parametersOnMethod"]) + this.parametersOnMethod!.push(MethodParameterApiDescriptionModel.fromJS(item)); + } + if (Array.isArray(_data["parameters"])) { + this.parameters = [] as any; + for (let item of _data["parameters"]) + this.parameters!.push(ParameterApiDescriptionModel.fromJS(item)); + } + this.returnValue = _data["returnValue"] ? ReturnValueApiDescriptionModel.fromJS(_data["returnValue"]) : undefined; + this.allowAnonymous = _data["allowAnonymous"]; + this.implementFrom = _data["implementFrom"]; + } + } + + static fromJS(data: any): ActionApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ActionApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["uniqueName"] = this.uniqueName; + data["name"] = this.name; + data["httpMethod"] = this.httpMethod; + data["url"] = this.url; + if (Array.isArray(this.supportedVersions)) { + data["supportedVersions"] = []; + for (let item of this.supportedVersions) + data["supportedVersions"].push(item); + } + if (Array.isArray(this.parametersOnMethod)) { + data["parametersOnMethod"] = []; + for (let item of this.parametersOnMethod) + data["parametersOnMethod"].push(item.toJSON()); + } + if (Array.isArray(this.parameters)) { + data["parameters"] = []; + for (let item of this.parameters) + data["parameters"].push(item.toJSON()); + } + data["returnValue"] = this.returnValue ? this.returnValue.toJSON() : undefined; + data["allowAnonymous"] = this.allowAnonymous; + data["implementFrom"] = this.implementFrom; + return data; + } } export interface IActionApiDescriptionModel { - uniqueName: string | undefined; - name: string | undefined; - httpMethod: string | undefined; - url: string | undefined; - supportedVersions: string[] | undefined; - parametersOnMethod: MethodParameterApiDescriptionModel[] | undefined; - parameters: ParameterApiDescriptionModel[] | undefined; - returnValue: ReturnValueApiDescriptionModel; - allowAnonymous: boolean | undefined; - implementFrom: string | undefined; + uniqueName: string | undefined; + name: string | undefined; + httpMethod: string | undefined; + url: string | undefined; + supportedVersions: string[] | undefined; + parametersOnMethod: MethodParameterApiDescriptionModel[] | undefined; + parameters: ParameterApiDescriptionModel[] | undefined; + returnValue: ReturnValueApiDescriptionModel; + allowAnonymous: boolean | undefined; + implementFrom: string | undefined; } export class AddRoleToOrganizationUnitInput implements IAddRoleToOrganizationUnitInput { - roleId!: string[] | undefined; - organizationUnitId!: string; + roleId!: string[] | undefined; + organizationUnitId!: string; - constructor(data?: IAddRoleToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IAddRoleToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['roleId'])) { - this.roleId = [] as any; - for (let item of _data['roleId']) this.roleId!.push(item); - } - this.organizationUnitId = _data['organizationUnitId']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["roleId"])) { + this.roleId = [] as any; + for (let item of _data["roleId"]) + this.roleId!.push(item); + } + this.organizationUnitId = _data["organizationUnitId"]; + } } - } - static fromJS(data: any): AddRoleToOrganizationUnitInput { - data = typeof data === 'object' ? data : {}; - let result = new AddRoleToOrganizationUnitInput(); - result.init(data); - return result; - } + static fromJS(data: any): AddRoleToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new AddRoleToOrganizationUnitInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.roleId)) { - data['roleId'] = []; - for (let item of this.roleId) data['roleId'].push(item); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.roleId)) { + data["roleId"] = []; + for (let item of this.roleId) + data["roleId"].push(item); + } + data["organizationUnitId"] = this.organizationUnitId; + return data; } - data['organizationUnitId'] = this.organizationUnitId; - return data; - } } export interface IAddRoleToOrganizationUnitInput { - roleId: string[] | undefined; - organizationUnitId: string; + roleId: string[] | undefined; + organizationUnitId: string; } export class AddUserToOrganizationUnitInput implements IAddUserToOrganizationUnitInput { - userId!: string[] | undefined; - organizationUnitId!: string; + userId!: string[] | undefined; + organizationUnitId!: string; - constructor(data?: IAddUserToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IAddUserToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['userId'])) { - this.userId = [] as any; - for (let item of _data['userId']) this.userId!.push(item); - } - this.organizationUnitId = _data['organizationUnitId']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["userId"])) { + this.userId = [] as any; + for (let item of _data["userId"]) + this.userId!.push(item); + } + this.organizationUnitId = _data["organizationUnitId"]; + } } - } - static fromJS(data: any): AddUserToOrganizationUnitInput { - data = typeof data === 'object' ? data : {}; - let result = new AddUserToOrganizationUnitInput(); - result.init(data); - return result; - } + static fromJS(data: any): AddUserToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new AddUserToOrganizationUnitInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.userId)) { - data['userId'] = []; - for (let item of this.userId) data['userId'].push(item); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.userId)) { + data["userId"] = []; + for (let item of this.userId) + data["userId"].push(item); + } + data["organizationUnitId"] = this.organizationUnitId; + return data; } - data['organizationUnitId'] = this.organizationUnitId; - return data; - } } export interface IAddUserToOrganizationUnitInput { - userId: string[] | undefined; - organizationUnitId: string; + userId: string[] | undefined; + organizationUnitId: string; } export class AggregateRouteConfig implements IAggregateRouteConfig { - routeKey!: string | undefined; - parameter!: string | undefined; - jsonPath!: string | undefined; - - constructor(data?: IAggregateRouteConfig) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.routeKey = _data['routeKey']; - this.parameter = _data['parameter']; - this.jsonPath = _data['jsonPath']; - } - } - - static fromJS(data: any): AggregateRouteConfig { - data = typeof data === 'object' ? data : {}; - let result = new AggregateRouteConfig(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['routeKey'] = this.routeKey; - data['parameter'] = this.parameter; - data['jsonPath'] = this.jsonPath; - return data; - } + routeKey!: string | undefined; + parameter!: string | undefined; + jsonPath!: string | undefined; + + constructor(data?: IAggregateRouteConfig) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.routeKey = _data["routeKey"]; + this.parameter = _data["parameter"]; + this.jsonPath = _data["jsonPath"]; + } + } + + static fromJS(data: any): AggregateRouteConfig { + data = typeof data === 'object' ? data : {}; + let result = new AggregateRouteConfig(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["routeKey"] = this.routeKey; + data["parameter"] = this.parameter; + data["jsonPath"] = this.jsonPath; + return data; + } } export interface IAggregateRouteConfig { - routeKey: string | undefined; - parameter: string | undefined; - jsonPath: string | undefined; + routeKey: string | undefined; + parameter: string | undefined; + jsonPath: string | undefined; } export class ApplicationApiDescriptionModel implements IApplicationApiDescriptionModel { - modules!: { [key: string]: ModuleApiDescriptionModel } | undefined; - types!: { [key: string]: TypeApiDescriptionModel } | undefined; - - constructor(data?: IApplicationApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['modules']) { - this.modules = {} as any; - for (let key in _data['modules']) { - if (_data['modules'].hasOwnProperty(key)) - (this.modules)![key] = _data['modules'][key] - ? ModuleApiDescriptionModel.fromJS(_data['modules'][key]) - : new ModuleApiDescriptionModel(); - } - } - if (_data['types']) { - this.types = {} as any; - for (let key in _data['types']) { - if (_data['types'].hasOwnProperty(key)) - (this.types)![key] = _data['types'][key] - ? TypeApiDescriptionModel.fromJS(_data['types'][key]) - : new TypeApiDescriptionModel(); - } - } - } - } - - static fromJS(data: any): ApplicationApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.modules) { - data['modules'] = {}; - for (let key in this.modules) { - if (this.modules.hasOwnProperty(key)) - (data['modules'])[key] = this.modules[key] - ? this.modules[key].toJSON() - : undefined; - } - } - if (this.types) { - data['types'] = {}; - for (let key in this.types) { - if (this.types.hasOwnProperty(key)) - (data['types'])[key] = this.types[key] ? this.types[key].toJSON() : undefined; - } - } - return data; - } + modules!: { [key: string]: ModuleApiDescriptionModel; } | undefined; + types!: { [key: string]: TypeApiDescriptionModel; } | undefined; + + constructor(data?: IApplicationApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["modules"]) { + this.modules = {} as any; + for (let key in _data["modules"]) { + if (_data["modules"].hasOwnProperty(key)) + (this.modules)![key] = _data["modules"][key] ? ModuleApiDescriptionModel.fromJS(_data["modules"][key]) : new ModuleApiDescriptionModel(); + } + } + if (_data["types"]) { + this.types = {} as any; + for (let key in _data["types"]) { + if (_data["types"].hasOwnProperty(key)) + (this.types)![key] = _data["types"][key] ? TypeApiDescriptionModel.fromJS(_data["types"][key]) : new TypeApiDescriptionModel(); + } + } + } + } + + static fromJS(data: any): ApplicationApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.modules) { + data["modules"] = {}; + for (let key in this.modules) { + if (this.modules.hasOwnProperty(key)) + (data["modules"])[key] = this.modules[key] ? this.modules[key].toJSON() : undefined; + } + } + if (this.types) { + data["types"] = {}; + for (let key in this.types) { + if (this.types.hasOwnProperty(key)) + (data["types"])[key] = this.types[key] ? this.types[key].toJSON() : undefined; + } + } + return data; + } } export interface IApplicationApiDescriptionModel { - modules: { [key: string]: ModuleApiDescriptionModel } | undefined; - types: { [key: string]: TypeApiDescriptionModel } | undefined; + modules: { [key: string]: ModuleApiDescriptionModel; } | undefined; + types: { [key: string]: TypeApiDescriptionModel; } | undefined; } export class ApplicationAuthConfigurationDto implements IApplicationAuthConfigurationDto { - grantedPolicies!: { [key: string]: boolean } | undefined; + grantedPolicies!: { [key: string]: boolean; } | undefined; - constructor(data?: IApplicationAuthConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IApplicationAuthConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (_data['grantedPolicies']) { - this.grantedPolicies = {} as any; - for (let key in _data['grantedPolicies']) { - if (_data['grantedPolicies'].hasOwnProperty(key)) - (this.grantedPolicies)![key] = _data['grantedPolicies'][key]; + init(_data?: any) { + if (_data) { + if (_data["grantedPolicies"]) { + this.grantedPolicies = {} as any; + for (let key in _data["grantedPolicies"]) { + if (_data["grantedPolicies"].hasOwnProperty(key)) + (this.grantedPolicies)![key] = _data["grantedPolicies"][key]; + } + } } - } } - } - static fromJS(data: any): ApplicationAuthConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationAuthConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationAuthConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationAuthConfigurationDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.grantedPolicies) { - data['grantedPolicies'] = {}; - for (let key in this.grantedPolicies) { - if (this.grantedPolicies.hasOwnProperty(key)) - (data['grantedPolicies'])[key] = (this.grantedPolicies)[key]; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.grantedPolicies) { + data["grantedPolicies"] = {}; + for (let key in this.grantedPolicies) { + if (this.grantedPolicies.hasOwnProperty(key)) + (data["grantedPolicies"])[key] = (this.grantedPolicies)[key]; + } + } + return data; } - return data; - } } export interface IApplicationAuthConfigurationDto { - grantedPolicies: { [key: string]: boolean } | undefined; + grantedPolicies: { [key: string]: boolean; } | undefined; } export class ApplicationConfigurationDto implements IApplicationConfigurationDto { - localization!: ApplicationLocalizationConfigurationDto; - auth!: ApplicationAuthConfigurationDto; - setting!: ApplicationSettingConfigurationDto; - currentUser!: CurrentUserDto; - features!: ApplicationFeatureConfigurationDto; - globalFeatures!: ApplicationGlobalFeatureConfigurationDto; - multiTenancy!: MultiTenancyInfoDto; - currentTenant!: CurrentTenantDto; - timing!: TimingDto; - clock!: ClockDto; - objectExtensions!: ObjectExtensionsDto; - extraProperties!: { [key: string]: any } | undefined; - - constructor(data?: IApplicationConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.localization = _data['localization'] - ? ApplicationLocalizationConfigurationDto.fromJS(_data['localization']) - : undefined; - this.auth = _data['auth'] - ? ApplicationAuthConfigurationDto.fromJS(_data['auth']) - : undefined; - this.setting = _data['setting'] - ? ApplicationSettingConfigurationDto.fromJS(_data['setting']) - : undefined; - this.currentUser = _data['currentUser'] - ? CurrentUserDto.fromJS(_data['currentUser']) - : undefined; - this.features = _data['features'] - ? ApplicationFeatureConfigurationDto.fromJS(_data['features']) - : undefined; - this.globalFeatures = _data['globalFeatures'] - ? ApplicationGlobalFeatureConfigurationDto.fromJS(_data['globalFeatures']) - : undefined; - this.multiTenancy = _data['multiTenancy'] - ? MultiTenancyInfoDto.fromJS(_data['multiTenancy']) - : undefined; - this.currentTenant = _data['currentTenant'] - ? CurrentTenantDto.fromJS(_data['currentTenant']) - : undefined; - this.timing = _data['timing'] ? TimingDto.fromJS(_data['timing']) : undefined; - this.clock = _data['clock'] ? ClockDto.fromJS(_data['clock']) : undefined; - this.objectExtensions = _data['objectExtensions'] - ? ObjectExtensionsDto.fromJS(_data['objectExtensions']) - : undefined; - if (_data['extraProperties']) { - this.extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - (this.extraProperties)![key] = _data['extraProperties'][key]; - } - } - } - } - - static fromJS(data: any): ApplicationConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationConfigurationDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['localization'] = this.localization ? this.localization.toJSON() : undefined; - data['auth'] = this.auth ? this.auth.toJSON() : undefined; - data['setting'] = this.setting ? this.setting.toJSON() : undefined; - data['currentUser'] = this.currentUser ? this.currentUser.toJSON() : undefined; - data['features'] = this.features ? this.features.toJSON() : undefined; - data['globalFeatures'] = this.globalFeatures ? this.globalFeatures.toJSON() : undefined; - data['multiTenancy'] = this.multiTenancy ? this.multiTenancy.toJSON() : undefined; - data['currentTenant'] = this.currentTenant ? this.currentTenant.toJSON() : undefined; - data['timing'] = this.timing ? this.timing.toJSON() : undefined; - data['clock'] = this.clock ? this.clock.toJSON() : undefined; - data['objectExtensions'] = this.objectExtensions - ? this.objectExtensions.toJSON() - : undefined; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - return data; - } + localization!: ApplicationLocalizationConfigurationDto; + auth!: ApplicationAuthConfigurationDto; + setting!: ApplicationSettingConfigurationDto; + currentUser!: CurrentUserDto; + features!: ApplicationFeatureConfigurationDto; + globalFeatures!: ApplicationGlobalFeatureConfigurationDto; + multiTenancy!: MultiTenancyInfoDto; + currentTenant!: CurrentTenantDto; + timing!: TimingDto; + clock!: ClockDto; + objectExtensions!: ObjectExtensionsDto; + extraProperties!: { [key: string]: any; } | undefined; + + constructor(data?: IApplicationConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.localization = _data["localization"] ? ApplicationLocalizationConfigurationDto.fromJS(_data["localization"]) : undefined; + this.auth = _data["auth"] ? ApplicationAuthConfigurationDto.fromJS(_data["auth"]) : undefined; + this.setting = _data["setting"] ? ApplicationSettingConfigurationDto.fromJS(_data["setting"]) : undefined; + this.currentUser = _data["currentUser"] ? CurrentUserDto.fromJS(_data["currentUser"]) : undefined; + this.features = _data["features"] ? ApplicationFeatureConfigurationDto.fromJS(_data["features"]) : undefined; + this.globalFeatures = _data["globalFeatures"] ? ApplicationGlobalFeatureConfigurationDto.fromJS(_data["globalFeatures"]) : undefined; + this.multiTenancy = _data["multiTenancy"] ? MultiTenancyInfoDto.fromJS(_data["multiTenancy"]) : undefined; + this.currentTenant = _data["currentTenant"] ? CurrentTenantDto.fromJS(_data["currentTenant"]) : undefined; + this.timing = _data["timing"] ? TimingDto.fromJS(_data["timing"]) : undefined; + this.clock = _data["clock"] ? ClockDto.fromJS(_data["clock"]) : undefined; + this.objectExtensions = _data["objectExtensions"] ? ObjectExtensionsDto.fromJS(_data["objectExtensions"]) : undefined; + if (_data["extraProperties"]) { + this.extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + (this.extraProperties)![key] = _data["extraProperties"][key]; + } + } + } + } + + static fromJS(data: any): ApplicationConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationConfigurationDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["localization"] = this.localization ? this.localization.toJSON() : undefined; + data["auth"] = this.auth ? this.auth.toJSON() : undefined; + data["setting"] = this.setting ? this.setting.toJSON() : undefined; + data["currentUser"] = this.currentUser ? this.currentUser.toJSON() : undefined; + data["features"] = this.features ? this.features.toJSON() : undefined; + data["globalFeatures"] = this.globalFeatures ? this.globalFeatures.toJSON() : undefined; + data["multiTenancy"] = this.multiTenancy ? this.multiTenancy.toJSON() : undefined; + data["currentTenant"] = this.currentTenant ? this.currentTenant.toJSON() : undefined; + data["timing"] = this.timing ? this.timing.toJSON() : undefined; + data["clock"] = this.clock ? this.clock.toJSON() : undefined; + data["objectExtensions"] = this.objectExtensions ? this.objectExtensions.toJSON() : undefined; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + return data; + } } export interface IApplicationConfigurationDto { - localization: ApplicationLocalizationConfigurationDto; - auth: ApplicationAuthConfigurationDto; - setting: ApplicationSettingConfigurationDto; - currentUser: CurrentUserDto; - features: ApplicationFeatureConfigurationDto; - globalFeatures: ApplicationGlobalFeatureConfigurationDto; - multiTenancy: MultiTenancyInfoDto; - currentTenant: CurrentTenantDto; - timing: TimingDto; - clock: ClockDto; - objectExtensions: ObjectExtensionsDto; - extraProperties: { [key: string]: any } | undefined; + localization: ApplicationLocalizationConfigurationDto; + auth: ApplicationAuthConfigurationDto; + setting: ApplicationSettingConfigurationDto; + currentUser: CurrentUserDto; + features: ApplicationFeatureConfigurationDto; + globalFeatures: ApplicationGlobalFeatureConfigurationDto; + multiTenancy: MultiTenancyInfoDto; + currentTenant: CurrentTenantDto; + timing: TimingDto; + clock: ClockDto; + objectExtensions: ObjectExtensionsDto; + extraProperties: { [key: string]: any; } | undefined; } export class ApplicationFeatureConfigurationDto implements IApplicationFeatureConfigurationDto { - values!: { [key: string]: string } | undefined; + values!: { [key: string]: string; } | undefined; - constructor(data?: IApplicationFeatureConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IApplicationFeatureConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (_data['values']) { - this.values = {} as any; - for (let key in _data['values']) { - if (_data['values'].hasOwnProperty(key)) (this.values)![key] = _data['values'][key]; + init(_data?: any) { + if (_data) { + if (_data["values"]) { + this.values = {} as any; + for (let key in _data["values"]) { + if (_data["values"].hasOwnProperty(key)) + (this.values)![key] = _data["values"][key]; + } + } } - } } - } - static fromJS(data: any): ApplicationFeatureConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationFeatureConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationFeatureConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationFeatureConfigurationDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.values) { - data['values'] = {}; - for (let key in this.values) { - if (this.values.hasOwnProperty(key)) (data['values'])[key] = (this.values)[key]; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.values) { + data["values"] = {}; + for (let key in this.values) { + if (this.values.hasOwnProperty(key)) + (data["values"])[key] = (this.values)[key]; + } + } + return data; } - return data; - } } export interface IApplicationFeatureConfigurationDto { - values: { [key: string]: string } | undefined; + values: { [key: string]: string; } | undefined; } -export class ApplicationGlobalFeatureConfigurationDto - implements IApplicationGlobalFeatureConfigurationDto -{ - enabledFeatures!: string[] | undefined; +export class ApplicationGlobalFeatureConfigurationDto implements IApplicationGlobalFeatureConfigurationDto { + enabledFeatures!: string[] | undefined; - constructor(data?: IApplicationGlobalFeatureConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IApplicationGlobalFeatureConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['enabledFeatures'])) { - this.enabledFeatures = [] as any; - for (let item of _data['enabledFeatures']) this.enabledFeatures!.push(item); - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["enabledFeatures"])) { + this.enabledFeatures = [] as any; + for (let item of _data["enabledFeatures"]) + this.enabledFeatures!.push(item); + } + } } - } - static fromJS(data: any): ApplicationGlobalFeatureConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationGlobalFeatureConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationGlobalFeatureConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationGlobalFeatureConfigurationDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.enabledFeatures)) { - data['enabledFeatures'] = []; - for (let item of this.enabledFeatures) data['enabledFeatures'].push(item); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.enabledFeatures)) { + data["enabledFeatures"] = []; + for (let item of this.enabledFeatures) + data["enabledFeatures"].push(item); + } + return data; } - return data; - } } export interface IApplicationGlobalFeatureConfigurationDto { - enabledFeatures: string[] | undefined; -} - -export class ApplicationLocalizationConfigurationDto - implements IApplicationLocalizationConfigurationDto -{ - values!: { [key: string]: { [key: string]: string } } | undefined; - resources!: { [key: string]: ApplicationLocalizationResourceDto } | undefined; - languages!: LanguageInfo[] | undefined; - currentCulture!: CurrentCultureDto; - defaultResourceName!: string | undefined; - languagesMap!: { [key: string]: NameValue[] } | undefined; - languageFilesMap!: { [key: string]: NameValue[] } | undefined; - - constructor(data?: IApplicationLocalizationConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['values']) { - this.values = {} as any; - for (let key in _data['values']) { - if (_data['values'].hasOwnProperty(key)) (this.values)![key] = _data['values'][key]; - } - } - if (_data['resources']) { - this.resources = {} as any; - for (let key in _data['resources']) { - if (_data['resources'].hasOwnProperty(key)) - (this.resources)![key] = _data['resources'][key] - ? ApplicationLocalizationResourceDto.fromJS(_data['resources'][key]) - : new ApplicationLocalizationResourceDto(); - } - } - if (Array.isArray(_data['languages'])) { - this.languages = [] as any; - for (let item of _data['languages']) this.languages!.push(LanguageInfo.fromJS(item)); - } - this.currentCulture = _data['currentCulture'] - ? CurrentCultureDto.fromJS(_data['currentCulture']) - : undefined; - this.defaultResourceName = _data['defaultResourceName']; - if (_data['languagesMap']) { - this.languagesMap = {} as any; - for (let key in _data['languagesMap']) { - if (_data['languagesMap'].hasOwnProperty(key)) - (this.languagesMap)![key] = _data['languagesMap'][key] - ? _data['languagesMap'][key].map((i: any) => NameValue.fromJS(i)) - : undefined; - } - } - if (_data['languageFilesMap']) { - this.languageFilesMap = {} as any; - for (let key in _data['languageFilesMap']) { - if (_data['languageFilesMap'].hasOwnProperty(key)) - (this.languageFilesMap)![key] = _data['languageFilesMap'][key] - ? _data['languageFilesMap'][key].map((i: any) => NameValue.fromJS(i)) - : undefined; - } - } - } - } - - static fromJS(data: any): ApplicationLocalizationConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationLocalizationConfigurationDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.values) { - data['values'] = {}; - for (let key in this.values) { - if (this.values.hasOwnProperty(key)) (data['values'])[key] = (this.values)[key]; - } - } - if (this.resources) { - data['resources'] = {}; - for (let key in this.resources) { - if (this.resources.hasOwnProperty(key)) - (data['resources'])[key] = this.resources[key] - ? this.resources[key].toJSON() - : undefined; - } - } - if (Array.isArray(this.languages)) { - data['languages'] = []; - for (let item of this.languages) data['languages'].push(item.toJSON()); - } - data['currentCulture'] = this.currentCulture ? this.currentCulture.toJSON() : undefined; - data['defaultResourceName'] = this.defaultResourceName; - if (this.languagesMap) { - data['languagesMap'] = {}; - for (let key in this.languagesMap) { - if (this.languagesMap.hasOwnProperty(key)) - (data['languagesMap'])[key] = (this.languagesMap)[key]; - } - } - if (this.languageFilesMap) { - data['languageFilesMap'] = {}; - for (let key in this.languageFilesMap) { - if (this.languageFilesMap.hasOwnProperty(key)) - (data['languageFilesMap'])[key] = (this.languageFilesMap)[key]; - } - } - return data; - } + enabledFeatures: string[] | undefined; +} + +export class ApplicationLocalizationConfigurationDto implements IApplicationLocalizationConfigurationDto { + values!: { [key: string]: { [key: string]: string; }; } | undefined; + resources!: { [key: string]: ApplicationLocalizationResourceDto; } | undefined; + languages!: LanguageInfo[] | undefined; + currentCulture!: CurrentCultureDto; + defaultResourceName!: string | undefined; + languagesMap!: { [key: string]: NameValue[]; } | undefined; + languageFilesMap!: { [key: string]: NameValue[]; } | undefined; + + constructor(data?: IApplicationLocalizationConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["values"]) { + this.values = {} as any; + for (let key in _data["values"]) { + if (_data["values"].hasOwnProperty(key)) + (this.values)![key] = _data["values"][key]; + } + } + if (_data["resources"]) { + this.resources = {} as any; + for (let key in _data["resources"]) { + if (_data["resources"].hasOwnProperty(key)) + (this.resources)![key] = _data["resources"][key] ? ApplicationLocalizationResourceDto.fromJS(_data["resources"][key]) : new ApplicationLocalizationResourceDto(); + } + } + if (Array.isArray(_data["languages"])) { + this.languages = [] as any; + for (let item of _data["languages"]) + this.languages!.push(LanguageInfo.fromJS(item)); + } + this.currentCulture = _data["currentCulture"] ? CurrentCultureDto.fromJS(_data["currentCulture"]) : undefined; + this.defaultResourceName = _data["defaultResourceName"]; + if (_data["languagesMap"]) { + this.languagesMap = {} as any; + for (let key in _data["languagesMap"]) { + if (_data["languagesMap"].hasOwnProperty(key)) + (this.languagesMap)![key] = _data["languagesMap"][key] ? _data["languagesMap"][key].map((i: any) => NameValue.fromJS(i)) : undefined; + } + } + if (_data["languageFilesMap"]) { + this.languageFilesMap = {} as any; + for (let key in _data["languageFilesMap"]) { + if (_data["languageFilesMap"].hasOwnProperty(key)) + (this.languageFilesMap)![key] = _data["languageFilesMap"][key] ? _data["languageFilesMap"][key].map((i: any) => NameValue.fromJS(i)) : undefined; + } + } + } + } + + static fromJS(data: any): ApplicationLocalizationConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationLocalizationConfigurationDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.values) { + data["values"] = {}; + for (let key in this.values) { + if (this.values.hasOwnProperty(key)) + (data["values"])[key] = (this.values)[key]; + } + } + if (this.resources) { + data["resources"] = {}; + for (let key in this.resources) { + if (this.resources.hasOwnProperty(key)) + (data["resources"])[key] = this.resources[key] ? this.resources[key].toJSON() : undefined; + } + } + if (Array.isArray(this.languages)) { + data["languages"] = []; + for (let item of this.languages) + data["languages"].push(item.toJSON()); + } + data["currentCulture"] = this.currentCulture ? this.currentCulture.toJSON() : undefined; + data["defaultResourceName"] = this.defaultResourceName; + if (this.languagesMap) { + data["languagesMap"] = {}; + for (let key in this.languagesMap) { + if (this.languagesMap.hasOwnProperty(key)) + (data["languagesMap"])[key] = (this.languagesMap)[key]; + } + } + if (this.languageFilesMap) { + data["languageFilesMap"] = {}; + for (let key in this.languageFilesMap) { + if (this.languageFilesMap.hasOwnProperty(key)) + (data["languageFilesMap"])[key] = (this.languageFilesMap)[key]; + } + } + return data; + } } export interface IApplicationLocalizationConfigurationDto { - values: { [key: string]: { [key: string]: string } } | undefined; - resources: { [key: string]: ApplicationLocalizationResourceDto } | undefined; - languages: LanguageInfo[] | undefined; - currentCulture: CurrentCultureDto; - defaultResourceName: string | undefined; - languagesMap: { [key: string]: NameValue[] } | undefined; - languageFilesMap: { [key: string]: NameValue[] } | undefined; + values: { [key: string]: { [key: string]: string; }; } | undefined; + resources: { [key: string]: ApplicationLocalizationResourceDto; } | undefined; + languages: LanguageInfo[] | undefined; + currentCulture: CurrentCultureDto; + defaultResourceName: string | undefined; + languagesMap: { [key: string]: NameValue[]; } | undefined; + languageFilesMap: { [key: string]: NameValue[]; } | undefined; } export class ApplicationLocalizationDto implements IApplicationLocalizationDto { - resources!: { [key: string]: ApplicationLocalizationResourceDto } | undefined; - - constructor(data?: IApplicationLocalizationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['resources']) { - this.resources = {} as any; - for (let key in _data['resources']) { - if (_data['resources'].hasOwnProperty(key)) - (this.resources)![key] = _data['resources'][key] - ? ApplicationLocalizationResourceDto.fromJS(_data['resources'][key]) - : new ApplicationLocalizationResourceDto(); - } - } - } - } - - static fromJS(data: any): ApplicationLocalizationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationLocalizationDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.resources) { - data['resources'] = {}; - for (let key in this.resources) { - if (this.resources.hasOwnProperty(key)) - (data['resources'])[key] = this.resources[key] - ? this.resources[key].toJSON() - : undefined; - } - } - return data; - } + resources!: { [key: string]: ApplicationLocalizationResourceDto; } | undefined; + + constructor(data?: IApplicationLocalizationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["resources"]) { + this.resources = {} as any; + for (let key in _data["resources"]) { + if (_data["resources"].hasOwnProperty(key)) + (this.resources)![key] = _data["resources"][key] ? ApplicationLocalizationResourceDto.fromJS(_data["resources"][key]) : new ApplicationLocalizationResourceDto(); + } + } + } + } + + static fromJS(data: any): ApplicationLocalizationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationLocalizationDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.resources) { + data["resources"] = {}; + for (let key in this.resources) { + if (this.resources.hasOwnProperty(key)) + (data["resources"])[key] = this.resources[key] ? this.resources[key].toJSON() : undefined; + } + } + return data; + } } export interface IApplicationLocalizationDto { - resources: { [key: string]: ApplicationLocalizationResourceDto } | undefined; + resources: { [key: string]: ApplicationLocalizationResourceDto; } | undefined; } export class ApplicationLocalizationResourceDto implements IApplicationLocalizationResourceDto { - texts!: { [key: string]: string } | undefined; - baseResources!: string[] | undefined; - - constructor(data?: IApplicationLocalizationResourceDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['texts']) { - this.texts = {} as any; - for (let key in _data['texts']) { - if (_data['texts'].hasOwnProperty(key)) (this.texts)![key] = _data['texts'][key]; - } - } - if (Array.isArray(_data['baseResources'])) { - this.baseResources = [] as any; - for (let item of _data['baseResources']) this.baseResources!.push(item); - } - } - } - - static fromJS(data: any): ApplicationLocalizationResourceDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationLocalizationResourceDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.texts) { - data['texts'] = {}; - for (let key in this.texts) { - if (this.texts.hasOwnProperty(key)) (data['texts'])[key] = (this.texts)[key]; - } - } - if (Array.isArray(this.baseResources)) { - data['baseResources'] = []; - for (let item of this.baseResources) data['baseResources'].push(item); - } - return data; - } + texts!: { [key: string]: string; } | undefined; + baseResources!: string[] | undefined; + + constructor(data?: IApplicationLocalizationResourceDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["texts"]) { + this.texts = {} as any; + for (let key in _data["texts"]) { + if (_data["texts"].hasOwnProperty(key)) + (this.texts)![key] = _data["texts"][key]; + } + } + if (Array.isArray(_data["baseResources"])) { + this.baseResources = [] as any; + for (let item of _data["baseResources"]) + this.baseResources!.push(item); + } + } + } + + static fromJS(data: any): ApplicationLocalizationResourceDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationLocalizationResourceDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.texts) { + data["texts"] = {}; + for (let key in this.texts) { + if (this.texts.hasOwnProperty(key)) + (data["texts"])[key] = (this.texts)[key]; + } + } + if (Array.isArray(this.baseResources)) { + data["baseResources"] = []; + for (let item of this.baseResources) + data["baseResources"].push(item); + } + return data; + } } export interface IApplicationLocalizationResourceDto { - texts: { [key: string]: string } | undefined; - baseResources: string[] | undefined; + texts: { [key: string]: string; } | undefined; + baseResources: string[] | undefined; } export class ApplicationSettingConfigurationDto implements IApplicationSettingConfigurationDto { - values!: { [key: string]: string } | undefined; + values!: { [key: string]: string; } | undefined; - constructor(data?: IApplicationSettingConfigurationDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IApplicationSettingConfigurationDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (_data['values']) { - this.values = {} as any; - for (let key in _data['values']) { - if (_data['values'].hasOwnProperty(key)) (this.values)![key] = _data['values'][key]; + init(_data?: any) { + if (_data) { + if (_data["values"]) { + this.values = {} as any; + for (let key in _data["values"]) { + if (_data["values"].hasOwnProperty(key)) + (this.values)![key] = _data["values"][key]; + } + } } - } } - } - static fromJS(data: any): ApplicationSettingConfigurationDto { - data = typeof data === 'object' ? data : {}; - let result = new ApplicationSettingConfigurationDto(); - result.init(data); - return result; - } + static fromJS(data: any): ApplicationSettingConfigurationDto { + data = typeof data === 'object' ? data : {}; + let result = new ApplicationSettingConfigurationDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.values) { - data['values'] = {}; - for (let key in this.values) { - if (this.values.hasOwnProperty(key)) (data['values'])[key] = (this.values)[key]; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.values) { + data["values"] = {}; + for (let key in this.values) { + if (this.values.hasOwnProperty(key)) + (data["values"])[key] = (this.values)[key]; + } + } + return data; } - return data; - } } export interface IApplicationSettingConfigurationDto { - values: { [key: string]: string } | undefined; + values: { [key: string]: string; } | undefined; } export class ChangePasswordInput implements IChangePasswordInput { - currentPassword!: string | undefined; - newPassword!: string; + currentPassword!: string | undefined; + newPassword!: string; - constructor(data?: IChangePasswordInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IChangePasswordInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.currentPassword = _data['currentPassword']; - this.newPassword = _data['newPassword']; + init(_data?: any) { + if (_data) { + this.currentPassword = _data["currentPassword"]; + this.newPassword = _data["newPassword"]; + } } - } - static fromJS(data: any): ChangePasswordInput { - data = typeof data === 'object' ? data : {}; - let result = new ChangePasswordInput(); - result.init(data); - return result; - } + static fromJS(data: any): ChangePasswordInput { + data = typeof data === 'object' ? data : {}; + let result = new ChangePasswordInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['currentPassword'] = this.currentPassword; - data['newPassword'] = this.newPassword; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["currentPassword"] = this.currentPassword; + data["newPassword"] = this.newPassword; + return data; + } } export interface IChangePasswordInput { - currentPassword: string | undefined; - newPassword: string; + currentPassword: string | undefined; + newPassword: string; } export class ClockDto implements IClockDto { - kind!: string | undefined; + kind!: string | undefined; - constructor(data?: IClockDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IClockDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.kind = _data['kind']; + init(_data?: any) { + if (_data) { + this.kind = _data["kind"]; + } } - } - static fromJS(data: any): ClockDto { - data = typeof data === 'object' ? data : {}; - let result = new ClockDto(); - result.init(data); - return result; - } + static fromJS(data: any): ClockDto { + data = typeof data === 'object' ? data : {}; + let result = new ClockDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['kind'] = this.kind; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["kind"] = this.kind; + return data; + } } export interface IClockDto { - kind: string | undefined; + kind: string | undefined; } export class ControllerApiDescriptionModel implements IControllerApiDescriptionModel { - controllerName!: string | undefined; - controllerGroupName!: string | undefined; - isRemoteService!: boolean; - isIntegrationService!: boolean; - apiVersion!: string | undefined; - type!: string | undefined; - interfaces!: ControllerInterfaceApiDescriptionModel[] | undefined; - actions!: { [key: string]: ActionApiDescriptionModel } | undefined; - - constructor(data?: IControllerApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.controllerName = _data['controllerName']; - this.controllerGroupName = _data['controllerGroupName']; - this.isRemoteService = _data['isRemoteService']; - this.isIntegrationService = _data['isIntegrationService']; - this.apiVersion = _data['apiVersion']; - this.type = _data['type']; - if (Array.isArray(_data['interfaces'])) { - this.interfaces = [] as any; - for (let item of _data['interfaces']) - this.interfaces!.push(ControllerInterfaceApiDescriptionModel.fromJS(item)); - } - if (_data['actions']) { - this.actions = {} as any; - for (let key in _data['actions']) { - if (_data['actions'].hasOwnProperty(key)) - (this.actions)![key] = _data['actions'][key] - ? ActionApiDescriptionModel.fromJS(_data['actions'][key]) - : new ActionApiDescriptionModel(); - } - } - } - } - - static fromJS(data: any): ControllerApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ControllerApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['controllerName'] = this.controllerName; - data['controllerGroupName'] = this.controllerGroupName; - data['isRemoteService'] = this.isRemoteService; - data['isIntegrationService'] = this.isIntegrationService; - data['apiVersion'] = this.apiVersion; - data['type'] = this.type; - if (Array.isArray(this.interfaces)) { - data['interfaces'] = []; - for (let item of this.interfaces) data['interfaces'].push(item.toJSON()); - } - if (this.actions) { - data['actions'] = {}; - for (let key in this.actions) { - if (this.actions.hasOwnProperty(key)) - (data['actions'])[key] = this.actions[key] - ? this.actions[key].toJSON() - : undefined; - } - } - return data; - } + controllerName!: string | undefined; + controllerGroupName!: string | undefined; + isRemoteService!: boolean; + isIntegrationService!: boolean; + apiVersion!: string | undefined; + type!: string | undefined; + interfaces!: ControllerInterfaceApiDescriptionModel[] | undefined; + actions!: { [key: string]: ActionApiDescriptionModel; } | undefined; + + constructor(data?: IControllerApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.controllerName = _data["controllerName"]; + this.controllerGroupName = _data["controllerGroupName"]; + this.isRemoteService = _data["isRemoteService"]; + this.isIntegrationService = _data["isIntegrationService"]; + this.apiVersion = _data["apiVersion"]; + this.type = _data["type"]; + if (Array.isArray(_data["interfaces"])) { + this.interfaces = [] as any; + for (let item of _data["interfaces"]) + this.interfaces!.push(ControllerInterfaceApiDescriptionModel.fromJS(item)); + } + if (_data["actions"]) { + this.actions = {} as any; + for (let key in _data["actions"]) { + if (_data["actions"].hasOwnProperty(key)) + (this.actions)![key] = _data["actions"][key] ? ActionApiDescriptionModel.fromJS(_data["actions"][key]) : new ActionApiDescriptionModel(); + } + } + } + } + + static fromJS(data: any): ControllerApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ControllerApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["controllerName"] = this.controllerName; + data["controllerGroupName"] = this.controllerGroupName; + data["isRemoteService"] = this.isRemoteService; + data["isIntegrationService"] = this.isIntegrationService; + data["apiVersion"] = this.apiVersion; + data["type"] = this.type; + if (Array.isArray(this.interfaces)) { + data["interfaces"] = []; + for (let item of this.interfaces) + data["interfaces"].push(item.toJSON()); + } + if (this.actions) { + data["actions"] = {}; + for (let key in this.actions) { + if (this.actions.hasOwnProperty(key)) + (data["actions"])[key] = this.actions[key] ? this.actions[key].toJSON() : undefined; + } + } + return data; + } } export interface IControllerApiDescriptionModel { - controllerName: string | undefined; - controllerGroupName: string | undefined; - isRemoteService: boolean; - isIntegrationService: boolean; - apiVersion: string | undefined; - type: string | undefined; - interfaces: ControllerInterfaceApiDescriptionModel[] | undefined; - actions: { [key: string]: ActionApiDescriptionModel } | undefined; -} - -export class ControllerInterfaceApiDescriptionModel - implements IControllerInterfaceApiDescriptionModel -{ - type!: string | undefined; - name!: string | undefined; - methods!: InterfaceMethodApiDescriptionModel[] | undefined; - - constructor(data?: IControllerInterfaceApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.type = _data['type']; - this.name = _data['name']; - if (Array.isArray(_data['methods'])) { - this.methods = [] as any; - for (let item of _data['methods']) - this.methods!.push(InterfaceMethodApiDescriptionModel.fromJS(item)); - } - } - } - - static fromJS(data: any): ControllerInterfaceApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ControllerInterfaceApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['type'] = this.type; - data['name'] = this.name; - if (Array.isArray(this.methods)) { - data['methods'] = []; - for (let item of this.methods) data['methods'].push(item.toJSON()); - } - return data; - } + controllerName: string | undefined; + controllerGroupName: string | undefined; + isRemoteService: boolean; + isIntegrationService: boolean; + apiVersion: string | undefined; + type: string | undefined; + interfaces: ControllerInterfaceApiDescriptionModel[] | undefined; + actions: { [key: string]: ActionApiDescriptionModel; } | undefined; +} + +export class ControllerInterfaceApiDescriptionModel implements IControllerInterfaceApiDescriptionModel { + type!: string | undefined; + name!: string | undefined; + methods!: InterfaceMethodApiDescriptionModel[] | undefined; + + constructor(data?: IControllerInterfaceApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.type = _data["type"]; + this.name = _data["name"]; + if (Array.isArray(_data["methods"])) { + this.methods = [] as any; + for (let item of _data["methods"]) + this.methods!.push(InterfaceMethodApiDescriptionModel.fromJS(item)); + } + } + } + + static fromJS(data: any): ControllerInterfaceApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ControllerInterfaceApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["type"] = this.type; + data["name"] = this.name; + if (Array.isArray(this.methods)) { + data["methods"] = []; + for (let item of this.methods) + data["methods"].push(item.toJSON()); + } + return data; + } } export interface IControllerInterfaceApiDescriptionModel { - type: string | undefined; - name: string | undefined; - methods: InterfaceMethodApiDescriptionModel[] | undefined; + type: string | undefined; + name: string | undefined; + methods: InterfaceMethodApiDescriptionModel[] | undefined; } export class CreateDataDictinaryDetailInput implements ICreateDataDictinaryDetailInput { - id!: string; - code!: string; - displayText!: string; - description!: string | undefined; - order!: number; - - constructor(data?: ICreateDataDictinaryDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.code = _data['code']; - this.displayText = _data['displayText']; - this.description = _data['description']; - this.order = _data['order']; - } - } - - static fromJS(data: any): CreateDataDictinaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new CreateDataDictinaryDetailInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['code'] = this.code; - data['displayText'] = this.displayText; - data['description'] = this.description; - data['order'] = this.order; - return data; - } + id!: string; + code!: string; + displayText!: string; + description!: string | undefined; + order!: number; + + constructor(data?: ICreateDataDictinaryDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.code = _data["code"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; + this.order = _data["order"]; + } + } + + static fromJS(data: any): CreateDataDictinaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateDataDictinaryDetailInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["code"] = this.code; + data["displayText"] = this.displayText; + data["description"] = this.description; + data["order"] = this.order; + return data; + } } export interface ICreateDataDictinaryDetailInput { - id: string; - code: string; - displayText: string; - description: string | undefined; - order: number; + id: string; + code: string; + displayText: string; + description: string | undefined; + order: number; } export class CreateDataDictinaryInput implements ICreateDataDictinaryInput { - code!: string; - displayText!: string; - description!: string | undefined; - - constructor(data?: ICreateDataDictinaryInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.code = _data['code']; - this.displayText = _data['displayText']; - this.description = _data['description']; - } - } - - static fromJS(data: any): CreateDataDictinaryInput { - data = typeof data === 'object' ? data : {}; - let result = new CreateDataDictinaryInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['code'] = this.code; - data['displayText'] = this.displayText; - data['description'] = this.description; - return data; - } + code!: string; + displayText!: string; + description!: string | undefined; + + constructor(data?: ICreateDataDictinaryInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.code = _data["code"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; + } + } + + static fromJS(data: any): CreateDataDictinaryInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateDataDictinaryInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["code"] = this.code; + data["displayText"] = this.displayText; + data["description"] = this.description; + return data; + } } export interface ICreateDataDictinaryInput { - code: string; - displayText: string; - description: string | undefined; + code: string; + displayText: string; + description: string | undefined; +} + +/** 创建语言 */ +export class CreateLanguageInput implements ICreateLanguageInput { + /** 语言名称 */ + cultureName!: string; + /** Ui语言名称 */ + uiCultureName!: string; + /** 显示名称 */ + displayName!: string; + /** 图标 */ + flagIcon!: string | undefined; + /** 是否启用 */ + isEnabled!: boolean; + + constructor(data?: ICreateLanguageInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.cultureName = _data["cultureName"]; + this.uiCultureName = _data["uiCultureName"]; + this.displayName = _data["displayName"]; + this.flagIcon = _data["flagIcon"]; + this.isEnabled = _data["isEnabled"]; + } + } + + static fromJS(data: any): CreateLanguageInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateLanguageInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["cultureName"] = this.cultureName; + data["uiCultureName"] = this.uiCultureName; + data["displayName"] = this.displayName; + data["flagIcon"] = this.flagIcon; + data["isEnabled"] = this.isEnabled; + return data; + } +} + +/** 创建语言 */ +export interface ICreateLanguageInput { + /** 语言名称 */ + cultureName: string; + /** Ui语言名称 */ + uiCultureName: string; + /** 显示名称 */ + displayName: string; + /** 图标 */ + flagIcon: string | undefined; + /** 是否启用 */ + isEnabled: boolean; +} + +/** 创建语言文本 */ +export class CreateLanguageTextInput implements ICreateLanguageTextInput { + /** 资源名称 */ + resourceName!: string; + /** 语言名称 */ + cultureName!: string; + /** 名称 */ + name!: string; + /** 值 */ + value!: string; + + constructor(data?: ICreateLanguageTextInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.resourceName = _data["resourceName"]; + this.cultureName = _data["cultureName"]; + this.name = _data["name"]; + this.value = _data["value"]; + } + } + + static fromJS(data: any): CreateLanguageTextInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateLanguageTextInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["resourceName"] = this.resourceName; + data["cultureName"] = this.cultureName; + data["name"] = this.name; + data["value"] = this.value; + return data; + } +} + +/** 创建语言文本 */ +export interface ICreateLanguageTextInput { + /** 资源名称 */ + resourceName: string; + /** 语言名称 */ + cultureName: string; + /** 名称 */ + name: string; + /** 值 */ + value: string; } export class CreateOrganizationUnitInput implements ICreateOrganizationUnitInput { - displayName!: string; - parentId!: string | undefined; + displayName!: string; + parentId!: string | undefined; - constructor(data?: ICreateOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ICreateOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.displayName = _data['displayName']; - this.parentId = _data['parentId']; + init(_data?: any) { + if (_data) { + this.displayName = _data["displayName"]; + this.parentId = _data["parentId"]; + } } - } - static fromJS(data: any): CreateOrganizationUnitInput { - data = typeof data === 'object' ? data : {}; - let result = new CreateOrganizationUnitInput(); - result.init(data); - return result; - } + static fromJS(data: any): CreateOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new CreateOrganizationUnitInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['displayName'] = this.displayName; - data['parentId'] = this.parentId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["displayName"] = this.displayName; + data["parentId"] = this.parentId; + return data; + } } export interface ICreateOrganizationUnitInput { - displayName: string; - parentId: string | undefined; + displayName: string; + parentId: string | undefined; } export class CurrentCultureDto implements ICurrentCultureDto { - displayName!: string | undefined; - englishName!: string | undefined; - threeLetterIsoLanguageName!: string | undefined; - twoLetterIsoLanguageName!: string | undefined; - isRightToLeft!: boolean; - cultureName!: string | undefined; - name!: string | undefined; - nativeName!: string | undefined; - dateTimeFormat!: DateTimeFormatDto; - - constructor(data?: ICurrentCultureDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.displayName = _data['displayName']; - this.englishName = _data['englishName']; - this.threeLetterIsoLanguageName = _data['threeLetterIsoLanguageName']; - this.twoLetterIsoLanguageName = _data['twoLetterIsoLanguageName']; - this.isRightToLeft = _data['isRightToLeft']; - this.cultureName = _data['cultureName']; - this.name = _data['name']; - this.nativeName = _data['nativeName']; - this.dateTimeFormat = _data['dateTimeFormat'] - ? DateTimeFormatDto.fromJS(_data['dateTimeFormat']) - : undefined; - } - } - - static fromJS(data: any): CurrentCultureDto { - data = typeof data === 'object' ? data : {}; - let result = new CurrentCultureDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['displayName'] = this.displayName; - data['englishName'] = this.englishName; - data['threeLetterIsoLanguageName'] = this.threeLetterIsoLanguageName; - data['twoLetterIsoLanguageName'] = this.twoLetterIsoLanguageName; - data['isRightToLeft'] = this.isRightToLeft; - data['cultureName'] = this.cultureName; - data['name'] = this.name; - data['nativeName'] = this.nativeName; - data['dateTimeFormat'] = this.dateTimeFormat ? this.dateTimeFormat.toJSON() : undefined; - return data; - } + displayName!: string | undefined; + englishName!: string | undefined; + threeLetterIsoLanguageName!: string | undefined; + twoLetterIsoLanguageName!: string | undefined; + isRightToLeft!: boolean; + cultureName!: string | undefined; + name!: string | undefined; + nativeName!: string | undefined; + dateTimeFormat!: DateTimeFormatDto; + + constructor(data?: ICurrentCultureDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.displayName = _data["displayName"]; + this.englishName = _data["englishName"]; + this.threeLetterIsoLanguageName = _data["threeLetterIsoLanguageName"]; + this.twoLetterIsoLanguageName = _data["twoLetterIsoLanguageName"]; + this.isRightToLeft = _data["isRightToLeft"]; + this.cultureName = _data["cultureName"]; + this.name = _data["name"]; + this.nativeName = _data["nativeName"]; + this.dateTimeFormat = _data["dateTimeFormat"] ? DateTimeFormatDto.fromJS(_data["dateTimeFormat"]) : undefined; + } + } + + static fromJS(data: any): CurrentCultureDto { + data = typeof data === 'object' ? data : {}; + let result = new CurrentCultureDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["displayName"] = this.displayName; + data["englishName"] = this.englishName; + data["threeLetterIsoLanguageName"] = this.threeLetterIsoLanguageName; + data["twoLetterIsoLanguageName"] = this.twoLetterIsoLanguageName; + data["isRightToLeft"] = this.isRightToLeft; + data["cultureName"] = this.cultureName; + data["name"] = this.name; + data["nativeName"] = this.nativeName; + data["dateTimeFormat"] = this.dateTimeFormat ? this.dateTimeFormat.toJSON() : undefined; + return data; + } } export interface ICurrentCultureDto { - displayName: string | undefined; - englishName: string | undefined; - threeLetterIsoLanguageName: string | undefined; - twoLetterIsoLanguageName: string | undefined; - isRightToLeft: boolean; - cultureName: string | undefined; - name: string | undefined; - nativeName: string | undefined; - dateTimeFormat: DateTimeFormatDto; + displayName: string | undefined; + englishName: string | undefined; + threeLetterIsoLanguageName: string | undefined; + twoLetterIsoLanguageName: string | undefined; + isRightToLeft: boolean; + cultureName: string | undefined; + name: string | undefined; + nativeName: string | undefined; + dateTimeFormat: DateTimeFormatDto; } export class CurrentTenantDto implements ICurrentTenantDto { - id!: string | undefined; - name!: string | undefined; - isAvailable!: boolean; - - constructor(data?: ICurrentTenantDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.name = _data['name']; - this.isAvailable = _data['isAvailable']; - } - } - - static fromJS(data: any): CurrentTenantDto { - data = typeof data === 'object' ? data : {}; - let result = new CurrentTenantDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['name'] = this.name; - data['isAvailable'] = this.isAvailable; - return data; - } + id!: string | undefined; + name!: string | undefined; + isAvailable!: boolean; + + constructor(data?: ICurrentTenantDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + this.isAvailable = _data["isAvailable"]; + } + } + + static fromJS(data: any): CurrentTenantDto { + data = typeof data === 'object' ? data : {}; + let result = new CurrentTenantDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["name"] = this.name; + data["isAvailable"] = this.isAvailable; + return data; + } } export interface ICurrentTenantDto { - id: string | undefined; - name: string | undefined; - isAvailable: boolean; + id: string | undefined; + name: string | undefined; + isAvailable: boolean; } export class CurrentUserDto implements ICurrentUserDto { - isAuthenticated!: boolean; - id!: string | undefined; - tenantId!: string | undefined; - impersonatorUserId!: string | undefined; - impersonatorTenantId!: string | undefined; - impersonatorUserName!: string | undefined; - impersonatorTenantName!: string | undefined; - userName!: string | undefined; - name!: string | undefined; - surName!: string | undefined; - email!: string | undefined; - emailVerified!: boolean; - phoneNumber!: string | undefined; - phoneNumberVerified!: boolean; - roles!: string[] | undefined; - - constructor(data?: ICurrentUserDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.isAuthenticated = _data['isAuthenticated']; - this.id = _data['id']; - this.tenantId = _data['tenantId']; - this.impersonatorUserId = _data['impersonatorUserId']; - this.impersonatorTenantId = _data['impersonatorTenantId']; - this.impersonatorUserName = _data['impersonatorUserName']; - this.impersonatorTenantName = _data['impersonatorTenantName']; - this.userName = _data['userName']; - this.name = _data['name']; - this.surName = _data['surName']; - this.email = _data['email']; - this.emailVerified = _data['emailVerified']; - this.phoneNumber = _data['phoneNumber']; - this.phoneNumberVerified = _data['phoneNumberVerified']; - if (Array.isArray(_data['roles'])) { - this.roles = [] as any; - for (let item of _data['roles']) this.roles!.push(item); - } - } - } - - static fromJS(data: any): CurrentUserDto { - data = typeof data === 'object' ? data : {}; - let result = new CurrentUserDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['isAuthenticated'] = this.isAuthenticated; - data['id'] = this.id; - data['tenantId'] = this.tenantId; - data['impersonatorUserId'] = this.impersonatorUserId; - data['impersonatorTenantId'] = this.impersonatorTenantId; - data['impersonatorUserName'] = this.impersonatorUserName; - data['impersonatorTenantName'] = this.impersonatorTenantName; - data['userName'] = this.userName; - data['name'] = this.name; - data['surName'] = this.surName; - data['email'] = this.email; - data['emailVerified'] = this.emailVerified; - data['phoneNumber'] = this.phoneNumber; - data['phoneNumberVerified'] = this.phoneNumberVerified; - if (Array.isArray(this.roles)) { - data['roles'] = []; - for (let item of this.roles) data['roles'].push(item); - } - return data; - } + isAuthenticated!: boolean; + id!: string | undefined; + tenantId!: string | undefined; + impersonatorUserId!: string | undefined; + impersonatorTenantId!: string | undefined; + impersonatorUserName!: string | undefined; + impersonatorTenantName!: string | undefined; + userName!: string | undefined; + name!: string | undefined; + surName!: string | undefined; + email!: string | undefined; + emailVerified!: boolean; + phoneNumber!: string | undefined; + phoneNumberVerified!: boolean; + roles!: string[] | undefined; + + constructor(data?: ICurrentUserDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.isAuthenticated = _data["isAuthenticated"]; + this.id = _data["id"]; + this.tenantId = _data["tenantId"]; + this.impersonatorUserId = _data["impersonatorUserId"]; + this.impersonatorTenantId = _data["impersonatorTenantId"]; + this.impersonatorUserName = _data["impersonatorUserName"]; + this.impersonatorTenantName = _data["impersonatorTenantName"]; + this.userName = _data["userName"]; + this.name = _data["name"]; + this.surName = _data["surName"]; + this.email = _data["email"]; + this.emailVerified = _data["emailVerified"]; + this.phoneNumber = _data["phoneNumber"]; + this.phoneNumberVerified = _data["phoneNumberVerified"]; + if (Array.isArray(_data["roles"])) { + this.roles = [] as any; + for (let item of _data["roles"]) + this.roles!.push(item); + } + } + } + + static fromJS(data: any): CurrentUserDto { + data = typeof data === 'object' ? data : {}; + let result = new CurrentUserDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["isAuthenticated"] = this.isAuthenticated; + data["id"] = this.id; + data["tenantId"] = this.tenantId; + data["impersonatorUserId"] = this.impersonatorUserId; + data["impersonatorTenantId"] = this.impersonatorTenantId; + data["impersonatorUserName"] = this.impersonatorUserName; + data["impersonatorTenantName"] = this.impersonatorTenantName; + data["userName"] = this.userName; + data["name"] = this.name; + data["surName"] = this.surName; + data["email"] = this.email; + data["emailVerified"] = this.emailVerified; + data["phoneNumber"] = this.phoneNumber; + data["phoneNumberVerified"] = this.phoneNumberVerified; + if (Array.isArray(this.roles)) { + data["roles"] = []; + for (let item of this.roles) + data["roles"].push(item); + } + return data; + } } export interface ICurrentUserDto { - isAuthenticated: boolean; - id: string | undefined; - tenantId: string | undefined; - impersonatorUserId: string | undefined; - impersonatorTenantId: string | undefined; - impersonatorUserName: string | undefined; - impersonatorTenantName: string | undefined; - userName: string | undefined; - name: string | undefined; - surName: string | undefined; - email: string | undefined; - emailVerified: boolean; - phoneNumber: string | undefined; - phoneNumberVerified: boolean; - roles: string[] | undefined; + isAuthenticated: boolean; + id: string | undefined; + tenantId: string | undefined; + impersonatorUserId: string | undefined; + impersonatorTenantId: string | undefined; + impersonatorUserName: string | undefined; + impersonatorTenantName: string | undefined; + userName: string | undefined; + name: string | undefined; + surName: string | undefined; + email: string | undefined; + emailVerified: boolean; + phoneNumber: string | undefined; + phoneNumberVerified: boolean; + roles: string[] | undefined; } export class DateTimeFormatDto implements IDateTimeFormatDto { - calendarAlgorithmType!: string | undefined; - dateTimeFormatLong!: string | undefined; - shortDatePattern!: string | undefined; - fullDateTimePattern!: string | undefined; - dateSeparator!: string | undefined; - shortTimePattern!: string | undefined; - longTimePattern!: string | undefined; - - constructor(data?: IDateTimeFormatDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.calendarAlgorithmType = _data['calendarAlgorithmType']; - this.dateTimeFormatLong = _data['dateTimeFormatLong']; - this.shortDatePattern = _data['shortDatePattern']; - this.fullDateTimePattern = _data['fullDateTimePattern']; - this.dateSeparator = _data['dateSeparator']; - this.shortTimePattern = _data['shortTimePattern']; - this.longTimePattern = _data['longTimePattern']; - } - } - - static fromJS(data: any): DateTimeFormatDto { - data = typeof data === 'object' ? data : {}; - let result = new DateTimeFormatDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['calendarAlgorithmType'] = this.calendarAlgorithmType; - data['dateTimeFormatLong'] = this.dateTimeFormatLong; - data['shortDatePattern'] = this.shortDatePattern; - data['fullDateTimePattern'] = this.fullDateTimePattern; - data['dateSeparator'] = this.dateSeparator; - data['shortTimePattern'] = this.shortTimePattern; - data['longTimePattern'] = this.longTimePattern; - return data; - } + calendarAlgorithmType!: string | undefined; + dateTimeFormatLong!: string | undefined; + shortDatePattern!: string | undefined; + fullDateTimePattern!: string | undefined; + dateSeparator!: string | undefined; + shortTimePattern!: string | undefined; + longTimePattern!: string | undefined; + + constructor(data?: IDateTimeFormatDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.calendarAlgorithmType = _data["calendarAlgorithmType"]; + this.dateTimeFormatLong = _data["dateTimeFormatLong"]; + this.shortDatePattern = _data["shortDatePattern"]; + this.fullDateTimePattern = _data["fullDateTimePattern"]; + this.dateSeparator = _data["dateSeparator"]; + this.shortTimePattern = _data["shortTimePattern"]; + this.longTimePattern = _data["longTimePattern"]; + } + } + + static fromJS(data: any): DateTimeFormatDto { + data = typeof data === 'object' ? data : {}; + let result = new DateTimeFormatDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["calendarAlgorithmType"] = this.calendarAlgorithmType; + data["dateTimeFormatLong"] = this.dateTimeFormatLong; + data["shortDatePattern"] = this.shortDatePattern; + data["fullDateTimePattern"] = this.fullDateTimePattern; + data["dateSeparator"] = this.dateSeparator; + data["shortTimePattern"] = this.shortTimePattern; + data["longTimePattern"] = this.longTimePattern; + return data; + } } export interface IDateTimeFormatDto { - calendarAlgorithmType: string | undefined; - dateTimeFormatLong: string | undefined; - shortDatePattern: string | undefined; - fullDateTimePattern: string | undefined; - dateSeparator: string | undefined; - shortTimePattern: string | undefined; - longTimePattern: string | undefined; + calendarAlgorithmType: string | undefined; + dateTimeFormatLong: string | undefined; + shortDatePattern: string | undefined; + fullDateTimePattern: string | undefined; + dateSeparator: string | undefined; + shortTimePattern: string | undefined; + longTimePattern: string | undefined; } export class DeleteDataDictionaryDetailInput implements IDeleteDataDictionaryDetailInput { - dataDictionaryId!: string; - dataDictionayDetailId!: string; + dataDictionaryId!: string; + dataDictionayDetailId!: string; - constructor(data?: IDeleteDataDictionaryDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IDeleteDataDictionaryDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.dataDictionaryId = _data['dataDictionaryId']; - this.dataDictionayDetailId = _data['dataDictionayDetailId']; + init(_data?: any) { + if (_data) { + this.dataDictionaryId = _data["dataDictionaryId"]; + this.dataDictionayDetailId = _data["dataDictionayDetailId"]; + } } - } - static fromJS(data: any): DeleteDataDictionaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new DeleteDataDictionaryDetailInput(); - result.init(data); - return result; - } + static fromJS(data: any): DeleteDataDictionaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new DeleteDataDictionaryDetailInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['dataDictionaryId'] = this.dataDictionaryId; - data['dataDictionayDetailId'] = this.dataDictionayDetailId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["dataDictionaryId"] = this.dataDictionaryId; + data["dataDictionayDetailId"] = this.dataDictionayDetailId; + return data; + } } export interface IDeleteDataDictionaryDetailInput { - dataDictionaryId: string; - dataDictionayDetailId: string; + dataDictionaryId: string; + dataDictionayDetailId: string; +} + +/** 删除语言 */ +export class DeleteLanguageInput implements IDeleteLanguageInput { + /** 语言Id */ + id!: string; + + constructor(data?: IDeleteLanguageInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + } + } + + static fromJS(data: any): DeleteLanguageInput { + data = typeof data === 'object' ? data : {}; + let result = new DeleteLanguageInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + return data; + } +} + +/** 删除语言 */ +export interface IDeleteLanguageInput { + /** 语言Id */ + id: string; } export class EntityExtensionDto implements IEntityExtensionDto { - properties!: { [key: string]: ExtensionPropertyDto } | undefined; - configuration!: { [key: string]: any } | undefined; - - constructor(data?: IEntityExtensionDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['properties']) { - this.properties = {} as any; - for (let key in _data['properties']) { - if (_data['properties'].hasOwnProperty(key)) - (this.properties)![key] = _data['properties'][key] - ? ExtensionPropertyDto.fromJS(_data['properties'][key]) - : new ExtensionPropertyDto(); - } - } - if (_data['configuration']) { - this.configuration = {} as any; - for (let key in _data['configuration']) { - if (_data['configuration'].hasOwnProperty(key)) - (this.configuration)![key] = _data['configuration'][key]; - } - } - } - } - - static fromJS(data: any): EntityExtensionDto { - data = typeof data === 'object' ? data : {}; - let result = new EntityExtensionDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.properties) { - data['properties'] = {}; - for (let key in this.properties) { - if (this.properties.hasOwnProperty(key)) - (data['properties'])[key] = this.properties[key] - ? this.properties[key].toJSON() - : undefined; - } - } - if (this.configuration) { - data['configuration'] = {}; - for (let key in this.configuration) { - if (this.configuration.hasOwnProperty(key)) - (data['configuration'])[key] = (this.configuration)[key]; - } - } - return data; - } + properties!: { [key: string]: ExtensionPropertyDto; } | undefined; + configuration!: { [key: string]: any; } | undefined; + + constructor(data?: IEntityExtensionDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["properties"]) { + this.properties = {} as any; + for (let key in _data["properties"]) { + if (_data["properties"].hasOwnProperty(key)) + (this.properties)![key] = _data["properties"][key] ? ExtensionPropertyDto.fromJS(_data["properties"][key]) : new ExtensionPropertyDto(); + } + } + if (_data["configuration"]) { + this.configuration = {} as any; + for (let key in _data["configuration"]) { + if (_data["configuration"].hasOwnProperty(key)) + (this.configuration)![key] = _data["configuration"][key]; + } + } + } + } + + static fromJS(data: any): EntityExtensionDto { + data = typeof data === 'object' ? data : {}; + let result = new EntityExtensionDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.properties) { + data["properties"] = {}; + for (let key in this.properties) { + if (this.properties.hasOwnProperty(key)) + (data["properties"])[key] = this.properties[key] ? this.properties[key].toJSON() : undefined; + } + } + if (this.configuration) { + data["configuration"] = {}; + for (let key in this.configuration) { + if (this.configuration.hasOwnProperty(key)) + (data["configuration"])[key] = (this.configuration)[key]; + } + } + return data; + } } export interface IEntityExtensionDto { - properties: { [key: string]: ExtensionPropertyDto } | undefined; - configuration: { [key: string]: any } | undefined; + properties: { [key: string]: ExtensionPropertyDto; } | undefined; + configuration: { [key: string]: any; } | undefined; } export class ExtensionEnumDto implements IExtensionEnumDto { - fields!: ExtensionEnumFieldDto[] | undefined; - localizationResource!: string | undefined; + fields!: ExtensionEnumFieldDto[] | undefined; + localizationResource!: string | undefined; - constructor(data?: IExtensionEnumDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionEnumDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['fields'])) { - this.fields = [] as any; - for (let item of _data['fields']) this.fields!.push(ExtensionEnumFieldDto.fromJS(item)); - } - this.localizationResource = _data['localizationResource']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["fields"])) { + this.fields = [] as any; + for (let item of _data["fields"]) + this.fields!.push(ExtensionEnumFieldDto.fromJS(item)); + } + this.localizationResource = _data["localizationResource"]; + } } - } - static fromJS(data: any): ExtensionEnumDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionEnumDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionEnumDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionEnumDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.fields)) { - data['fields'] = []; - for (let item of this.fields) data['fields'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.fields)) { + data["fields"] = []; + for (let item of this.fields) + data["fields"].push(item.toJSON()); + } + data["localizationResource"] = this.localizationResource; + return data; } - data['localizationResource'] = this.localizationResource; - return data; - } } export interface IExtensionEnumDto { - fields: ExtensionEnumFieldDto[] | undefined; - localizationResource: string | undefined; + fields: ExtensionEnumFieldDto[] | undefined; + localizationResource: string | undefined; } export class ExtensionEnumFieldDto implements IExtensionEnumFieldDto { - name!: string | undefined; - value!: any | undefined; + name!: string | undefined; + value!: any | undefined; - constructor(data?: IExtensionEnumFieldDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionEnumFieldDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.value = _data['value']; + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.value = _data["value"]; + } } - } - static fromJS(data: any): ExtensionEnumFieldDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionEnumFieldDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionEnumFieldDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionEnumFieldDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['value'] = this.value; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["value"] = this.value; + return data; + } } export interface IExtensionEnumFieldDto { - name: string | undefined; - value: any | undefined; + name: string | undefined; + value: any | undefined; } export class ExtensionPropertyApiCreateDto implements IExtensionPropertyApiCreateDto { - isAvailable!: boolean; + isAvailable!: boolean; - constructor(data?: IExtensionPropertyApiCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionPropertyApiCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.isAvailable = _data['isAvailable']; + init(_data?: any) { + if (_data) { + this.isAvailable = _data["isAvailable"]; + } } - } - static fromJS(data: any): ExtensionPropertyApiCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiCreateDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyApiCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiCreateDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['isAvailable'] = this.isAvailable; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["isAvailable"] = this.isAvailable; + return data; + } } export interface IExtensionPropertyApiCreateDto { - isAvailable: boolean; + isAvailable: boolean; } export class ExtensionPropertyApiDto implements IExtensionPropertyApiDto { - onGet!: ExtensionPropertyApiGetDto; - onCreate!: ExtensionPropertyApiCreateDto; - onUpdate!: ExtensionPropertyApiUpdateDto; - - constructor(data?: IExtensionPropertyApiDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.onGet = _data['onGet'] - ? ExtensionPropertyApiGetDto.fromJS(_data['onGet']) - : undefined; - this.onCreate = _data['onCreate'] - ? ExtensionPropertyApiCreateDto.fromJS(_data['onCreate']) - : undefined; - this.onUpdate = _data['onUpdate'] - ? ExtensionPropertyApiUpdateDto.fromJS(_data['onUpdate']) - : undefined; - } - } - - static fromJS(data: any): ExtensionPropertyApiDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['onGet'] = this.onGet ? this.onGet.toJSON() : undefined; - data['onCreate'] = this.onCreate ? this.onCreate.toJSON() : undefined; - data['onUpdate'] = this.onUpdate ? this.onUpdate.toJSON() : undefined; - return data; - } + onGet!: ExtensionPropertyApiGetDto; + onCreate!: ExtensionPropertyApiCreateDto; + onUpdate!: ExtensionPropertyApiUpdateDto; + + constructor(data?: IExtensionPropertyApiDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.onGet = _data["onGet"] ? ExtensionPropertyApiGetDto.fromJS(_data["onGet"]) : undefined; + this.onCreate = _data["onCreate"] ? ExtensionPropertyApiCreateDto.fromJS(_data["onCreate"]) : undefined; + this.onUpdate = _data["onUpdate"] ? ExtensionPropertyApiUpdateDto.fromJS(_data["onUpdate"]) : undefined; + } + } + + static fromJS(data: any): ExtensionPropertyApiDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["onGet"] = this.onGet ? this.onGet.toJSON() : undefined; + data["onCreate"] = this.onCreate ? this.onCreate.toJSON() : undefined; + data["onUpdate"] = this.onUpdate ? this.onUpdate.toJSON() : undefined; + return data; + } } export interface IExtensionPropertyApiDto { - onGet: ExtensionPropertyApiGetDto; - onCreate: ExtensionPropertyApiCreateDto; - onUpdate: ExtensionPropertyApiUpdateDto; + onGet: ExtensionPropertyApiGetDto; + onCreate: ExtensionPropertyApiCreateDto; + onUpdate: ExtensionPropertyApiUpdateDto; } export class ExtensionPropertyApiGetDto implements IExtensionPropertyApiGetDto { - isAvailable!: boolean; + isAvailable!: boolean; - constructor(data?: IExtensionPropertyApiGetDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionPropertyApiGetDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.isAvailable = _data['isAvailable']; + init(_data?: any) { + if (_data) { + this.isAvailable = _data["isAvailable"]; + } } - } - static fromJS(data: any): ExtensionPropertyApiGetDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiGetDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyApiGetDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiGetDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['isAvailable'] = this.isAvailable; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["isAvailable"] = this.isAvailable; + return data; + } } export interface IExtensionPropertyApiGetDto { - isAvailable: boolean; + isAvailable: boolean; } export class ExtensionPropertyApiUpdateDto implements IExtensionPropertyApiUpdateDto { - isAvailable!: boolean; + isAvailable!: boolean; - constructor(data?: IExtensionPropertyApiUpdateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionPropertyApiUpdateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.isAvailable = _data['isAvailable']; + init(_data?: any) { + if (_data) { + this.isAvailable = _data["isAvailable"]; + } } - } - static fromJS(data: any): ExtensionPropertyApiUpdateDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyApiUpdateDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyApiUpdateDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyApiUpdateDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['isAvailable'] = this.isAvailable; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["isAvailable"] = this.isAvailable; + return data; + } } export interface IExtensionPropertyApiUpdateDto { - isAvailable: boolean; + isAvailable: boolean; } export class ExtensionPropertyAttributeDto implements IExtensionPropertyAttributeDto { - typeSimple!: string | undefined; - config!: { [key: string]: any } | undefined; + typeSimple!: string | undefined; + config!: { [key: string]: any; } | undefined; - constructor(data?: IExtensionPropertyAttributeDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionPropertyAttributeDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.typeSimple = _data['typeSimple']; - if (_data['config']) { - this.config = {} as any; - for (let key in _data['config']) { - if (_data['config'].hasOwnProperty(key)) (this.config)![key] = _data['config'][key]; + init(_data?: any) { + if (_data) { + this.typeSimple = _data["typeSimple"]; + if (_data["config"]) { + this.config = {} as any; + for (let key in _data["config"]) { + if (_data["config"].hasOwnProperty(key)) + (this.config)![key] = _data["config"][key]; + } + } } - } } - } - static fromJS(data: any): ExtensionPropertyAttributeDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyAttributeDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyAttributeDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyAttributeDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['typeSimple'] = this.typeSimple; - if (this.config) { - data['config'] = {}; - for (let key in this.config) { - if (this.config.hasOwnProperty(key)) (data['config'])[key] = (this.config)[key]; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["typeSimple"] = this.typeSimple; + if (this.config) { + data["config"] = {}; + for (let key in this.config) { + if (this.config.hasOwnProperty(key)) + (data["config"])[key] = (this.config)[key]; + } + } + return data; } - return data; - } } export interface IExtensionPropertyAttributeDto { - typeSimple: string | undefined; - config: { [key: string]: any } | undefined; + typeSimple: string | undefined; + config: { [key: string]: any; } | undefined; } export class ExtensionPropertyDto implements IExtensionPropertyDto { - type!: string | undefined; - typeSimple!: string | undefined; - displayName!: LocalizableStringDto; - api!: ExtensionPropertyApiDto; - ui!: ExtensionPropertyUiDto; - attributes!: ExtensionPropertyAttributeDto[] | undefined; - configuration!: { [key: string]: any } | undefined; - defaultValue!: any | undefined; - - constructor(data?: IExtensionPropertyDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.type = _data['type']; - this.typeSimple = _data['typeSimple']; - this.displayName = _data['displayName'] - ? LocalizableStringDto.fromJS(_data['displayName']) - : undefined; - this.api = _data['api'] ? ExtensionPropertyApiDto.fromJS(_data['api']) : undefined; - this.ui = _data['ui'] ? ExtensionPropertyUiDto.fromJS(_data['ui']) : undefined; - if (Array.isArray(_data['attributes'])) { - this.attributes = [] as any; - for (let item of _data['attributes']) - this.attributes!.push(ExtensionPropertyAttributeDto.fromJS(item)); - } - if (_data['configuration']) { - this.configuration = {} as any; - for (let key in _data['configuration']) { - if (_data['configuration'].hasOwnProperty(key)) - (this.configuration)![key] = _data['configuration'][key]; - } - } - this.defaultValue = _data['defaultValue']; - } - } - - static fromJS(data: any): ExtensionPropertyDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['type'] = this.type; - data['typeSimple'] = this.typeSimple; - data['displayName'] = this.displayName ? this.displayName.toJSON() : undefined; - data['api'] = this.api ? this.api.toJSON() : undefined; - data['ui'] = this.ui ? this.ui.toJSON() : undefined; - if (Array.isArray(this.attributes)) { - data['attributes'] = []; - for (let item of this.attributes) data['attributes'].push(item.toJSON()); - } - if (this.configuration) { - data['configuration'] = {}; - for (let key in this.configuration) { - if (this.configuration.hasOwnProperty(key)) - (data['configuration'])[key] = (this.configuration)[key]; - } - } - data['defaultValue'] = this.defaultValue; - return data; - } + type!: string | undefined; + typeSimple!: string | undefined; + displayName!: LocalizableStringDto; + api!: ExtensionPropertyApiDto; + ui!: ExtensionPropertyUiDto; + attributes!: ExtensionPropertyAttributeDto[] | undefined; + configuration!: { [key: string]: any; } | undefined; + defaultValue!: any | undefined; + + constructor(data?: IExtensionPropertyDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.type = _data["type"]; + this.typeSimple = _data["typeSimple"]; + this.displayName = _data["displayName"] ? LocalizableStringDto.fromJS(_data["displayName"]) : undefined; + this.api = _data["api"] ? ExtensionPropertyApiDto.fromJS(_data["api"]) : undefined; + this.ui = _data["ui"] ? ExtensionPropertyUiDto.fromJS(_data["ui"]) : undefined; + if (Array.isArray(_data["attributes"])) { + this.attributes = [] as any; + for (let item of _data["attributes"]) + this.attributes!.push(ExtensionPropertyAttributeDto.fromJS(item)); + } + if (_data["configuration"]) { + this.configuration = {} as any; + for (let key in _data["configuration"]) { + if (_data["configuration"].hasOwnProperty(key)) + (this.configuration)![key] = _data["configuration"][key]; + } + } + this.defaultValue = _data["defaultValue"]; + } + } + + static fromJS(data: any): ExtensionPropertyDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["type"] = this.type; + data["typeSimple"] = this.typeSimple; + data["displayName"] = this.displayName ? this.displayName.toJSON() : undefined; + data["api"] = this.api ? this.api.toJSON() : undefined; + data["ui"] = this.ui ? this.ui.toJSON() : undefined; + if (Array.isArray(this.attributes)) { + data["attributes"] = []; + for (let item of this.attributes) + data["attributes"].push(item.toJSON()); + } + if (this.configuration) { + data["configuration"] = {}; + for (let key in this.configuration) { + if (this.configuration.hasOwnProperty(key)) + (data["configuration"])[key] = (this.configuration)[key]; + } + } + data["defaultValue"] = this.defaultValue; + return data; + } } export interface IExtensionPropertyDto { - type: string | undefined; - typeSimple: string | undefined; - displayName: LocalizableStringDto; - api: ExtensionPropertyApiDto; - ui: ExtensionPropertyUiDto; - attributes: ExtensionPropertyAttributeDto[] | undefined; - configuration: { [key: string]: any } | undefined; - defaultValue: any | undefined; + type: string | undefined; + typeSimple: string | undefined; + displayName: LocalizableStringDto; + api: ExtensionPropertyApiDto; + ui: ExtensionPropertyUiDto; + attributes: ExtensionPropertyAttributeDto[] | undefined; + configuration: { [key: string]: any; } | undefined; + defaultValue: any | undefined; } export class ExtensionPropertyUiDto implements IExtensionPropertyUiDto { - onTable!: ExtensionPropertyUiTableDto; - onCreateForm!: ExtensionPropertyUiFormDto; - onEditForm!: ExtensionPropertyUiFormDto; - lookup!: ExtensionPropertyUiLookupDto; - - constructor(data?: IExtensionPropertyUiDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.onTable = _data['onTable'] - ? ExtensionPropertyUiTableDto.fromJS(_data['onTable']) - : undefined; - this.onCreateForm = _data['onCreateForm'] - ? ExtensionPropertyUiFormDto.fromJS(_data['onCreateForm']) - : undefined; - this.onEditForm = _data['onEditForm'] - ? ExtensionPropertyUiFormDto.fromJS(_data['onEditForm']) - : undefined; - this.lookup = _data['lookup'] - ? ExtensionPropertyUiLookupDto.fromJS(_data['lookup']) - : undefined; - } - } - - static fromJS(data: any): ExtensionPropertyUiDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['onTable'] = this.onTable ? this.onTable.toJSON() : undefined; - data['onCreateForm'] = this.onCreateForm ? this.onCreateForm.toJSON() : undefined; - data['onEditForm'] = this.onEditForm ? this.onEditForm.toJSON() : undefined; - data['lookup'] = this.lookup ? this.lookup.toJSON() : undefined; - return data; - } + onTable!: ExtensionPropertyUiTableDto; + onCreateForm!: ExtensionPropertyUiFormDto; + onEditForm!: ExtensionPropertyUiFormDto; + lookup!: ExtensionPropertyUiLookupDto; + + constructor(data?: IExtensionPropertyUiDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.onTable = _data["onTable"] ? ExtensionPropertyUiTableDto.fromJS(_data["onTable"]) : undefined; + this.onCreateForm = _data["onCreateForm"] ? ExtensionPropertyUiFormDto.fromJS(_data["onCreateForm"]) : undefined; + this.onEditForm = _data["onEditForm"] ? ExtensionPropertyUiFormDto.fromJS(_data["onEditForm"]) : undefined; + this.lookup = _data["lookup"] ? ExtensionPropertyUiLookupDto.fromJS(_data["lookup"]) : undefined; + } + } + + static fromJS(data: any): ExtensionPropertyUiDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["onTable"] = this.onTable ? this.onTable.toJSON() : undefined; + data["onCreateForm"] = this.onCreateForm ? this.onCreateForm.toJSON() : undefined; + data["onEditForm"] = this.onEditForm ? this.onEditForm.toJSON() : undefined; + data["lookup"] = this.lookup ? this.lookup.toJSON() : undefined; + return data; + } } export interface IExtensionPropertyUiDto { - onTable: ExtensionPropertyUiTableDto; - onCreateForm: ExtensionPropertyUiFormDto; - onEditForm: ExtensionPropertyUiFormDto; - lookup: ExtensionPropertyUiLookupDto; + onTable: ExtensionPropertyUiTableDto; + onCreateForm: ExtensionPropertyUiFormDto; + onEditForm: ExtensionPropertyUiFormDto; + lookup: ExtensionPropertyUiLookupDto; } export class ExtensionPropertyUiFormDto implements IExtensionPropertyUiFormDto { - isVisible!: boolean; + isVisible!: boolean; - constructor(data?: IExtensionPropertyUiFormDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionPropertyUiFormDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.isVisible = _data['isVisible']; + init(_data?: any) { + if (_data) { + this.isVisible = _data["isVisible"]; + } } - } - static fromJS(data: any): ExtensionPropertyUiFormDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiFormDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyUiFormDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiFormDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['isVisible'] = this.isVisible; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["isVisible"] = this.isVisible; + return data; + } } export interface IExtensionPropertyUiFormDto { - isVisible: boolean; + isVisible: boolean; } export class ExtensionPropertyUiLookupDto implements IExtensionPropertyUiLookupDto { - url!: string | undefined; - resultListPropertyName!: string | undefined; - displayPropertyName!: string | undefined; - valuePropertyName!: string | undefined; - filterParamName!: string | undefined; - - constructor(data?: IExtensionPropertyUiLookupDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.url = _data['url']; - this.resultListPropertyName = _data['resultListPropertyName']; - this.displayPropertyName = _data['displayPropertyName']; - this.valuePropertyName = _data['valuePropertyName']; - this.filterParamName = _data['filterParamName']; - } - } - - static fromJS(data: any): ExtensionPropertyUiLookupDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiLookupDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['url'] = this.url; - data['resultListPropertyName'] = this.resultListPropertyName; - data['displayPropertyName'] = this.displayPropertyName; - data['valuePropertyName'] = this.valuePropertyName; - data['filterParamName'] = this.filterParamName; - return data; - } + url!: string | undefined; + resultListPropertyName!: string | undefined; + displayPropertyName!: string | undefined; + valuePropertyName!: string | undefined; + filterParamName!: string | undefined; + + constructor(data?: IExtensionPropertyUiLookupDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.url = _data["url"]; + this.resultListPropertyName = _data["resultListPropertyName"]; + this.displayPropertyName = _data["displayPropertyName"]; + this.valuePropertyName = _data["valuePropertyName"]; + this.filterParamName = _data["filterParamName"]; + } + } + + static fromJS(data: any): ExtensionPropertyUiLookupDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiLookupDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["url"] = this.url; + data["resultListPropertyName"] = this.resultListPropertyName; + data["displayPropertyName"] = this.displayPropertyName; + data["valuePropertyName"] = this.valuePropertyName; + data["filterParamName"] = this.filterParamName; + return data; + } } export interface IExtensionPropertyUiLookupDto { - url: string | undefined; - resultListPropertyName: string | undefined; - displayPropertyName: string | undefined; - valuePropertyName: string | undefined; - filterParamName: string | undefined; + url: string | undefined; + resultListPropertyName: string | undefined; + displayPropertyName: string | undefined; + valuePropertyName: string | undefined; + filterParamName: string | undefined; } export class ExtensionPropertyUiTableDto implements IExtensionPropertyUiTableDto { - isVisible!: boolean; + isVisible!: boolean; - constructor(data?: IExtensionPropertyUiTableDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IExtensionPropertyUiTableDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.isVisible = _data['isVisible']; + init(_data?: any) { + if (_data) { + this.isVisible = _data["isVisible"]; + } } - } - static fromJS(data: any): ExtensionPropertyUiTableDto { - data = typeof data === 'object' ? data : {}; - let result = new ExtensionPropertyUiTableDto(); - result.init(data); - return result; - } + static fromJS(data: any): ExtensionPropertyUiTableDto { + data = typeof data === 'object' ? data : {}; + let result = new ExtensionPropertyUiTableDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['isVisible'] = this.isVisible; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["isVisible"] = this.isVisible; + return data; + } } export interface IExtensionPropertyUiTableDto { - isVisible: boolean; + isVisible: boolean; } export class FileAggregateRoute implements IFileAggregateRoute { - routeKeys!: string[] | undefined; - routeKeysConfig!: AggregateRouteConfig[] | undefined; - upstreamPathTemplate!: string | undefined; - upstreamHost!: string | undefined; - routeIsCaseSensitive!: boolean; - aggregator!: string | undefined; - readonly upstreamHttpMethod!: string[] | undefined; - priority!: number; - - constructor(data?: IFileAggregateRoute) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['routeKeys'])) { - this.routeKeys = [] as any; - for (let item of _data['routeKeys']) this.routeKeys!.push(item); - } - if (Array.isArray(_data['routeKeysConfig'])) { - this.routeKeysConfig = [] as any; - for (let item of _data['routeKeysConfig']) - this.routeKeysConfig!.push(AggregateRouteConfig.fromJS(item)); - } - this.upstreamPathTemplate = _data['upstreamPathTemplate']; - this.upstreamHost = _data['upstreamHost']; - this.routeIsCaseSensitive = _data['routeIsCaseSensitive']; - this.aggregator = _data['aggregator']; - if (Array.isArray(_data['upstreamHttpMethod'])) { - (this).upstreamHttpMethod = [] as any; - for (let item of _data['upstreamHttpMethod']) (this).upstreamHttpMethod!.push(item); - } - this.priority = _data['priority']; - } - } - - static fromJS(data: any): FileAggregateRoute { - data = typeof data === 'object' ? data : {}; - let result = new FileAggregateRoute(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.routeKeys)) { - data['routeKeys'] = []; - for (let item of this.routeKeys) data['routeKeys'].push(item); - } - if (Array.isArray(this.routeKeysConfig)) { - data['routeKeysConfig'] = []; - for (let item of this.routeKeysConfig) data['routeKeysConfig'].push(item.toJSON()); - } - data['upstreamPathTemplate'] = this.upstreamPathTemplate; - data['upstreamHost'] = this.upstreamHost; - data['routeIsCaseSensitive'] = this.routeIsCaseSensitive; - data['aggregator'] = this.aggregator; - if (Array.isArray(this.upstreamHttpMethod)) { - data['upstreamHttpMethod'] = []; - for (let item of this.upstreamHttpMethod) data['upstreamHttpMethod'].push(item); - } - data['priority'] = this.priority; - return data; - } + routeKeys!: string[] | undefined; + routeKeysConfig!: AggregateRouteConfig[] | undefined; + upstreamPathTemplate!: string | undefined; + upstreamHost!: string | undefined; + routeIsCaseSensitive!: boolean; + aggregator!: string | undefined; + readonly upstreamHttpMethod!: string[] | undefined; + priority!: number; + + constructor(data?: IFileAggregateRoute) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["routeKeys"])) { + this.routeKeys = [] as any; + for (let item of _data["routeKeys"]) + this.routeKeys!.push(item); + } + if (Array.isArray(_data["routeKeysConfig"])) { + this.routeKeysConfig = [] as any; + for (let item of _data["routeKeysConfig"]) + this.routeKeysConfig!.push(AggregateRouteConfig.fromJS(item)); + } + this.upstreamPathTemplate = _data["upstreamPathTemplate"]; + this.upstreamHost = _data["upstreamHost"]; + this.routeIsCaseSensitive = _data["routeIsCaseSensitive"]; + this.aggregator = _data["aggregator"]; + if (Array.isArray(_data["upstreamHttpMethod"])) { + (this).upstreamHttpMethod = [] as any; + for (let item of _data["upstreamHttpMethod"]) + (this).upstreamHttpMethod!.push(item); + } + this.priority = _data["priority"]; + } + } + + static fromJS(data: any): FileAggregateRoute { + data = typeof data === 'object' ? data : {}; + let result = new FileAggregateRoute(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.routeKeys)) { + data["routeKeys"] = []; + for (let item of this.routeKeys) + data["routeKeys"].push(item); + } + if (Array.isArray(this.routeKeysConfig)) { + data["routeKeysConfig"] = []; + for (let item of this.routeKeysConfig) + data["routeKeysConfig"].push(item.toJSON()); + } + data["upstreamPathTemplate"] = this.upstreamPathTemplate; + data["upstreamHost"] = this.upstreamHost; + data["routeIsCaseSensitive"] = this.routeIsCaseSensitive; + data["aggregator"] = this.aggregator; + if (Array.isArray(this.upstreamHttpMethod)) { + data["upstreamHttpMethod"] = []; + for (let item of this.upstreamHttpMethod) + data["upstreamHttpMethod"].push(item); + } + data["priority"] = this.priority; + return data; + } } export interface IFileAggregateRoute { - routeKeys: string[] | undefined; - routeKeysConfig: AggregateRouteConfig[] | undefined; - upstreamPathTemplate: string | undefined; - upstreamHost: string | undefined; - routeIsCaseSensitive: boolean; - aggregator: string | undefined; - upstreamHttpMethod: string[] | undefined; - priority: number; + routeKeys: string[] | undefined; + routeKeysConfig: AggregateRouteConfig[] | undefined; + upstreamPathTemplate: string | undefined; + upstreamHost: string | undefined; + routeIsCaseSensitive: boolean; + aggregator: string | undefined; + upstreamHttpMethod: string[] | undefined; + priority: number; } export class FileAuthenticationOptions implements IFileAuthenticationOptions { - authenticationProviderKey!: string | undefined; - allowedScopes!: string[] | undefined; + authenticationProviderKey!: string | undefined; + allowedScopes!: string[] | undefined; - constructor(data?: IFileAuthenticationOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IFileAuthenticationOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.authenticationProviderKey = _data['authenticationProviderKey']; - if (Array.isArray(_data['allowedScopes'])) { - this.allowedScopes = [] as any; - for (let item of _data['allowedScopes']) this.allowedScopes!.push(item); - } + init(_data?: any) { + if (_data) { + this.authenticationProviderKey = _data["authenticationProviderKey"]; + if (Array.isArray(_data["allowedScopes"])) { + this.allowedScopes = [] as any; + for (let item of _data["allowedScopes"]) + this.allowedScopes!.push(item); + } + } } - } - static fromJS(data: any): FileAuthenticationOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileAuthenticationOptions(); - result.init(data); - return result; - } + static fromJS(data: any): FileAuthenticationOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileAuthenticationOptions(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['authenticationProviderKey'] = this.authenticationProviderKey; - if (Array.isArray(this.allowedScopes)) { - data['allowedScopes'] = []; - for (let item of this.allowedScopes) data['allowedScopes'].push(item); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["authenticationProviderKey"] = this.authenticationProviderKey; + if (Array.isArray(this.allowedScopes)) { + data["allowedScopes"] = []; + for (let item of this.allowedScopes) + data["allowedScopes"].push(item); + } + return data; } - return data; - } } export interface IFileAuthenticationOptions { - authenticationProviderKey: string | undefined; - allowedScopes: string[] | undefined; + authenticationProviderKey: string | undefined; + allowedScopes: string[] | undefined; } export class FileCacheOptions implements IFileCacheOptions { - ttlSeconds!: number; - region!: string | undefined; + ttlSeconds!: number; + region!: string | undefined; - constructor(data?: IFileCacheOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IFileCacheOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.ttlSeconds = _data['ttlSeconds']; - this.region = _data['region']; + init(_data?: any) { + if (_data) { + this.ttlSeconds = _data["ttlSeconds"]; + this.region = _data["region"]; + } } - } - static fromJS(data: any): FileCacheOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileCacheOptions(); - result.init(data); - return result; - } + static fromJS(data: any): FileCacheOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileCacheOptions(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['ttlSeconds'] = this.ttlSeconds; - data['region'] = this.region; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["ttlSeconds"] = this.ttlSeconds; + data["region"] = this.region; + return data; + } } export interface IFileCacheOptions { - ttlSeconds: number; - region: string | undefined; + ttlSeconds: number; + region: string | undefined; } export class FileConfiguration implements IFileConfiguration { - routes!: FileRoute[] | undefined; - dynamicRoutes!: FileDynamicRoute[] | undefined; - aggregates!: FileAggregateRoute[] | undefined; - globalConfiguration!: FileGlobalConfiguration; - - constructor(data?: IFileConfiguration) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['routes'])) { - this.routes = [] as any; - for (let item of _data['routes']) this.routes!.push(FileRoute.fromJS(item)); - } - if (Array.isArray(_data['dynamicRoutes'])) { - this.dynamicRoutes = [] as any; - for (let item of _data['dynamicRoutes']) - this.dynamicRoutes!.push(FileDynamicRoute.fromJS(item)); - } - if (Array.isArray(_data['aggregates'])) { - this.aggregates = [] as any; - for (let item of _data['aggregates']) - this.aggregates!.push(FileAggregateRoute.fromJS(item)); - } - this.globalConfiguration = _data['globalConfiguration'] - ? FileGlobalConfiguration.fromJS(_data['globalConfiguration']) - : undefined; - } - } - - static fromJS(data: any): FileConfiguration { - data = typeof data === 'object' ? data : {}; - let result = new FileConfiguration(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.routes)) { - data['routes'] = []; - for (let item of this.routes) data['routes'].push(item.toJSON()); - } - if (Array.isArray(this.dynamicRoutes)) { - data['dynamicRoutes'] = []; - for (let item of this.dynamicRoutes) data['dynamicRoutes'].push(item.toJSON()); - } - if (Array.isArray(this.aggregates)) { - data['aggregates'] = []; - for (let item of this.aggregates) data['aggregates'].push(item.toJSON()); - } - data['globalConfiguration'] = this.globalConfiguration - ? this.globalConfiguration.toJSON() - : undefined; - return data; - } + routes!: FileRoute[] | undefined; + dynamicRoutes!: FileDynamicRoute[] | undefined; + aggregates!: FileAggregateRoute[] | undefined; + globalConfiguration!: FileGlobalConfiguration; + + constructor(data?: IFileConfiguration) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["routes"])) { + this.routes = [] as any; + for (let item of _data["routes"]) + this.routes!.push(FileRoute.fromJS(item)); + } + if (Array.isArray(_data["dynamicRoutes"])) { + this.dynamicRoutes = [] as any; + for (let item of _data["dynamicRoutes"]) + this.dynamicRoutes!.push(FileDynamicRoute.fromJS(item)); + } + if (Array.isArray(_data["aggregates"])) { + this.aggregates = [] as any; + for (let item of _data["aggregates"]) + this.aggregates!.push(FileAggregateRoute.fromJS(item)); + } + this.globalConfiguration = _data["globalConfiguration"] ? FileGlobalConfiguration.fromJS(_data["globalConfiguration"]) : undefined; + } + } + + static fromJS(data: any): FileConfiguration { + data = typeof data === 'object' ? data : {}; + let result = new FileConfiguration(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.routes)) { + data["routes"] = []; + for (let item of this.routes) + data["routes"].push(item.toJSON()); + } + if (Array.isArray(this.dynamicRoutes)) { + data["dynamicRoutes"] = []; + for (let item of this.dynamicRoutes) + data["dynamicRoutes"].push(item.toJSON()); + } + if (Array.isArray(this.aggregates)) { + data["aggregates"] = []; + for (let item of this.aggregates) + data["aggregates"].push(item.toJSON()); + } + data["globalConfiguration"] = this.globalConfiguration ? this.globalConfiguration.toJSON() : undefined; + return data; + } } export interface IFileConfiguration { - routes: FileRoute[] | undefined; - dynamicRoutes: FileDynamicRoute[] | undefined; - aggregates: FileAggregateRoute[] | undefined; - globalConfiguration: FileGlobalConfiguration; + routes: FileRoute[] | undefined; + dynamicRoutes: FileDynamicRoute[] | undefined; + aggregates: FileAggregateRoute[] | undefined; + globalConfiguration: FileGlobalConfiguration; } export class FileDynamicRoute implements IFileDynamicRoute { - serviceName!: string | undefined; - rateLimitRule!: FileRateLimitRule; - downstreamHttpVersion!: string | undefined; - - constructor(data?: IFileDynamicRoute) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.serviceName = _data['serviceName']; - this.rateLimitRule = _data['rateLimitRule'] - ? FileRateLimitRule.fromJS(_data['rateLimitRule']) - : undefined; - this.downstreamHttpVersion = _data['downstreamHttpVersion']; - } - } - - static fromJS(data: any): FileDynamicRoute { - data = typeof data === 'object' ? data : {}; - let result = new FileDynamicRoute(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['serviceName'] = this.serviceName; - data['rateLimitRule'] = this.rateLimitRule ? this.rateLimitRule.toJSON() : undefined; - data['downstreamHttpVersion'] = this.downstreamHttpVersion; - return data; - } + serviceName!: string | undefined; + rateLimitRule!: FileRateLimitRule; + downstreamHttpVersion!: string | undefined; + + constructor(data?: IFileDynamicRoute) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.serviceName = _data["serviceName"]; + this.rateLimitRule = _data["rateLimitRule"] ? FileRateLimitRule.fromJS(_data["rateLimitRule"]) : undefined; + this.downstreamHttpVersion = _data["downstreamHttpVersion"]; + } + } + + static fromJS(data: any): FileDynamicRoute { + data = typeof data === 'object' ? data : {}; + let result = new FileDynamicRoute(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["serviceName"] = this.serviceName; + data["rateLimitRule"] = this.rateLimitRule ? this.rateLimitRule.toJSON() : undefined; + data["downstreamHttpVersion"] = this.downstreamHttpVersion; + return data; + } } export interface IFileDynamicRoute { - serviceName: string | undefined; - rateLimitRule: FileRateLimitRule; - downstreamHttpVersion: string | undefined; + serviceName: string | undefined; + rateLimitRule: FileRateLimitRule; + downstreamHttpVersion: string | undefined; } export class FileGlobalConfiguration implements IFileGlobalConfiguration { - requestIdKey!: string | undefined; - serviceDiscoveryProvider!: FileServiceDiscoveryProvider; - rateLimitOptions!: FileRateLimitOptions; - qoSOptions!: FileQoSOptions; - baseUrl!: string | undefined; - loadBalancerOptions!: FileLoadBalancerOptions; - downstreamScheme!: string | undefined; - httpHandlerOptions!: FileHttpHandlerOptions; - downstreamHttpVersion!: string | undefined; - - constructor(data?: IFileGlobalConfiguration) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.requestIdKey = _data['requestIdKey']; - this.serviceDiscoveryProvider = _data['serviceDiscoveryProvider'] - ? FileServiceDiscoveryProvider.fromJS(_data['serviceDiscoveryProvider']) - : undefined; - this.rateLimitOptions = _data['rateLimitOptions'] - ? FileRateLimitOptions.fromJS(_data['rateLimitOptions']) - : undefined; - this.qoSOptions = _data['qoSOptions'] - ? FileQoSOptions.fromJS(_data['qoSOptions']) - : undefined; - this.baseUrl = _data['baseUrl']; - this.loadBalancerOptions = _data['loadBalancerOptions'] - ? FileLoadBalancerOptions.fromJS(_data['loadBalancerOptions']) - : undefined; - this.downstreamScheme = _data['downstreamScheme']; - this.httpHandlerOptions = _data['httpHandlerOptions'] - ? FileHttpHandlerOptions.fromJS(_data['httpHandlerOptions']) - : undefined; - this.downstreamHttpVersion = _data['downstreamHttpVersion']; - } - } - - static fromJS(data: any): FileGlobalConfiguration { - data = typeof data === 'object' ? data : {}; - let result = new FileGlobalConfiguration(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['requestIdKey'] = this.requestIdKey; - data['serviceDiscoveryProvider'] = this.serviceDiscoveryProvider - ? this.serviceDiscoveryProvider.toJSON() - : undefined; - data['rateLimitOptions'] = this.rateLimitOptions - ? this.rateLimitOptions.toJSON() - : undefined; - data['qoSOptions'] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; - data['baseUrl'] = this.baseUrl; - data['loadBalancerOptions'] = this.loadBalancerOptions - ? this.loadBalancerOptions.toJSON() - : undefined; - data['downstreamScheme'] = this.downstreamScheme; - data['httpHandlerOptions'] = this.httpHandlerOptions - ? this.httpHandlerOptions.toJSON() - : undefined; - data['downstreamHttpVersion'] = this.downstreamHttpVersion; - return data; - } + requestIdKey!: string | undefined; + serviceDiscoveryProvider!: FileServiceDiscoveryProvider; + rateLimitOptions!: FileRateLimitOptions; + qoSOptions!: FileQoSOptions; + baseUrl!: string | undefined; + loadBalancerOptions!: FileLoadBalancerOptions; + downstreamScheme!: string | undefined; + httpHandlerOptions!: FileHttpHandlerOptions; + downstreamHttpVersion!: string | undefined; + + constructor(data?: IFileGlobalConfiguration) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.requestIdKey = _data["requestIdKey"]; + this.serviceDiscoveryProvider = _data["serviceDiscoveryProvider"] ? FileServiceDiscoveryProvider.fromJS(_data["serviceDiscoveryProvider"]) : undefined; + this.rateLimitOptions = _data["rateLimitOptions"] ? FileRateLimitOptions.fromJS(_data["rateLimitOptions"]) : undefined; + this.qoSOptions = _data["qoSOptions"] ? FileQoSOptions.fromJS(_data["qoSOptions"]) : undefined; + this.baseUrl = _data["baseUrl"]; + this.loadBalancerOptions = _data["loadBalancerOptions"] ? FileLoadBalancerOptions.fromJS(_data["loadBalancerOptions"]) : undefined; + this.downstreamScheme = _data["downstreamScheme"]; + this.httpHandlerOptions = _data["httpHandlerOptions"] ? FileHttpHandlerOptions.fromJS(_data["httpHandlerOptions"]) : undefined; + this.downstreamHttpVersion = _data["downstreamHttpVersion"]; + } + } + + static fromJS(data: any): FileGlobalConfiguration { + data = typeof data === 'object' ? data : {}; + let result = new FileGlobalConfiguration(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["requestIdKey"] = this.requestIdKey; + data["serviceDiscoveryProvider"] = this.serviceDiscoveryProvider ? this.serviceDiscoveryProvider.toJSON() : undefined; + data["rateLimitOptions"] = this.rateLimitOptions ? this.rateLimitOptions.toJSON() : undefined; + data["qoSOptions"] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; + data["baseUrl"] = this.baseUrl; + data["loadBalancerOptions"] = this.loadBalancerOptions ? this.loadBalancerOptions.toJSON() : undefined; + data["downstreamScheme"] = this.downstreamScheme; + data["httpHandlerOptions"] = this.httpHandlerOptions ? this.httpHandlerOptions.toJSON() : undefined; + data["downstreamHttpVersion"] = this.downstreamHttpVersion; + return data; + } } export interface IFileGlobalConfiguration { - requestIdKey: string | undefined; - serviceDiscoveryProvider: FileServiceDiscoveryProvider; - rateLimitOptions: FileRateLimitOptions; - qoSOptions: FileQoSOptions; - baseUrl: string | undefined; - loadBalancerOptions: FileLoadBalancerOptions; - downstreamScheme: string | undefined; - httpHandlerOptions: FileHttpHandlerOptions; - downstreamHttpVersion: string | undefined; + requestIdKey: string | undefined; + serviceDiscoveryProvider: FileServiceDiscoveryProvider; + rateLimitOptions: FileRateLimitOptions; + qoSOptions: FileQoSOptions; + baseUrl: string | undefined; + loadBalancerOptions: FileLoadBalancerOptions; + downstreamScheme: string | undefined; + httpHandlerOptions: FileHttpHandlerOptions; + downstreamHttpVersion: string | undefined; } export class FileHostAndPort implements IFileHostAndPort { - host!: string | undefined; - port!: number; + host!: string | undefined; + port!: number; - constructor(data?: IFileHostAndPort) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IFileHostAndPort) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.host = _data['host']; - this.port = _data['port']; + init(_data?: any) { + if (_data) { + this.host = _data["host"]; + this.port = _data["port"]; + } } - } - static fromJS(data: any): FileHostAndPort { - data = typeof data === 'object' ? data : {}; - let result = new FileHostAndPort(); - result.init(data); - return result; - } + static fromJS(data: any): FileHostAndPort { + data = typeof data === 'object' ? data : {}; + let result = new FileHostAndPort(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['host'] = this.host; - data['port'] = this.port; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["host"] = this.host; + data["port"] = this.port; + return data; + } } export interface IFileHostAndPort { - host: string | undefined; - port: number; + host: string | undefined; + port: number; } export class FileHttpHandlerOptions implements IFileHttpHandlerOptions { - allowAutoRedirect!: boolean; - useCookieContainer!: boolean; - useTracing!: boolean; - useProxy!: boolean; - maxConnectionsPerServer!: number; - - constructor(data?: IFileHttpHandlerOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.allowAutoRedirect = _data['allowAutoRedirect']; - this.useCookieContainer = _data['useCookieContainer']; - this.useTracing = _data['useTracing']; - this.useProxy = _data['useProxy']; - this.maxConnectionsPerServer = _data['maxConnectionsPerServer']; - } - } - - static fromJS(data: any): FileHttpHandlerOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileHttpHandlerOptions(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['allowAutoRedirect'] = this.allowAutoRedirect; - data['useCookieContainer'] = this.useCookieContainer; - data['useTracing'] = this.useTracing; - data['useProxy'] = this.useProxy; - data['maxConnectionsPerServer'] = this.maxConnectionsPerServer; - return data; - } + allowAutoRedirect!: boolean; + useCookieContainer!: boolean; + useTracing!: boolean; + useProxy!: boolean; + maxConnectionsPerServer!: number; + + constructor(data?: IFileHttpHandlerOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.allowAutoRedirect = _data["allowAutoRedirect"]; + this.useCookieContainer = _data["useCookieContainer"]; + this.useTracing = _data["useTracing"]; + this.useProxy = _data["useProxy"]; + this.maxConnectionsPerServer = _data["maxConnectionsPerServer"]; + } + } + + static fromJS(data: any): FileHttpHandlerOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileHttpHandlerOptions(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["allowAutoRedirect"] = this.allowAutoRedirect; + data["useCookieContainer"] = this.useCookieContainer; + data["useTracing"] = this.useTracing; + data["useProxy"] = this.useProxy; + data["maxConnectionsPerServer"] = this.maxConnectionsPerServer; + return data; + } } export interface IFileHttpHandlerOptions { - allowAutoRedirect: boolean; - useCookieContainer: boolean; - useTracing: boolean; - useProxy: boolean; - maxConnectionsPerServer: number; + allowAutoRedirect: boolean; + useCookieContainer: boolean; + useTracing: boolean; + useProxy: boolean; + maxConnectionsPerServer: number; } export class FileLoadBalancerOptions implements IFileLoadBalancerOptions { - type!: string | undefined; - key!: string | undefined; - expiry!: number; - - constructor(data?: IFileLoadBalancerOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.type = _data['type']; - this.key = _data['key']; - this.expiry = _data['expiry']; - } - } - - static fromJS(data: any): FileLoadBalancerOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileLoadBalancerOptions(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['type'] = this.type; - data['key'] = this.key; - data['expiry'] = this.expiry; - return data; - } + type!: string | undefined; + key!: string | undefined; + expiry!: number; + + constructor(data?: IFileLoadBalancerOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.type = _data["type"]; + this.key = _data["key"]; + this.expiry = _data["expiry"]; + } + } + + static fromJS(data: any): FileLoadBalancerOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileLoadBalancerOptions(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["type"] = this.type; + data["key"] = this.key; + data["expiry"] = this.expiry; + return data; + } } export interface IFileLoadBalancerOptions { - type: string | undefined; - key: string | undefined; - expiry: number; + type: string | undefined; + key: string | undefined; + expiry: number; } export class FileQoSOptions implements IFileQoSOptions { - exceptionsAllowedBeforeBreaking!: number; - durationOfBreak!: number; - timeoutValue!: number; - - constructor(data?: IFileQoSOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.exceptionsAllowedBeforeBreaking = _data['exceptionsAllowedBeforeBreaking']; - this.durationOfBreak = _data['durationOfBreak']; - this.timeoutValue = _data['timeoutValue']; - } - } - - static fromJS(data: any): FileQoSOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileQoSOptions(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['exceptionsAllowedBeforeBreaking'] = this.exceptionsAllowedBeforeBreaking; - data['durationOfBreak'] = this.durationOfBreak; - data['timeoutValue'] = this.timeoutValue; - return data; - } + exceptionsAllowedBeforeBreaking!: number; + durationOfBreak!: number; + timeoutValue!: number; + + constructor(data?: IFileQoSOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.exceptionsAllowedBeforeBreaking = _data["exceptionsAllowedBeforeBreaking"]; + this.durationOfBreak = _data["durationOfBreak"]; + this.timeoutValue = _data["timeoutValue"]; + } + } + + static fromJS(data: any): FileQoSOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileQoSOptions(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["exceptionsAllowedBeforeBreaking"] = this.exceptionsAllowedBeforeBreaking; + data["durationOfBreak"] = this.durationOfBreak; + data["timeoutValue"] = this.timeoutValue; + return data; + } } export interface IFileQoSOptions { - exceptionsAllowedBeforeBreaking: number; - durationOfBreak: number; - timeoutValue: number; + exceptionsAllowedBeforeBreaking: number; + durationOfBreak: number; + timeoutValue: number; } export class FileRateLimitOptions implements IFileRateLimitOptions { - clientIdHeader!: string | undefined; - quotaExceededMessage!: string | undefined; - rateLimitCounterPrefix!: string | undefined; - disableRateLimitHeaders!: boolean; - httpStatusCode!: number; - - constructor(data?: IFileRateLimitOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.clientIdHeader = _data['clientIdHeader']; - this.quotaExceededMessage = _data['quotaExceededMessage']; - this.rateLimitCounterPrefix = _data['rateLimitCounterPrefix']; - this.disableRateLimitHeaders = _data['disableRateLimitHeaders']; - this.httpStatusCode = _data['httpStatusCode']; - } - } - - static fromJS(data: any): FileRateLimitOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileRateLimitOptions(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['clientIdHeader'] = this.clientIdHeader; - data['quotaExceededMessage'] = this.quotaExceededMessage; - data['rateLimitCounterPrefix'] = this.rateLimitCounterPrefix; - data['disableRateLimitHeaders'] = this.disableRateLimitHeaders; - data['httpStatusCode'] = this.httpStatusCode; - return data; - } + clientIdHeader!: string | undefined; + quotaExceededMessage!: string | undefined; + rateLimitCounterPrefix!: string | undefined; + disableRateLimitHeaders!: boolean; + httpStatusCode!: number; + + constructor(data?: IFileRateLimitOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.clientIdHeader = _data["clientIdHeader"]; + this.quotaExceededMessage = _data["quotaExceededMessage"]; + this.rateLimitCounterPrefix = _data["rateLimitCounterPrefix"]; + this.disableRateLimitHeaders = _data["disableRateLimitHeaders"]; + this.httpStatusCode = _data["httpStatusCode"]; + } + } + + static fromJS(data: any): FileRateLimitOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileRateLimitOptions(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["clientIdHeader"] = this.clientIdHeader; + data["quotaExceededMessage"] = this.quotaExceededMessage; + data["rateLimitCounterPrefix"] = this.rateLimitCounterPrefix; + data["disableRateLimitHeaders"] = this.disableRateLimitHeaders; + data["httpStatusCode"] = this.httpStatusCode; + return data; + } } export interface IFileRateLimitOptions { - clientIdHeader: string | undefined; - quotaExceededMessage: string | undefined; - rateLimitCounterPrefix: string | undefined; - disableRateLimitHeaders: boolean; - httpStatusCode: number; + clientIdHeader: string | undefined; + quotaExceededMessage: string | undefined; + rateLimitCounterPrefix: string | undefined; + disableRateLimitHeaders: boolean; + httpStatusCode: number; } export class FileRateLimitRule implements IFileRateLimitRule { - clientWhitelist!: string[] | undefined; - enableRateLimiting!: boolean; - period!: string | undefined; - periodTimespan!: number; - limit!: number; - - constructor(data?: IFileRateLimitRule) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['clientWhitelist'])) { - this.clientWhitelist = [] as any; - for (let item of _data['clientWhitelist']) this.clientWhitelist!.push(item); - } - this.enableRateLimiting = _data['enableRateLimiting']; - this.period = _data['period']; - this.periodTimespan = _data['periodTimespan']; - this.limit = _data['limit']; - } - } - - static fromJS(data: any): FileRateLimitRule { - data = typeof data === 'object' ? data : {}; - let result = new FileRateLimitRule(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.clientWhitelist)) { - data['clientWhitelist'] = []; - for (let item of this.clientWhitelist) data['clientWhitelist'].push(item); - } - data['enableRateLimiting'] = this.enableRateLimiting; - data['period'] = this.period; - data['periodTimespan'] = this.periodTimespan; - data['limit'] = this.limit; - return data; - } + clientWhitelist!: string[] | undefined; + enableRateLimiting!: boolean; + period!: string | undefined; + periodTimespan!: number; + limit!: number; + + constructor(data?: IFileRateLimitRule) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["clientWhitelist"])) { + this.clientWhitelist = [] as any; + for (let item of _data["clientWhitelist"]) + this.clientWhitelist!.push(item); + } + this.enableRateLimiting = _data["enableRateLimiting"]; + this.period = _data["period"]; + this.periodTimespan = _data["periodTimespan"]; + this.limit = _data["limit"]; + } + } + + static fromJS(data: any): FileRateLimitRule { + data = typeof data === 'object' ? data : {}; + let result = new FileRateLimitRule(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.clientWhitelist)) { + data["clientWhitelist"] = []; + for (let item of this.clientWhitelist) + data["clientWhitelist"].push(item); + } + data["enableRateLimiting"] = this.enableRateLimiting; + data["period"] = this.period; + data["periodTimespan"] = this.periodTimespan; + data["limit"] = this.limit; + return data; + } } export interface IFileRateLimitRule { - clientWhitelist: string[] | undefined; - enableRateLimiting: boolean; - period: string | undefined; - periodTimespan: number; - limit: number; + clientWhitelist: string[] | undefined; + enableRateLimiting: boolean; + period: string | undefined; + periodTimespan: number; + limit: number; } export class FileRoute implements IFileRoute { - downstreamPathTemplate!: string | undefined; - upstreamPathTemplate!: string | undefined; - upstreamHttpMethod!: string[] | undefined; - downstreamHttpMethod!: string | undefined; - addHeadersToRequest!: { [key: string]: string } | undefined; - upstreamHeaderTransform!: { [key: string]: string } | undefined; - downstreamHeaderTransform!: { [key: string]: string } | undefined; - addClaimsToRequest!: { [key: string]: string } | undefined; - routeClaimsRequirement!: { [key: string]: string } | undefined; - addQueriesToRequest!: { [key: string]: string } | undefined; - changeDownstreamPathTemplate!: { [key: string]: string } | undefined; - requestIdKey!: string | undefined; - fileCacheOptions!: FileCacheOptions; - routeIsCaseSensitive!: boolean; - serviceName!: string | undefined; - serviceNamespace!: string | undefined; - downstreamScheme!: string | undefined; - qoSOptions!: FileQoSOptions; - loadBalancerOptions!: FileLoadBalancerOptions; - rateLimitOptions!: FileRateLimitRule; - authenticationOptions!: FileAuthenticationOptions; - httpHandlerOptions!: FileHttpHandlerOptions; - downstreamHostAndPorts!: FileHostAndPort[] | undefined; - upstreamHost!: string | undefined; - key!: string | undefined; - delegatingHandlers!: string[] | undefined; - priority!: number; - timeout!: number; - dangerousAcceptAnyServerCertificateValidator!: boolean; - securityOptions!: FileSecurityOptions; - downstreamHttpVersion!: string | undefined; - - constructor(data?: IFileRoute) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.downstreamPathTemplate = _data['downstreamPathTemplate']; - this.upstreamPathTemplate = _data['upstreamPathTemplate']; - if (Array.isArray(_data['upstreamHttpMethod'])) { - this.upstreamHttpMethod = [] as any; - for (let item of _data['upstreamHttpMethod']) this.upstreamHttpMethod!.push(item); - } - this.downstreamHttpMethod = _data['downstreamHttpMethod']; - if (_data['addHeadersToRequest']) { - this.addHeadersToRequest = {} as any; - for (let key in _data['addHeadersToRequest']) { - if (_data['addHeadersToRequest'].hasOwnProperty(key)) - (this.addHeadersToRequest)![key] = _data['addHeadersToRequest'][key]; - } - } - if (_data['upstreamHeaderTransform']) { - this.upstreamHeaderTransform = {} as any; - for (let key in _data['upstreamHeaderTransform']) { - if (_data['upstreamHeaderTransform'].hasOwnProperty(key)) - (this.upstreamHeaderTransform)![key] = _data['upstreamHeaderTransform'][key]; - } - } - if (_data['downstreamHeaderTransform']) { - this.downstreamHeaderTransform = {} as any; - for (let key in _data['downstreamHeaderTransform']) { - if (_data['downstreamHeaderTransform'].hasOwnProperty(key)) - (this.downstreamHeaderTransform)![key] = _data['downstreamHeaderTransform'][key]; - } - } - if (_data['addClaimsToRequest']) { - this.addClaimsToRequest = {} as any; - for (let key in _data['addClaimsToRequest']) { - if (_data['addClaimsToRequest'].hasOwnProperty(key)) - (this.addClaimsToRequest)![key] = _data['addClaimsToRequest'][key]; - } - } - if (_data['routeClaimsRequirement']) { - this.routeClaimsRequirement = {} as any; - for (let key in _data['routeClaimsRequirement']) { - if (_data['routeClaimsRequirement'].hasOwnProperty(key)) - (this.routeClaimsRequirement)![key] = _data['routeClaimsRequirement'][key]; - } - } - if (_data['addQueriesToRequest']) { - this.addQueriesToRequest = {} as any; - for (let key in _data['addQueriesToRequest']) { - if (_data['addQueriesToRequest'].hasOwnProperty(key)) - (this.addQueriesToRequest)![key] = _data['addQueriesToRequest'][key]; - } - } - if (_data['changeDownstreamPathTemplate']) { - this.changeDownstreamPathTemplate = {} as any; - for (let key in _data['changeDownstreamPathTemplate']) { - if (_data['changeDownstreamPathTemplate'].hasOwnProperty(key)) - (this.changeDownstreamPathTemplate)![key] = - _data['changeDownstreamPathTemplate'][key]; - } - } - this.requestIdKey = _data['requestIdKey']; - this.fileCacheOptions = _data['fileCacheOptions'] - ? FileCacheOptions.fromJS(_data['fileCacheOptions']) - : undefined; - this.routeIsCaseSensitive = _data['routeIsCaseSensitive']; - this.serviceName = _data['serviceName']; - this.serviceNamespace = _data['serviceNamespace']; - this.downstreamScheme = _data['downstreamScheme']; - this.qoSOptions = _data['qoSOptions'] - ? FileQoSOptions.fromJS(_data['qoSOptions']) - : undefined; - this.loadBalancerOptions = _data['loadBalancerOptions'] - ? FileLoadBalancerOptions.fromJS(_data['loadBalancerOptions']) - : undefined; - this.rateLimitOptions = _data['rateLimitOptions'] - ? FileRateLimitRule.fromJS(_data['rateLimitOptions']) - : undefined; - this.authenticationOptions = _data['authenticationOptions'] - ? FileAuthenticationOptions.fromJS(_data['authenticationOptions']) - : undefined; - this.httpHandlerOptions = _data['httpHandlerOptions'] - ? FileHttpHandlerOptions.fromJS(_data['httpHandlerOptions']) - : undefined; - if (Array.isArray(_data['downstreamHostAndPorts'])) { - this.downstreamHostAndPorts = [] as any; - for (let item of _data['downstreamHostAndPorts']) - this.downstreamHostAndPorts!.push(FileHostAndPort.fromJS(item)); - } - this.upstreamHost = _data['upstreamHost']; - this.key = _data['key']; - if (Array.isArray(_data['delegatingHandlers'])) { - this.delegatingHandlers = [] as any; - for (let item of _data['delegatingHandlers']) this.delegatingHandlers!.push(item); - } - this.priority = _data['priority']; - this.timeout = _data['timeout']; - this.dangerousAcceptAnyServerCertificateValidator = - _data['dangerousAcceptAnyServerCertificateValidator']; - this.securityOptions = _data['securityOptions'] - ? FileSecurityOptions.fromJS(_data['securityOptions']) - : undefined; - this.downstreamHttpVersion = _data['downstreamHttpVersion']; - } - } - - static fromJS(data: any): FileRoute { - data = typeof data === 'object' ? data : {}; - let result = new FileRoute(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['downstreamPathTemplate'] = this.downstreamPathTemplate; - data['upstreamPathTemplate'] = this.upstreamPathTemplate; - if (Array.isArray(this.upstreamHttpMethod)) { - data['upstreamHttpMethod'] = []; - for (let item of this.upstreamHttpMethod) data['upstreamHttpMethod'].push(item); - } - data['downstreamHttpMethod'] = this.downstreamHttpMethod; - if (this.addHeadersToRequest) { - data['addHeadersToRequest'] = {}; - for (let key in this.addHeadersToRequest) { - if (this.addHeadersToRequest.hasOwnProperty(key)) - (data['addHeadersToRequest'])[key] = (this.addHeadersToRequest)[key]; - } - } - if (this.upstreamHeaderTransform) { - data['upstreamHeaderTransform'] = {}; - for (let key in this.upstreamHeaderTransform) { - if (this.upstreamHeaderTransform.hasOwnProperty(key)) - (data['upstreamHeaderTransform'])[key] = (this.upstreamHeaderTransform)[key]; - } - } - if (this.downstreamHeaderTransform) { - data['downstreamHeaderTransform'] = {}; - for (let key in this.downstreamHeaderTransform) { - if (this.downstreamHeaderTransform.hasOwnProperty(key)) - (data['downstreamHeaderTransform'])[key] = (this.downstreamHeaderTransform)[ - key - ]; - } - } - if (this.addClaimsToRequest) { - data['addClaimsToRequest'] = {}; - for (let key in this.addClaimsToRequest) { - if (this.addClaimsToRequest.hasOwnProperty(key)) - (data['addClaimsToRequest'])[key] = (this.addClaimsToRequest)[key]; - } - } - if (this.routeClaimsRequirement) { - data['routeClaimsRequirement'] = {}; - for (let key in this.routeClaimsRequirement) { - if (this.routeClaimsRequirement.hasOwnProperty(key)) - (data['routeClaimsRequirement'])[key] = (this.routeClaimsRequirement)[key]; - } - } - if (this.addQueriesToRequest) { - data['addQueriesToRequest'] = {}; - for (let key in this.addQueriesToRequest) { - if (this.addQueriesToRequest.hasOwnProperty(key)) - (data['addQueriesToRequest'])[key] = (this.addQueriesToRequest)[key]; - } - } - if (this.changeDownstreamPathTemplate) { - data['changeDownstreamPathTemplate'] = {}; - for (let key in this.changeDownstreamPathTemplate) { - if (this.changeDownstreamPathTemplate.hasOwnProperty(key)) - (data['changeDownstreamPathTemplate'])[key] = (( - this.changeDownstreamPathTemplate - ))[key]; - } - } - data['requestIdKey'] = this.requestIdKey; - data['fileCacheOptions'] = this.fileCacheOptions - ? this.fileCacheOptions.toJSON() - : undefined; - data['routeIsCaseSensitive'] = this.routeIsCaseSensitive; - data['serviceName'] = this.serviceName; - data['serviceNamespace'] = this.serviceNamespace; - data['downstreamScheme'] = this.downstreamScheme; - data['qoSOptions'] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; - data['loadBalancerOptions'] = this.loadBalancerOptions - ? this.loadBalancerOptions.toJSON() - : undefined; - data['rateLimitOptions'] = this.rateLimitOptions - ? this.rateLimitOptions.toJSON() - : undefined; - data['authenticationOptions'] = this.authenticationOptions - ? this.authenticationOptions.toJSON() - : undefined; - data['httpHandlerOptions'] = this.httpHandlerOptions - ? this.httpHandlerOptions.toJSON() - : undefined; - if (Array.isArray(this.downstreamHostAndPorts)) { - data['downstreamHostAndPorts'] = []; - for (let item of this.downstreamHostAndPorts) - data['downstreamHostAndPorts'].push(item.toJSON()); - } - data['upstreamHost'] = this.upstreamHost; - data['key'] = this.key; - if (Array.isArray(this.delegatingHandlers)) { - data['delegatingHandlers'] = []; - for (let item of this.delegatingHandlers) data['delegatingHandlers'].push(item); - } - data['priority'] = this.priority; - data['timeout'] = this.timeout; - data['dangerousAcceptAnyServerCertificateValidator'] = - this.dangerousAcceptAnyServerCertificateValidator; - data['securityOptions'] = this.securityOptions ? this.securityOptions.toJSON() : undefined; - data['downstreamHttpVersion'] = this.downstreamHttpVersion; - return data; - } + downstreamPathTemplate!: string | undefined; + upstreamPathTemplate!: string | undefined; + upstreamHttpMethod!: string[] | undefined; + downstreamHttpMethod!: string | undefined; + addHeadersToRequest!: { [key: string]: string; } | undefined; + upstreamHeaderTransform!: { [key: string]: string; } | undefined; + downstreamHeaderTransform!: { [key: string]: string; } | undefined; + addClaimsToRequest!: { [key: string]: string; } | undefined; + routeClaimsRequirement!: { [key: string]: string; } | undefined; + addQueriesToRequest!: { [key: string]: string; } | undefined; + changeDownstreamPathTemplate!: { [key: string]: string; } | undefined; + requestIdKey!: string | undefined; + fileCacheOptions!: FileCacheOptions; + routeIsCaseSensitive!: boolean; + serviceName!: string | undefined; + serviceNamespace!: string | undefined; + downstreamScheme!: string | undefined; + qoSOptions!: FileQoSOptions; + loadBalancerOptions!: FileLoadBalancerOptions; + rateLimitOptions!: FileRateLimitRule; + authenticationOptions!: FileAuthenticationOptions; + httpHandlerOptions!: FileHttpHandlerOptions; + downstreamHostAndPorts!: FileHostAndPort[] | undefined; + upstreamHost!: string | undefined; + key!: string | undefined; + delegatingHandlers!: string[] | undefined; + priority!: number; + timeout!: number; + dangerousAcceptAnyServerCertificateValidator!: boolean; + securityOptions!: FileSecurityOptions; + downstreamHttpVersion!: string | undefined; + + constructor(data?: IFileRoute) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.downstreamPathTemplate = _data["downstreamPathTemplate"]; + this.upstreamPathTemplate = _data["upstreamPathTemplate"]; + if (Array.isArray(_data["upstreamHttpMethod"])) { + this.upstreamHttpMethod = [] as any; + for (let item of _data["upstreamHttpMethod"]) + this.upstreamHttpMethod!.push(item); + } + this.downstreamHttpMethod = _data["downstreamHttpMethod"]; + if (_data["addHeadersToRequest"]) { + this.addHeadersToRequest = {} as any; + for (let key in _data["addHeadersToRequest"]) { + if (_data["addHeadersToRequest"].hasOwnProperty(key)) + (this.addHeadersToRequest)![key] = _data["addHeadersToRequest"][key]; + } + } + if (_data["upstreamHeaderTransform"]) { + this.upstreamHeaderTransform = {} as any; + for (let key in _data["upstreamHeaderTransform"]) { + if (_data["upstreamHeaderTransform"].hasOwnProperty(key)) + (this.upstreamHeaderTransform)![key] = _data["upstreamHeaderTransform"][key]; + } + } + if (_data["downstreamHeaderTransform"]) { + this.downstreamHeaderTransform = {} as any; + for (let key in _data["downstreamHeaderTransform"]) { + if (_data["downstreamHeaderTransform"].hasOwnProperty(key)) + (this.downstreamHeaderTransform)![key] = _data["downstreamHeaderTransform"][key]; + } + } + if (_data["addClaimsToRequest"]) { + this.addClaimsToRequest = {} as any; + for (let key in _data["addClaimsToRequest"]) { + if (_data["addClaimsToRequest"].hasOwnProperty(key)) + (this.addClaimsToRequest)![key] = _data["addClaimsToRequest"][key]; + } + } + if (_data["routeClaimsRequirement"]) { + this.routeClaimsRequirement = {} as any; + for (let key in _data["routeClaimsRequirement"]) { + if (_data["routeClaimsRequirement"].hasOwnProperty(key)) + (this.routeClaimsRequirement)![key] = _data["routeClaimsRequirement"][key]; + } + } + if (_data["addQueriesToRequest"]) { + this.addQueriesToRequest = {} as any; + for (let key in _data["addQueriesToRequest"]) { + if (_data["addQueriesToRequest"].hasOwnProperty(key)) + (this.addQueriesToRequest)![key] = _data["addQueriesToRequest"][key]; + } + } + if (_data["changeDownstreamPathTemplate"]) { + this.changeDownstreamPathTemplate = {} as any; + for (let key in _data["changeDownstreamPathTemplate"]) { + if (_data["changeDownstreamPathTemplate"].hasOwnProperty(key)) + (this.changeDownstreamPathTemplate)![key] = _data["changeDownstreamPathTemplate"][key]; + } + } + this.requestIdKey = _data["requestIdKey"]; + this.fileCacheOptions = _data["fileCacheOptions"] ? FileCacheOptions.fromJS(_data["fileCacheOptions"]) : undefined; + this.routeIsCaseSensitive = _data["routeIsCaseSensitive"]; + this.serviceName = _data["serviceName"]; + this.serviceNamespace = _data["serviceNamespace"]; + this.downstreamScheme = _data["downstreamScheme"]; + this.qoSOptions = _data["qoSOptions"] ? FileQoSOptions.fromJS(_data["qoSOptions"]) : undefined; + this.loadBalancerOptions = _data["loadBalancerOptions"] ? FileLoadBalancerOptions.fromJS(_data["loadBalancerOptions"]) : undefined; + this.rateLimitOptions = _data["rateLimitOptions"] ? FileRateLimitRule.fromJS(_data["rateLimitOptions"]) : undefined; + this.authenticationOptions = _data["authenticationOptions"] ? FileAuthenticationOptions.fromJS(_data["authenticationOptions"]) : undefined; + this.httpHandlerOptions = _data["httpHandlerOptions"] ? FileHttpHandlerOptions.fromJS(_data["httpHandlerOptions"]) : undefined; + if (Array.isArray(_data["downstreamHostAndPorts"])) { + this.downstreamHostAndPorts = [] as any; + for (let item of _data["downstreamHostAndPorts"]) + this.downstreamHostAndPorts!.push(FileHostAndPort.fromJS(item)); + } + this.upstreamHost = _data["upstreamHost"]; + this.key = _data["key"]; + if (Array.isArray(_data["delegatingHandlers"])) { + this.delegatingHandlers = [] as any; + for (let item of _data["delegatingHandlers"]) + this.delegatingHandlers!.push(item); + } + this.priority = _data["priority"]; + this.timeout = _data["timeout"]; + this.dangerousAcceptAnyServerCertificateValidator = _data["dangerousAcceptAnyServerCertificateValidator"]; + this.securityOptions = _data["securityOptions"] ? FileSecurityOptions.fromJS(_data["securityOptions"]) : undefined; + this.downstreamHttpVersion = _data["downstreamHttpVersion"]; + } + } + + static fromJS(data: any): FileRoute { + data = typeof data === 'object' ? data : {}; + let result = new FileRoute(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["downstreamPathTemplate"] = this.downstreamPathTemplate; + data["upstreamPathTemplate"] = this.upstreamPathTemplate; + if (Array.isArray(this.upstreamHttpMethod)) { + data["upstreamHttpMethod"] = []; + for (let item of this.upstreamHttpMethod) + data["upstreamHttpMethod"].push(item); + } + data["downstreamHttpMethod"] = this.downstreamHttpMethod; + if (this.addHeadersToRequest) { + data["addHeadersToRequest"] = {}; + for (let key in this.addHeadersToRequest) { + if (this.addHeadersToRequest.hasOwnProperty(key)) + (data["addHeadersToRequest"])[key] = (this.addHeadersToRequest)[key]; + } + } + if (this.upstreamHeaderTransform) { + data["upstreamHeaderTransform"] = {}; + for (let key in this.upstreamHeaderTransform) { + if (this.upstreamHeaderTransform.hasOwnProperty(key)) + (data["upstreamHeaderTransform"])[key] = (this.upstreamHeaderTransform)[key]; + } + } + if (this.downstreamHeaderTransform) { + data["downstreamHeaderTransform"] = {}; + for (let key in this.downstreamHeaderTransform) { + if (this.downstreamHeaderTransform.hasOwnProperty(key)) + (data["downstreamHeaderTransform"])[key] = (this.downstreamHeaderTransform)[key]; + } + } + if (this.addClaimsToRequest) { + data["addClaimsToRequest"] = {}; + for (let key in this.addClaimsToRequest) { + if (this.addClaimsToRequest.hasOwnProperty(key)) + (data["addClaimsToRequest"])[key] = (this.addClaimsToRequest)[key]; + } + } + if (this.routeClaimsRequirement) { + data["routeClaimsRequirement"] = {}; + for (let key in this.routeClaimsRequirement) { + if (this.routeClaimsRequirement.hasOwnProperty(key)) + (data["routeClaimsRequirement"])[key] = (this.routeClaimsRequirement)[key]; + } + } + if (this.addQueriesToRequest) { + data["addQueriesToRequest"] = {}; + for (let key in this.addQueriesToRequest) { + if (this.addQueriesToRequest.hasOwnProperty(key)) + (data["addQueriesToRequest"])[key] = (this.addQueriesToRequest)[key]; + } + } + if (this.changeDownstreamPathTemplate) { + data["changeDownstreamPathTemplate"] = {}; + for (let key in this.changeDownstreamPathTemplate) { + if (this.changeDownstreamPathTemplate.hasOwnProperty(key)) + (data["changeDownstreamPathTemplate"])[key] = (this.changeDownstreamPathTemplate)[key]; + } + } + data["requestIdKey"] = this.requestIdKey; + data["fileCacheOptions"] = this.fileCacheOptions ? this.fileCacheOptions.toJSON() : undefined; + data["routeIsCaseSensitive"] = this.routeIsCaseSensitive; + data["serviceName"] = this.serviceName; + data["serviceNamespace"] = this.serviceNamespace; + data["downstreamScheme"] = this.downstreamScheme; + data["qoSOptions"] = this.qoSOptions ? this.qoSOptions.toJSON() : undefined; + data["loadBalancerOptions"] = this.loadBalancerOptions ? this.loadBalancerOptions.toJSON() : undefined; + data["rateLimitOptions"] = this.rateLimitOptions ? this.rateLimitOptions.toJSON() : undefined; + data["authenticationOptions"] = this.authenticationOptions ? this.authenticationOptions.toJSON() : undefined; + data["httpHandlerOptions"] = this.httpHandlerOptions ? this.httpHandlerOptions.toJSON() : undefined; + if (Array.isArray(this.downstreamHostAndPorts)) { + data["downstreamHostAndPorts"] = []; + for (let item of this.downstreamHostAndPorts) + data["downstreamHostAndPorts"].push(item.toJSON()); + } + data["upstreamHost"] = this.upstreamHost; + data["key"] = this.key; + if (Array.isArray(this.delegatingHandlers)) { + data["delegatingHandlers"] = []; + for (let item of this.delegatingHandlers) + data["delegatingHandlers"].push(item); + } + data["priority"] = this.priority; + data["timeout"] = this.timeout; + data["dangerousAcceptAnyServerCertificateValidator"] = this.dangerousAcceptAnyServerCertificateValidator; + data["securityOptions"] = this.securityOptions ? this.securityOptions.toJSON() : undefined; + data["downstreamHttpVersion"] = this.downstreamHttpVersion; + return data; + } } export interface IFileRoute { - downstreamPathTemplate: string | undefined; - upstreamPathTemplate: string | undefined; - upstreamHttpMethod: string[] | undefined; - downstreamHttpMethod: string | undefined; - addHeadersToRequest: { [key: string]: string } | undefined; - upstreamHeaderTransform: { [key: string]: string } | undefined; - downstreamHeaderTransform: { [key: string]: string } | undefined; - addClaimsToRequest: { [key: string]: string } | undefined; - routeClaimsRequirement: { [key: string]: string } | undefined; - addQueriesToRequest: { [key: string]: string } | undefined; - changeDownstreamPathTemplate: { [key: string]: string } | undefined; - requestIdKey: string | undefined; - fileCacheOptions: FileCacheOptions; - routeIsCaseSensitive: boolean; - serviceName: string | undefined; - serviceNamespace: string | undefined; - downstreamScheme: string | undefined; - qoSOptions: FileQoSOptions; - loadBalancerOptions: FileLoadBalancerOptions; - rateLimitOptions: FileRateLimitRule; - authenticationOptions: FileAuthenticationOptions; - httpHandlerOptions: FileHttpHandlerOptions; - downstreamHostAndPorts: FileHostAndPort[] | undefined; - upstreamHost: string | undefined; - key: string | undefined; - delegatingHandlers: string[] | undefined; - priority: number; - timeout: number; - dangerousAcceptAnyServerCertificateValidator: boolean; - securityOptions: FileSecurityOptions; - downstreamHttpVersion: string | undefined; + downstreamPathTemplate: string | undefined; + upstreamPathTemplate: string | undefined; + upstreamHttpMethod: string[] | undefined; + downstreamHttpMethod: string | undefined; + addHeadersToRequest: { [key: string]: string; } | undefined; + upstreamHeaderTransform: { [key: string]: string; } | undefined; + downstreamHeaderTransform: { [key: string]: string; } | undefined; + addClaimsToRequest: { [key: string]: string; } | undefined; + routeClaimsRequirement: { [key: string]: string; } | undefined; + addQueriesToRequest: { [key: string]: string; } | undefined; + changeDownstreamPathTemplate: { [key: string]: string; } | undefined; + requestIdKey: string | undefined; + fileCacheOptions: FileCacheOptions; + routeIsCaseSensitive: boolean; + serviceName: string | undefined; + serviceNamespace: string | undefined; + downstreamScheme: string | undefined; + qoSOptions: FileQoSOptions; + loadBalancerOptions: FileLoadBalancerOptions; + rateLimitOptions: FileRateLimitRule; + authenticationOptions: FileAuthenticationOptions; + httpHandlerOptions: FileHttpHandlerOptions; + downstreamHostAndPorts: FileHostAndPort[] | undefined; + upstreamHost: string | undefined; + key: string | undefined; + delegatingHandlers: string[] | undefined; + priority: number; + timeout: number; + dangerousAcceptAnyServerCertificateValidator: boolean; + securityOptions: FileSecurityOptions; + downstreamHttpVersion: string | undefined; } export class FileSecurityOptions implements IFileSecurityOptions { - ipAllowedList!: string[] | undefined; - ipBlockedList!: string[] | undefined; - - constructor(data?: IFileSecurityOptions) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['ipAllowedList'])) { - this.ipAllowedList = [] as any; - for (let item of _data['ipAllowedList']) this.ipAllowedList!.push(item); - } - if (Array.isArray(_data['ipBlockedList'])) { - this.ipBlockedList = [] as any; - for (let item of _data['ipBlockedList']) this.ipBlockedList!.push(item); - } - } - } - - static fromJS(data: any): FileSecurityOptions { - data = typeof data === 'object' ? data : {}; - let result = new FileSecurityOptions(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.ipAllowedList)) { - data['ipAllowedList'] = []; - for (let item of this.ipAllowedList) data['ipAllowedList'].push(item); - } - if (Array.isArray(this.ipBlockedList)) { - data['ipBlockedList'] = []; - for (let item of this.ipBlockedList) data['ipBlockedList'].push(item); - } - return data; - } + ipAllowedList!: string[] | undefined; + ipBlockedList!: string[] | undefined; + + constructor(data?: IFileSecurityOptions) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["ipAllowedList"])) { + this.ipAllowedList = [] as any; + for (let item of _data["ipAllowedList"]) + this.ipAllowedList!.push(item); + } + if (Array.isArray(_data["ipBlockedList"])) { + this.ipBlockedList = [] as any; + for (let item of _data["ipBlockedList"]) + this.ipBlockedList!.push(item); + } + } + } + + static fromJS(data: any): FileSecurityOptions { + data = typeof data === 'object' ? data : {}; + let result = new FileSecurityOptions(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.ipAllowedList)) { + data["ipAllowedList"] = []; + for (let item of this.ipAllowedList) + data["ipAllowedList"].push(item); + } + if (Array.isArray(this.ipBlockedList)) { + data["ipBlockedList"] = []; + for (let item of this.ipBlockedList) + data["ipBlockedList"].push(item); + } + return data; + } } export interface IFileSecurityOptions { - ipAllowedList: string[] | undefined; - ipBlockedList: string[] | undefined; + ipAllowedList: string[] | undefined; + ipBlockedList: string[] | undefined; } export class FileServiceDiscoveryProvider implements IFileServiceDiscoveryProvider { - scheme!: string | undefined; - host!: string | undefined; - port!: number; - type!: string | undefined; - token!: string | undefined; - configurationKey!: string | undefined; - pollingInterval!: number; - namespace!: string | undefined; - - constructor(data?: IFileServiceDiscoveryProvider) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.scheme = _data['scheme']; - this.host = _data['host']; - this.port = _data['port']; - this.type = _data['type']; - this.token = _data['token']; - this.configurationKey = _data['configurationKey']; - this.pollingInterval = _data['pollingInterval']; - this.namespace = _data['namespace']; - } - } - - static fromJS(data: any): FileServiceDiscoveryProvider { - data = typeof data === 'object' ? data : {}; - let result = new FileServiceDiscoveryProvider(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['scheme'] = this.scheme; - data['host'] = this.host; - data['port'] = this.port; - data['type'] = this.type; - data['token'] = this.token; - data['configurationKey'] = this.configurationKey; - data['pollingInterval'] = this.pollingInterval; - data['namespace'] = this.namespace; - return data; - } + scheme!: string | undefined; + host!: string | undefined; + port!: number; + type!: string | undefined; + token!: string | undefined; + configurationKey!: string | undefined; + pollingInterval!: number; + namespace!: string | undefined; + + constructor(data?: IFileServiceDiscoveryProvider) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.scheme = _data["scheme"]; + this.host = _data["host"]; + this.port = _data["port"]; + this.type = _data["type"]; + this.token = _data["token"]; + this.configurationKey = _data["configurationKey"]; + this.pollingInterval = _data["pollingInterval"]; + this.namespace = _data["namespace"]; + } + } + + static fromJS(data: any): FileServiceDiscoveryProvider { + data = typeof data === 'object' ? data : {}; + let result = new FileServiceDiscoveryProvider(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["scheme"] = this.scheme; + data["host"] = this.host; + data["port"] = this.port; + data["type"] = this.type; + data["token"] = this.token; + data["configurationKey"] = this.configurationKey; + data["pollingInterval"] = this.pollingInterval; + data["namespace"] = this.namespace; + return data; + } } export interface IFileServiceDiscoveryProvider { - scheme: string | undefined; - host: string | undefined; - port: number; - type: string | undefined; - token: string | undefined; - configurationKey: string | undefined; - pollingInterval: number; - namespace: string | undefined; + scheme: string | undefined; + host: string | undefined; + port: number; + type: string | undefined; + token: string | undefined; + configurationKey: string | undefined; + pollingInterval: number; + namespace: string | undefined; } export class FindTenantByNameInput implements IFindTenantByNameInput { - name!: string | undefined; + name!: string | undefined; - constructor(data?: IFindTenantByNameInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IFindTenantByNameInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.name = _data['name']; + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + } } - } - static fromJS(data: any): FindTenantByNameInput { - data = typeof data === 'object' ? data : {}; - let result = new FindTenantByNameInput(); - result.init(data); - return result; - } + static fromJS(data: any): FindTenantByNameInput { + data = typeof data === 'object' ? data : {}; + let result = new FindTenantByNameInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + return data; + } } export interface IFindTenantByNameInput { - name: string | undefined; + name: string | undefined; } export class FindTenantResultDto implements IFindTenantResultDto { - success!: boolean; - tenantId!: string | undefined; - name!: string | undefined; - isActive!: boolean; - - constructor(data?: IFindTenantResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.success = _data['success']; - this.tenantId = _data['tenantId']; - this.name = _data['name']; - this.isActive = _data['isActive']; - } - } - - static fromJS(data: any): FindTenantResultDto { - data = typeof data === 'object' ? data : {}; - let result = new FindTenantResultDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['success'] = this.success; - data['tenantId'] = this.tenantId; - data['name'] = this.name; - data['isActive'] = this.isActive; - return data; - } + success!: boolean; + tenantId!: string | undefined; + name!: string | undefined; + isActive!: boolean; + + constructor(data?: IFindTenantResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.success = _data["success"]; + this.tenantId = _data["tenantId"]; + this.name = _data["name"]; + this.isActive = _data["isActive"]; + } + } + + static fromJS(data: any): FindTenantResultDto { + data = typeof data === 'object' ? data : {}; + let result = new FindTenantResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["success"] = this.success; + data["tenantId"] = this.tenantId; + data["name"] = this.name; + data["isActive"] = this.isActive; + return data; + } } export interface IFindTenantResultDto { - success: boolean; - tenantId: string | undefined; - name: string | undefined; - isActive: boolean; + success: boolean; + tenantId: string | undefined; + name: string | undefined; + isActive: boolean; } export class GetAuditLogPageListOutput implements IGetAuditLogPageListOutput { - applicationName!: string | undefined; - userId!: string | undefined; - userName!: string | undefined; - tenantId!: string | undefined; - tenantName!: string | undefined; - impersonatorUserId!: string | undefined; - impersonatorTenantId!: string | undefined; - executionTime!: dayjs.Dayjs; - executionDuration!: number; - clientIpAddress!: string | undefined; - clientName!: string | undefined; - clientId!: string | undefined; - correlationId!: string | undefined; - browserInfo!: string | undefined; - httpMethod!: string | undefined; - url!: string | undefined; - exceptions!: string | undefined; - comments!: string | undefined; - httpStatusCode!: number | undefined; - - constructor(data?: IGetAuditLogPageListOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.applicationName = _data['applicationName']; - this.userId = _data['userId']; - this.userName = _data['userName']; - this.tenantId = _data['tenantId']; - this.tenantName = _data['tenantName']; - this.impersonatorUserId = _data['impersonatorUserId']; - this.impersonatorTenantId = _data['impersonatorTenantId']; - this.executionTime = _data['executionTime'] - ? dayjs(_data['executionTime'].toString()) - : undefined; - this.executionDuration = _data['executionDuration']; - this.clientIpAddress = _data['clientIpAddress']; - this.clientName = _data['clientName']; - this.clientId = _data['clientId']; - this.correlationId = _data['correlationId']; - this.browserInfo = _data['browserInfo']; - this.httpMethod = _data['httpMethod']; - this.url = _data['url']; - this.exceptions = _data['exceptions']; - this.comments = _data['comments']; - this.httpStatusCode = _data['httpStatusCode']; - } - } - - static fromJS(data: any): GetAuditLogPageListOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetAuditLogPageListOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['applicationName'] = this.applicationName; - data['userId'] = this.userId; - data['userName'] = this.userName; - data['tenantId'] = this.tenantId; - data['tenantName'] = this.tenantName; - data['impersonatorUserId'] = this.impersonatorUserId; - data['impersonatorTenantId'] = this.impersonatorTenantId; - data['executionTime'] = this.executionTime ? this.executionTime.toISOString() : undefined; - data['executionDuration'] = this.executionDuration; - data['clientIpAddress'] = this.clientIpAddress; - data['clientName'] = this.clientName; - data['clientId'] = this.clientId; - data['correlationId'] = this.correlationId; - data['browserInfo'] = this.browserInfo; - data['httpMethod'] = this.httpMethod; - data['url'] = this.url; - data['exceptions'] = this.exceptions; - data['comments'] = this.comments; - data['httpStatusCode'] = this.httpStatusCode; - return data; - } + applicationName!: string | undefined; + userId!: string | undefined; + userName!: string | undefined; + tenantId!: string | undefined; + tenantName!: string | undefined; + impersonatorUserId!: string | undefined; + impersonatorTenantId!: string | undefined; + executionTime!: dayjs.Dayjs; + executionDuration!: number; + clientIpAddress!: string | undefined; + clientName!: string | undefined; + clientId!: string | undefined; + correlationId!: string | undefined; + browserInfo!: string | undefined; + httpMethod!: string | undefined; + url!: string | undefined; + exceptions!: string | undefined; + comments!: string | undefined; + httpStatusCode!: number | undefined; + + constructor(data?: IGetAuditLogPageListOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.applicationName = _data["applicationName"]; + this.userId = _data["userId"]; + this.userName = _data["userName"]; + this.tenantId = _data["tenantId"]; + this.tenantName = _data["tenantName"]; + this.impersonatorUserId = _data["impersonatorUserId"]; + this.impersonatorTenantId = _data["impersonatorTenantId"]; + this.executionTime = _data["executionTime"] ? dayjs(_data["executionTime"].toString()) : undefined; + this.executionDuration = _data["executionDuration"]; + this.clientIpAddress = _data["clientIpAddress"]; + this.clientName = _data["clientName"]; + this.clientId = _data["clientId"]; + this.correlationId = _data["correlationId"]; + this.browserInfo = _data["browserInfo"]; + this.httpMethod = _data["httpMethod"]; + this.url = _data["url"]; + this.exceptions = _data["exceptions"]; + this.comments = _data["comments"]; + this.httpStatusCode = _data["httpStatusCode"]; + } + } + + static fromJS(data: any): GetAuditLogPageListOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetAuditLogPageListOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["applicationName"] = this.applicationName; + data["userId"] = this.userId; + data["userName"] = this.userName; + data["tenantId"] = this.tenantId; + data["tenantName"] = this.tenantName; + data["impersonatorUserId"] = this.impersonatorUserId; + data["impersonatorTenantId"] = this.impersonatorTenantId; + data["executionTime"] = this.executionTime ? this.executionTime.toISOString() : undefined; + data["executionDuration"] = this.executionDuration; + data["clientIpAddress"] = this.clientIpAddress; + data["clientName"] = this.clientName; + data["clientId"] = this.clientId; + data["correlationId"] = this.correlationId; + data["browserInfo"] = this.browserInfo; + data["httpMethod"] = this.httpMethod; + data["url"] = this.url; + data["exceptions"] = this.exceptions; + data["comments"] = this.comments; + data["httpStatusCode"] = this.httpStatusCode; + return data; + } } export interface IGetAuditLogPageListOutput { - applicationName: string | undefined; - userId: string | undefined; - userName: string | undefined; - tenantId: string | undefined; - tenantName: string | undefined; - impersonatorUserId: string | undefined; - impersonatorTenantId: string | undefined; - executionTime: dayjs.Dayjs; - executionDuration: number; - clientIpAddress: string | undefined; - clientName: string | undefined; - clientId: string | undefined; - correlationId: string | undefined; - browserInfo: string | undefined; - httpMethod: string | undefined; - url: string | undefined; - exceptions: string | undefined; - comments: string | undefined; - httpStatusCode: number | undefined; -} - -export class GetAuditLogPageListOutputPagedResultDto - implements IGetAuditLogPageListOutputPagedResultDto -{ - items!: GetAuditLogPageListOutput[] | undefined; - totalCount!: number; - - constructor(data?: IGetAuditLogPageListOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(GetAuditLogPageListOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; - } - } - - static fromJS(data: any): GetAuditLogPageListOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetAuditLogPageListOutputPagedResultDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); - } - data['totalCount'] = this.totalCount; - return data; - } + applicationName: string | undefined; + userId: string | undefined; + userName: string | undefined; + tenantId: string | undefined; + tenantName: string | undefined; + impersonatorUserId: string | undefined; + impersonatorTenantId: string | undefined; + executionTime: dayjs.Dayjs; + executionDuration: number; + clientIpAddress: string | undefined; + clientName: string | undefined; + clientId: string | undefined; + correlationId: string | undefined; + browserInfo: string | undefined; + httpMethod: string | undefined; + url: string | undefined; + exceptions: string | undefined; + comments: string | undefined; + httpStatusCode: number | undefined; +} + +export class GetAuditLogPageListOutputPagedResultDto implements IGetAuditLogPageListOutputPagedResultDto { + items!: GetAuditLogPageListOutput[] | undefined; + totalCount!: number; + + constructor(data?: IGetAuditLogPageListOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetAuditLogPageListOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): GetAuditLogPageListOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetAuditLogPageListOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } } export interface IGetAuditLogPageListOutputPagedResultDto { - items: GetAuditLogPageListOutput[] | undefined; - totalCount: number; + items: GetAuditLogPageListOutput[] | undefined; + totalCount: number; } export class GetOrganizationUnitRoleInput implements IGetOrganizationUnitRoleInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - - constructor(data?: IGetOrganizationUnitRoleInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.organizationUnitId = _data['organizationUnitId']; - } - } - - static fromJS(data: any): GetOrganizationUnitRoleInput { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitRoleInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['organizationUnitId'] = this.organizationUnitId; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; + + constructor(data?: IGetOrganizationUnitRoleInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; + } + } + + static fromJS(data: any): GetOrganizationUnitRoleInput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitRoleInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; + return data; + } } export interface IGetOrganizationUnitRoleInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; } export class GetOrganizationUnitRoleOutput implements IGetOrganizationUnitRoleOutput { - id!: string; - name!: string | undefined; + id!: string; + name!: string | undefined; - constructor(data?: IGetOrganizationUnitRoleOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IGetOrganizationUnitRoleOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.name = _data['name']; + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + } } - } - static fromJS(data: any): GetOrganizationUnitRoleOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitRoleOutput(); - result.init(data); - return result; - } + static fromJS(data: any): GetOrganizationUnitRoleOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitRoleOutput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['name'] = this.name; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["name"] = this.name; + return data; + } } export interface IGetOrganizationUnitRoleOutput { - id: string; - name: string | undefined; + id: string; + name: string | undefined; } -export class GetOrganizationUnitRoleOutputPagedResultDto - implements IGetOrganizationUnitRoleOutputPagedResultDto -{ - items!: GetOrganizationUnitRoleOutput[] | undefined; - totalCount!: number; +export class GetOrganizationUnitRoleOutputPagedResultDto implements IGetOrganizationUnitRoleOutputPagedResultDto { + items!: GetOrganizationUnitRoleOutput[] | undefined; + totalCount!: number; - constructor(data?: IGetOrganizationUnitRoleOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IGetOrganizationUnitRoleOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) - this.items!.push(GetOrganizationUnitRoleOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetOrganizationUnitRoleOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } } - } - static fromJS(data: any): GetOrganizationUnitRoleOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitRoleOutputPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): GetOrganizationUnitRoleOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitRoleOutputPagedResultDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; } - data['totalCount'] = this.totalCount; - return data; - } } export interface IGetOrganizationUnitRoleOutputPagedResultDto { - items: GetOrganizationUnitRoleOutput[] | undefined; - totalCount: number; + items: GetOrganizationUnitRoleOutput[] | undefined; + totalCount: number; } export class GetOrganizationUnitUserInput implements IGetOrganizationUnitUserInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - filter!: string | undefined; - - constructor(data?: IGetOrganizationUnitUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.organizationUnitId = _data['organizationUnitId']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): GetOrganizationUnitUserInput { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitUserInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['organizationUnitId'] = this.organizationUnitId; - data['filter'] = this.filter; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; + + constructor(data?: IGetOrganizationUnitUserInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): GetOrganizationUnitUserInput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitUserInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; + data["filter"] = this.filter; + return data; + } } export interface IGetOrganizationUnitUserInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } export class GetOrganizationUnitUserOutput implements IGetOrganizationUnitUserOutput { - id!: string; - userName!: string | undefined; - email!: string | undefined; - - constructor(data?: IGetOrganizationUnitUserOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.userName = _data['userName']; - this.email = _data['email']; - } - } - - static fromJS(data: any): GetOrganizationUnitUserOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitUserOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['userName'] = this.userName; - data['email'] = this.email; - return data; - } + id!: string; + userName!: string | undefined; + email!: string | undefined; + + constructor(data?: IGetOrganizationUnitUserOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.userName = _data["userName"]; + this.email = _data["email"]; + } + } + + static fromJS(data: any): GetOrganizationUnitUserOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitUserOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["userName"] = this.userName; + data["email"] = this.email; + return data; + } } export interface IGetOrganizationUnitUserOutput { - id: string; - userName: string | undefined; - email: string | undefined; -} - -export class GetOrganizationUnitUserOutputPagedResultDto - implements IGetOrganizationUnitUserOutputPagedResultDto -{ - items!: GetOrganizationUnitUserOutput[] | undefined; - totalCount!: number; - - constructor(data?: IGetOrganizationUnitUserOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) - this.items!.push(GetOrganizationUnitUserOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; - } - } - - static fromJS(data: any): GetOrganizationUnitUserOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetOrganizationUnitUserOutputPagedResultDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); - } - data['totalCount'] = this.totalCount; - return data; - } + id: string; + userName: string | undefined; + email: string | undefined; +} + +export class GetOrganizationUnitUserOutputPagedResultDto implements IGetOrganizationUnitUserOutputPagedResultDto { + items!: GetOrganizationUnitUserOutput[] | undefined; + totalCount!: number; + + constructor(data?: IGetOrganizationUnitUserOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetOrganizationUnitUserOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): GetOrganizationUnitUserOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetOrganizationUnitUserOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } } export interface IGetOrganizationUnitUserOutputPagedResultDto { - items: GetOrganizationUnitUserOutput[] | undefined; - totalCount: number; + items: GetOrganizationUnitUserOutput[] | undefined; + totalCount: number; } export class GetPermissionInput implements IGetPermissionInput { - providerName!: string; - providerKey!: string; + providerName!: string; + providerKey!: string; - constructor(data?: IGetPermissionInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IGetPermissionInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.providerName = _data['providerName']; - this.providerKey = _data['providerKey']; + init(_data?: any) { + if (_data) { + this.providerName = _data["providerName"]; + this.providerKey = _data["providerKey"]; + } } - } - static fromJS(data: any): GetPermissionInput { - data = typeof data === 'object' ? data : {}; - let result = new GetPermissionInput(); - result.init(data); - return result; - } + static fromJS(data: any): GetPermissionInput { + data = typeof data === 'object' ? data : {}; + let result = new GetPermissionInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['providerName'] = this.providerName; - data['providerKey'] = this.providerKey; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["providerName"] = this.providerName; + data["providerKey"] = this.providerKey; + return data; + } } export interface IGetPermissionInput { - providerName: string; - providerKey: string; + providerName: string; + providerKey: string; } export class GetUnAddRoleInput implements IGetUnAddRoleInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - filter!: string | undefined; - - constructor(data?: IGetUnAddRoleInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.organizationUnitId = _data['organizationUnitId']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): GetUnAddRoleInput { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddRoleInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['organizationUnitId'] = this.organizationUnitId; - data['filter'] = this.filter; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; + + constructor(data?: IGetUnAddRoleInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): GetUnAddRoleInput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddRoleInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; + data["filter"] = this.filter; + return data; + } } export interface IGetUnAddRoleInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } export class GetUnAddRoleOutput implements IGetUnAddRoleOutput { - id!: string; - name!: string | undefined; + id!: string; + name!: string | undefined; - constructor(data?: IGetUnAddRoleOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IGetUnAddRoleOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.name = _data['name']; + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + } } - } - static fromJS(data: any): GetUnAddRoleOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddRoleOutput(); - result.init(data); - return result; - } + static fromJS(data: any): GetUnAddRoleOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddRoleOutput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['name'] = this.name; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["name"] = this.name; + return data; + } } export interface IGetUnAddRoleOutput { - id: string; - name: string | undefined; + id: string; + name: string | undefined; } export class GetUnAddRoleOutputPagedResultDto implements IGetUnAddRoleOutputPagedResultDto { - items!: GetUnAddRoleOutput[] | undefined; - totalCount!: number; + items!: GetUnAddRoleOutput[] | undefined; + totalCount!: number; - constructor(data?: IGetUnAddRoleOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IGetUnAddRoleOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(GetUnAddRoleOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetUnAddRoleOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } } - } - static fromJS(data: any): GetUnAddRoleOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddRoleOutputPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): GetUnAddRoleOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddRoleOutputPagedResultDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; } - data['totalCount'] = this.totalCount; - return data; - } } export interface IGetUnAddRoleOutputPagedResultDto { - items: GetUnAddRoleOutput[] | undefined; - totalCount: number; + items: GetUnAddRoleOutput[] | undefined; + totalCount: number; } export class GetUnAddUserInput implements IGetUnAddUserInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - organizationUnitId!: string; - filter!: string | undefined; - - constructor(data?: IGetUnAddUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.organizationUnitId = _data['organizationUnitId']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): GetUnAddUserInput { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddUserInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['organizationUnitId'] = this.organizationUnitId; - data['filter'] = this.filter; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + organizationUnitId!: string; + filter!: string | undefined; + + constructor(data?: IGetUnAddUserInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.organizationUnitId = _data["organizationUnitId"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): GetUnAddUserInput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddUserInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["organizationUnitId"] = this.organizationUnitId; + data["filter"] = this.filter; + return data; + } } export interface IGetUnAddUserInput { - pageIndex: number; - pageSize: number; - skipCount: number; - organizationUnitId: string; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + organizationUnitId: string; + filter: string | undefined; } export class GetUnAddUserOutput implements IGetUnAddUserOutput { - id!: string; - userName!: string | undefined; - email!: string | undefined; - - constructor(data?: IGetUnAddUserOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.userName = _data['userName']; - this.email = _data['email']; - } - } - - static fromJS(data: any): GetUnAddUserOutput { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddUserOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['userName'] = this.userName; - data['email'] = this.email; - return data; - } + id!: string; + userName!: string | undefined; + email!: string | undefined; + + constructor(data?: IGetUnAddUserOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.userName = _data["userName"]; + this.email = _data["email"]; + } + } + + static fromJS(data: any): GetUnAddUserOutput { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddUserOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["userName"] = this.userName; + data["email"] = this.email; + return data; + } } export interface IGetUnAddUserOutput { - id: string; - userName: string | undefined; - email: string | undefined; + id: string; + userName: string | undefined; + email: string | undefined; } export class GetUnAddUserOutputPagedResultDto implements IGetUnAddUserOutputPagedResultDto { - items!: GetUnAddUserOutput[] | undefined; - totalCount!: number; + items!: GetUnAddUserOutput[] | undefined; + totalCount!: number; - constructor(data?: IGetUnAddUserOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IGetUnAddUserOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(GetUnAddUserOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(GetUnAddUserOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } } - } - static fromJS(data: any): GetUnAddUserOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new GetUnAddUserOutputPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): GetUnAddUserOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new GetUnAddUserOutputPagedResultDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; } - data['totalCount'] = this.totalCount; - return data; - } } export interface IGetUnAddUserOutputPagedResultDto { - items: GetUnAddUserOutput[] | undefined; - totalCount: number; + items: GetUnAddUserOutput[] | undefined; + totalCount: number; } export enum HttpStatusCode { - Continue = 100, - SwitchingProtocols = 101, - Processing = 102, - EarlyHints = 103, - OK = 200, - Created = 201, - Accepted = 202, - NonAuthoritativeInformation = 203, - NoContent = 204, - ResetContent = 205, - PartialContent = 206, - MultiStatus = 207, - AlreadyReported = 208, - IMUsed = 226, - MultipleChoices = 300, - Ambiguous = 301, - MovedPermanently = 302, - Moved = 303, - Found = 304, - Redirect = 305, - SeeOther = 306, - RedirectMethod = 307, - NotModified = 308, - UseProxy = 400, - Unused = 401, - TemporaryRedirect = 402, - RedirectKeepVerb = 403, - PermanentRedirect = 404, - BadRequest = 405, - Unauthorized = 406, - PaymentRequired = 407, - Forbidden = 408, - NotFound = 409, - MethodNotAllowed = 410, - NotAcceptable = 411, - ProxyAuthenticationRequired = 412, - RequestTimeout = 413, - Conflict = 414, - Gone = 415, - LengthRequired = 416, - PreconditionFailed = 417, - RequestEntityTooLarge = 421, - RequestUriTooLong = 422, - UnsupportedMediaType = 423, - RequestedRangeNotSatisfiable = 424, - ExpectationFailed = 426, - MisdirectedRequest = 428, - UnprocessableEntity = 429, - Locked = 431, - FailedDependency = 451, - UpgradeRequired = 500, - PreconditionRequired = 501, - TooManyRequests = 502, - RequestHeaderFieldsTooLarge = 503, - UnavailableForLegalReasons = 504, - InternalServerError = 505, - NotImplemented = 506, - BadGateway = 507, - ServiceUnavailable = 508, - GatewayTimeout = 510, - HttpVersionNotSupported = 511, + Continue = 100, + SwitchingProtocols = 101, + Processing = 102, + EarlyHints = 103, + OK = 200, + Created = 201, + Accepted = 202, + NonAuthoritativeInformation = 203, + NoContent = 204, + ResetContent = 205, + PartialContent = 206, + MultiStatus = 207, + AlreadyReported = 208, + IMUsed = 226, + MultipleChoices = 300, + Ambiguous = 301, + MovedPermanently = 302, + Moved = 303, + Found = 304, + Redirect = 305, + SeeOther = 306, + RedirectMethod = 307, + NotModified = 308, + UseProxy = 400, + Unused = 401, + TemporaryRedirect = 402, + RedirectKeepVerb = 403, + PermanentRedirect = 404, + BadRequest = 405, + Unauthorized = 406, + PaymentRequired = 407, + Forbidden = 408, + NotFound = 409, + MethodNotAllowed = 410, + NotAcceptable = 411, + ProxyAuthenticationRequired = 412, + RequestTimeout = 413, + Conflict = 414, + Gone = 415, + LengthRequired = 416, + PreconditionFailed = 417, + RequestEntityTooLarge = 421, + RequestUriTooLong = 422, + UnsupportedMediaType = 423, + RequestedRangeNotSatisfiable = 424, + ExpectationFailed = 426, + MisdirectedRequest = 428, + UnprocessableEntity = 429, + Locked = 431, + FailedDependency = 451, + UpgradeRequired = 500, + PreconditionRequired = 501, + TooManyRequests = 502, + RequestHeaderFieldsTooLarge = 503, + UnavailableForLegalReasons = 504, + InternalServerError = 505, + NotImplemented = 506, + BadGateway = 507, + ServiceUnavailable = 508, + GatewayTimeout = 510, + HttpVersionNotSupported = 511, } export class IanaTimeZone implements IIanaTimeZone { - timeZoneName!: string | undefined; + timeZoneName!: string | undefined; - constructor(data?: IIanaTimeZone) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IIanaTimeZone) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.timeZoneName = _data['timeZoneName']; + init(_data?: any) { + if (_data) { + this.timeZoneName = _data["timeZoneName"]; + } } - } - static fromJS(data: any): IanaTimeZone { - data = typeof data === 'object' ? data : {}; - let result = new IanaTimeZone(); - result.init(data); - return result; - } + static fromJS(data: any): IanaTimeZone { + data = typeof data === 'object' ? data : {}; + let result = new IanaTimeZone(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['timeZoneName'] = this.timeZoneName; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["timeZoneName"] = this.timeZoneName; + return data; + } } export interface IIanaTimeZone { - timeZoneName: string | undefined; + timeZoneName: string | undefined; } export class IdInput implements IIdInput { - id!: string; + id!: string; - constructor(data?: IIdInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IIdInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.id = _data['id']; + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + } } - } - static fromJS(data: any): IdInput { - data = typeof data === 'object' ? data : {}; - let result = new IdInput(); - result.init(data); - return result; - } + static fromJS(data: any): IdInput { + data = typeof data === 'object' ? data : {}; + let result = new IdInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + return data; + } } export interface IIdInput { - id: string; + id: string; } export class IdentityRoleCreateDto implements IIdentityRoleCreateDto { - readonly extraProperties!: { [key: string]: any } | undefined; - name!: string; - isDefault!: boolean; - isPublic!: boolean; - - constructor(data?: IIdentityRoleCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.name = _data['name']; - this.isDefault = _data['isDefault']; - this.isPublic = _data['isPublic']; - } - } - - static fromJS(data: any): IdentityRoleCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleCreateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['name'] = this.name; - data['isDefault'] = this.isDefault; - data['isPublic'] = this.isPublic; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + name!: string; + isDefault!: boolean; + isPublic!: boolean; + + constructor(data?: IIdentityRoleCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.name = _data["name"]; + this.isDefault = _data["isDefault"]; + this.isPublic = _data["isPublic"]; + } + } + + static fromJS(data: any): IdentityRoleCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleCreateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["name"] = this.name; + data["isDefault"] = this.isDefault; + data["isPublic"] = this.isPublic; + return data; + } } export interface IIdentityRoleCreateDto { - extraProperties: { [key: string]: any } | undefined; - name: string; - isDefault: boolean; - isPublic: boolean; + extraProperties: { [key: string]: any; } | undefined; + name: string; + isDefault: boolean; + isPublic: boolean; } export class IdentityRoleDto implements IIdentityRoleDto { - readonly extraProperties!: { [key: string]: any } | undefined; - id!: string; - name!: string | undefined; - isDefault!: boolean; - isStatic!: boolean; - isPublic!: boolean; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityRoleDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.id = _data['id']; - this.name = _data['name']; - this.isDefault = _data['isDefault']; - this.isStatic = _data['isStatic']; - this.isPublic = _data['isPublic']; - this.concurrencyStamp = _data['concurrencyStamp']; - } - } - - static fromJS(data: any): IdentityRoleDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['id'] = this.id; - data['name'] = this.name; - data['isDefault'] = this.isDefault; - data['isStatic'] = this.isStatic; - data['isPublic'] = this.isPublic; - data['concurrencyStamp'] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + id!: string; + name!: string | undefined; + isDefault!: boolean; + isStatic!: boolean; + isPublic!: boolean; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityRoleDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.id = _data["id"]; + this.name = _data["name"]; + this.isDefault = _data["isDefault"]; + this.isStatic = _data["isStatic"]; + this.isPublic = _data["isPublic"]; + this.concurrencyStamp = _data["concurrencyStamp"]; + } + } + + static fromJS(data: any): IdentityRoleDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["id"] = this.id; + data["name"] = this.name; + data["isDefault"] = this.isDefault; + data["isStatic"] = this.isStatic; + data["isPublic"] = this.isPublic; + data["concurrencyStamp"] = this.concurrencyStamp; + return data; + } } export interface IIdentityRoleDto { - extraProperties: { [key: string]: any } | undefined; - id: string; - name: string | undefined; - isDefault: boolean; - isStatic: boolean; - isPublic: boolean; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any; } | undefined; + id: string; + name: string | undefined; + isDefault: boolean; + isStatic: boolean; + isPublic: boolean; + concurrencyStamp: string | undefined; } export class IdentityRoleDtoListResultDto implements IIdentityRoleDtoListResultDto { - items!: IdentityRoleDto[] | undefined; + items!: IdentityRoleDto[] | undefined; - constructor(data?: IIdentityRoleDtoListResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IIdentityRoleDtoListResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(IdentityRoleDto.fromJS(item)); - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(IdentityRoleDto.fromJS(item)); + } + } } - } - static fromJS(data: any): IdentityRoleDtoListResultDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleDtoListResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): IdentityRoleDtoListResultDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleDtoListResultDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + return data; } - return data; - } } export interface IIdentityRoleDtoListResultDto { - items: IdentityRoleDto[] | undefined; + items: IdentityRoleDto[] | undefined; } export class IdentityRoleDtoPagedResultDto implements IIdentityRoleDtoPagedResultDto { - items!: IdentityRoleDto[] | undefined; - totalCount!: number; + items!: IdentityRoleDto[] | undefined; + totalCount!: number; - constructor(data?: IIdentityRoleDtoPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IIdentityRoleDtoPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(IdentityRoleDto.fromJS(item)); - } - this.totalCount = _data['totalCount']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(IdentityRoleDto.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } } - } - static fromJS(data: any): IdentityRoleDtoPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleDtoPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): IdentityRoleDtoPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleDtoPagedResultDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; } - data['totalCount'] = this.totalCount; - return data; - } } export interface IIdentityRoleDtoPagedResultDto { - items: IdentityRoleDto[] | undefined; - totalCount: number; + items: IdentityRoleDto[] | undefined; + totalCount: number; } export class IdentityRoleUpdateDto implements IIdentityRoleUpdateDto { - readonly extraProperties!: { [key: string]: any } | undefined; - name!: string; - isDefault!: boolean; - isPublic!: boolean; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityRoleUpdateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.name = _data['name']; - this.isDefault = _data['isDefault']; - this.isPublic = _data['isPublic']; - this.concurrencyStamp = _data['concurrencyStamp']; - } - } - - static fromJS(data: any): IdentityRoleUpdateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityRoleUpdateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['name'] = this.name; - data['isDefault'] = this.isDefault; - data['isPublic'] = this.isPublic; - data['concurrencyStamp'] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + name!: string; + isDefault!: boolean; + isPublic!: boolean; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityRoleUpdateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.name = _data["name"]; + this.isDefault = _data["isDefault"]; + this.isPublic = _data["isPublic"]; + this.concurrencyStamp = _data["concurrencyStamp"]; + } + } + + static fromJS(data: any): IdentityRoleUpdateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityRoleUpdateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["name"] = this.name; + data["isDefault"] = this.isDefault; + data["isPublic"] = this.isPublic; + data["concurrencyStamp"] = this.concurrencyStamp; + return data; + } } export interface IIdentityRoleUpdateDto { - extraProperties: { [key: string]: any } | undefined; - name: string; - isDefault: boolean; - isPublic: boolean; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any; } | undefined; + name: string; + isDefault: boolean; + isPublic: boolean; + concurrencyStamp: string | undefined; } export class IdentityUserCreateDto implements IIdentityUserCreateDto { - readonly extraProperties!: { [key: string]: any } | undefined; - userName!: string; - name!: string | undefined; - surname!: string | undefined; - email!: string; - phoneNumber!: string | undefined; - isActive!: boolean; - lockoutEnabled!: boolean; - roleNames!: string[] | undefined; - password!: string; - - constructor(data?: IIdentityUserCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.userName = _data['userName']; - this.name = _data['name']; - this.surname = _data['surname']; - this.email = _data['email']; - this.phoneNumber = _data['phoneNumber']; - this.isActive = _data['isActive']; - this.lockoutEnabled = _data['lockoutEnabled']; - if (Array.isArray(_data['roleNames'])) { - this.roleNames = [] as any; - for (let item of _data['roleNames']) this.roleNames!.push(item); - } - this.password = _data['password']; - } - } - - static fromJS(data: any): IdentityUserCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserCreateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['userName'] = this.userName; - data['name'] = this.name; - data['surname'] = this.surname; - data['email'] = this.email; - data['phoneNumber'] = this.phoneNumber; - data['isActive'] = this.isActive; - data['lockoutEnabled'] = this.lockoutEnabled; - if (Array.isArray(this.roleNames)) { - data['roleNames'] = []; - for (let item of this.roleNames) data['roleNames'].push(item); - } - data['password'] = this.password; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + userName!: string; + name!: string | undefined; + surname!: string | undefined; + email!: string; + phoneNumber!: string | undefined; + isActive!: boolean; + lockoutEnabled!: boolean; + roleNames!: string[] | undefined; + password!: string; + + constructor(data?: IIdentityUserCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.userName = _data["userName"]; + this.name = _data["name"]; + this.surname = _data["surname"]; + this.email = _data["email"]; + this.phoneNumber = _data["phoneNumber"]; + this.isActive = _data["isActive"]; + this.lockoutEnabled = _data["lockoutEnabled"]; + if (Array.isArray(_data["roleNames"])) { + this.roleNames = [] as any; + for (let item of _data["roleNames"]) + this.roleNames!.push(item); + } + this.password = _data["password"]; + } + } + + static fromJS(data: any): IdentityUserCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserCreateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["userName"] = this.userName; + data["name"] = this.name; + data["surname"] = this.surname; + data["email"] = this.email; + data["phoneNumber"] = this.phoneNumber; + data["isActive"] = this.isActive; + data["lockoutEnabled"] = this.lockoutEnabled; + if (Array.isArray(this.roleNames)) { + data["roleNames"] = []; + for (let item of this.roleNames) + data["roleNames"].push(item); + } + data["password"] = this.password; + return data; + } } export interface IIdentityUserCreateDto { - extraProperties: { [key: string]: any } | undefined; - userName: string; - name: string | undefined; - surname: string | undefined; - email: string; - phoneNumber: string | undefined; - isActive: boolean; - lockoutEnabled: boolean; - roleNames: string[] | undefined; - password: string; + extraProperties: { [key: string]: any; } | undefined; + userName: string; + name: string | undefined; + surname: string | undefined; + email: string; + phoneNumber: string | undefined; + isActive: boolean; + lockoutEnabled: boolean; + roleNames: string[] | undefined; + password: string; } export class IdentityUserDto implements IIdentityUserDto { - readonly extraProperties!: { [key: string]: any } | undefined; - id!: string; - creationTime!: dayjs.Dayjs; - creatorId!: string | undefined; - lastModificationTime!: dayjs.Dayjs | undefined; - lastModifierId!: string | undefined; - isDeleted!: boolean; - deleterId!: string | undefined; - deletionTime!: dayjs.Dayjs | undefined; - tenantId!: string | undefined; - userName!: string | undefined; - name!: string | undefined; - surname!: string | undefined; - email!: string | undefined; - emailConfirmed!: boolean; - phoneNumber!: string | undefined; - phoneNumberConfirmed!: boolean; - isActive!: boolean; - lockoutEnabled!: boolean; - lockoutEnd!: dayjs.Dayjs | undefined; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityUserDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.id = _data['id']; - this.creationTime = _data['creationTime'] - ? dayjs(_data['creationTime'].toString()) - : undefined; - this.creatorId = _data['creatorId']; - this.lastModificationTime = _data['lastModificationTime'] - ? dayjs(_data['lastModificationTime'].toString()) - : undefined; - this.lastModifierId = _data['lastModifierId']; - this.isDeleted = _data['isDeleted']; - this.deleterId = _data['deleterId']; - this.deletionTime = _data['deletionTime'] - ? dayjs(_data['deletionTime'].toString()) - : undefined; - this.tenantId = _data['tenantId']; - this.userName = _data['userName']; - this.name = _data['name']; - this.surname = _data['surname']; - this.email = _data['email']; - this.emailConfirmed = _data['emailConfirmed']; - this.phoneNumber = _data['phoneNumber']; - this.phoneNumberConfirmed = _data['phoneNumberConfirmed']; - this.isActive = _data['isActive']; - this.lockoutEnabled = _data['lockoutEnabled']; - this.lockoutEnd = _data['lockoutEnd'] - ? dayjs(_data['lockoutEnd'].toString()) - : undefined; - this.concurrencyStamp = _data['concurrencyStamp']; - } - } - - static fromJS(data: any): IdentityUserDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['id'] = this.id; - data['creationTime'] = this.creationTime ? this.creationTime.toISOString() : undefined; - data['creatorId'] = this.creatorId; - data['lastModificationTime'] = this.lastModificationTime - ? this.lastModificationTime.toISOString() - : undefined; - data['lastModifierId'] = this.lastModifierId; - data['isDeleted'] = this.isDeleted; - data['deleterId'] = this.deleterId; - data['deletionTime'] = this.deletionTime ? this.deletionTime.toISOString() : undefined; - data['tenantId'] = this.tenantId; - data['userName'] = this.userName; - data['name'] = this.name; - data['surname'] = this.surname; - data['email'] = this.email; - data['emailConfirmed'] = this.emailConfirmed; - data['phoneNumber'] = this.phoneNumber; - data['phoneNumberConfirmed'] = this.phoneNumberConfirmed; - data['isActive'] = this.isActive; - data['lockoutEnabled'] = this.lockoutEnabled; - data['lockoutEnd'] = this.lockoutEnd ? this.lockoutEnd.toISOString() : undefined; - data['concurrencyStamp'] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + id!: string; + creationTime!: dayjs.Dayjs; + creatorId!: string | undefined; + lastModificationTime!: dayjs.Dayjs | undefined; + lastModifierId!: string | undefined; + isDeleted!: boolean; + deleterId!: string | undefined; + deletionTime!: dayjs.Dayjs | undefined; + tenantId!: string | undefined; + userName!: string | undefined; + name!: string | undefined; + surname!: string | undefined; + email!: string | undefined; + emailConfirmed!: boolean; + phoneNumber!: string | undefined; + phoneNumberConfirmed!: boolean; + isActive!: boolean; + lockoutEnabled!: boolean; + lockoutEnd!: dayjs.Dayjs | undefined; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityUserDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.id = _data["id"]; + this.creationTime = _data["creationTime"] ? dayjs(_data["creationTime"].toString()) : undefined; + this.creatorId = _data["creatorId"]; + this.lastModificationTime = _data["lastModificationTime"] ? dayjs(_data["lastModificationTime"].toString()) : undefined; + this.lastModifierId = _data["lastModifierId"]; + this.isDeleted = _data["isDeleted"]; + this.deleterId = _data["deleterId"]; + this.deletionTime = _data["deletionTime"] ? dayjs(_data["deletionTime"].toString()) : undefined; + this.tenantId = _data["tenantId"]; + this.userName = _data["userName"]; + this.name = _data["name"]; + this.surname = _data["surname"]; + this.email = _data["email"]; + this.emailConfirmed = _data["emailConfirmed"]; + this.phoneNumber = _data["phoneNumber"]; + this.phoneNumberConfirmed = _data["phoneNumberConfirmed"]; + this.isActive = _data["isActive"]; + this.lockoutEnabled = _data["lockoutEnabled"]; + this.lockoutEnd = _data["lockoutEnd"] ? dayjs(_data["lockoutEnd"].toString()) : undefined; + this.concurrencyStamp = _data["concurrencyStamp"]; + } + } + + static fromJS(data: any): IdentityUserDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["id"] = this.id; + data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : undefined; + data["creatorId"] = this.creatorId; + data["lastModificationTime"] = this.lastModificationTime ? this.lastModificationTime.toISOString() : undefined; + data["lastModifierId"] = this.lastModifierId; + data["isDeleted"] = this.isDeleted; + data["deleterId"] = this.deleterId; + data["deletionTime"] = this.deletionTime ? this.deletionTime.toISOString() : undefined; + data["tenantId"] = this.tenantId; + data["userName"] = this.userName; + data["name"] = this.name; + data["surname"] = this.surname; + data["email"] = this.email; + data["emailConfirmed"] = this.emailConfirmed; + data["phoneNumber"] = this.phoneNumber; + data["phoneNumberConfirmed"] = this.phoneNumberConfirmed; + data["isActive"] = this.isActive; + data["lockoutEnabled"] = this.lockoutEnabled; + data["lockoutEnd"] = this.lockoutEnd ? this.lockoutEnd.toISOString() : undefined; + data["concurrencyStamp"] = this.concurrencyStamp; + return data; + } } export interface IIdentityUserDto { - extraProperties: { [key: string]: any } | undefined; - id: string; - creationTime: dayjs.Dayjs; - creatorId: string | undefined; - lastModificationTime: dayjs.Dayjs | undefined; - lastModifierId: string | undefined; - isDeleted: boolean; - deleterId: string | undefined; - deletionTime: dayjs.Dayjs | undefined; - tenantId: string | undefined; - userName: string | undefined; - name: string | undefined; - surname: string | undefined; - email: string | undefined; - emailConfirmed: boolean; - phoneNumber: string | undefined; - phoneNumberConfirmed: boolean; - isActive: boolean; - lockoutEnabled: boolean; - lockoutEnd: dayjs.Dayjs | undefined; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any; } | undefined; + id: string; + creationTime: dayjs.Dayjs; + creatorId: string | undefined; + lastModificationTime: dayjs.Dayjs | undefined; + lastModifierId: string | undefined; + isDeleted: boolean; + deleterId: string | undefined; + deletionTime: dayjs.Dayjs | undefined; + tenantId: string | undefined; + userName: string | undefined; + name: string | undefined; + surname: string | undefined; + email: string | undefined; + emailConfirmed: boolean; + phoneNumber: string | undefined; + phoneNumberConfirmed: boolean; + isActive: boolean; + lockoutEnabled: boolean; + lockoutEnd: dayjs.Dayjs | undefined; + concurrencyStamp: string | undefined; } export class IdentityUserDtoPagedResultDto implements IIdentityUserDtoPagedResultDto { - items!: IdentityUserDto[] | undefined; - totalCount!: number; + items!: IdentityUserDto[] | undefined; + totalCount!: number; - constructor(data?: IIdentityUserDtoPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IIdentityUserDtoPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(IdentityUserDto.fromJS(item)); - } - this.totalCount = _data['totalCount']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(IdentityUserDto.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } } - } - static fromJS(data: any): IdentityUserDtoPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserDtoPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): IdentityUserDtoPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserDtoPagedResultDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; } - data['totalCount'] = this.totalCount; - return data; - } } export interface IIdentityUserDtoPagedResultDto { - items: IdentityUserDto[] | undefined; - totalCount: number; + items: IdentityUserDto[] | undefined; + totalCount: number; } export class IdentityUserUpdateDto implements IIdentityUserUpdateDto { - readonly extraProperties!: { [key: string]: any } | undefined; - userName!: string; - name!: string | undefined; - surname!: string | undefined; - email!: string; - phoneNumber!: string | undefined; - isActive!: boolean; - lockoutEnabled!: boolean; - roleNames!: string[] | undefined; - password!: string | undefined; - concurrencyStamp!: string | undefined; - - constructor(data?: IIdentityUserUpdateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.userName = _data['userName']; - this.name = _data['name']; - this.surname = _data['surname']; - this.email = _data['email']; - this.phoneNumber = _data['phoneNumber']; - this.isActive = _data['isActive']; - this.lockoutEnabled = _data['lockoutEnabled']; - if (Array.isArray(_data['roleNames'])) { - this.roleNames = [] as any; - for (let item of _data['roleNames']) this.roleNames!.push(item); - } - this.password = _data['password']; - this.concurrencyStamp = _data['concurrencyStamp']; - } - } - - static fromJS(data: any): IdentityUserUpdateDto { - data = typeof data === 'object' ? data : {}; - let result = new IdentityUserUpdateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['userName'] = this.userName; - data['name'] = this.name; - data['surname'] = this.surname; - data['email'] = this.email; - data['phoneNumber'] = this.phoneNumber; - data['isActive'] = this.isActive; - data['lockoutEnabled'] = this.lockoutEnabled; - if (Array.isArray(this.roleNames)) { - data['roleNames'] = []; - for (let item of this.roleNames) data['roleNames'].push(item); - } - data['password'] = this.password; - data['concurrencyStamp'] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + userName!: string; + name!: string | undefined; + surname!: string | undefined; + email!: string; + phoneNumber!: string | undefined; + isActive!: boolean; + lockoutEnabled!: boolean; + roleNames!: string[] | undefined; + password!: string | undefined; + concurrencyStamp!: string | undefined; + + constructor(data?: IIdentityUserUpdateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.userName = _data["userName"]; + this.name = _data["name"]; + this.surname = _data["surname"]; + this.email = _data["email"]; + this.phoneNumber = _data["phoneNumber"]; + this.isActive = _data["isActive"]; + this.lockoutEnabled = _data["lockoutEnabled"]; + if (Array.isArray(_data["roleNames"])) { + this.roleNames = [] as any; + for (let item of _data["roleNames"]) + this.roleNames!.push(item); + } + this.password = _data["password"]; + this.concurrencyStamp = _data["concurrencyStamp"]; + } + } + + static fromJS(data: any): IdentityUserUpdateDto { + data = typeof data === 'object' ? data : {}; + let result = new IdentityUserUpdateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["userName"] = this.userName; + data["name"] = this.name; + data["surname"] = this.surname; + data["email"] = this.email; + data["phoneNumber"] = this.phoneNumber; + data["isActive"] = this.isActive; + data["lockoutEnabled"] = this.lockoutEnabled; + if (Array.isArray(this.roleNames)) { + data["roleNames"] = []; + for (let item of this.roleNames) + data["roleNames"].push(item); + } + data["password"] = this.password; + data["concurrencyStamp"] = this.concurrencyStamp; + return data; + } } export interface IIdentityUserUpdateDto { - extraProperties: { [key: string]: any } | undefined; - userName: string; - name: string | undefined; - surname: string | undefined; - email: string; - phoneNumber: string | undefined; - isActive: boolean; - lockoutEnabled: boolean; - roleNames: string[] | undefined; - password: string | undefined; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any; } | undefined; + userName: string; + name: string | undefined; + surname: string | undefined; + email: string; + phoneNumber: string | undefined; + isActive: boolean; + lockoutEnabled: boolean; + roleNames: string[] | undefined; + password: string | undefined; + concurrencyStamp: string | undefined; } export class InterfaceMethodApiDescriptionModel implements IInterfaceMethodApiDescriptionModel { - name!: string | undefined; - parametersOnMethod!: MethodParameterApiDescriptionModel[] | undefined; - returnValue!: ReturnValueApiDescriptionModel; - - constructor(data?: IInterfaceMethodApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.name = _data['name']; - if (Array.isArray(_data['parametersOnMethod'])) { - this.parametersOnMethod = [] as any; - for (let item of _data['parametersOnMethod']) - this.parametersOnMethod!.push(MethodParameterApiDescriptionModel.fromJS(item)); - } - this.returnValue = _data['returnValue'] - ? ReturnValueApiDescriptionModel.fromJS(_data['returnValue']) - : undefined; - } - } - - static fromJS(data: any): InterfaceMethodApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new InterfaceMethodApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - if (Array.isArray(this.parametersOnMethod)) { - data['parametersOnMethod'] = []; - for (let item of this.parametersOnMethod) data['parametersOnMethod'].push(item.toJSON()); - } - data['returnValue'] = this.returnValue ? this.returnValue.toJSON() : undefined; - return data; - } + name!: string | undefined; + parametersOnMethod!: MethodParameterApiDescriptionModel[] | undefined; + returnValue!: ReturnValueApiDescriptionModel; + + constructor(data?: IInterfaceMethodApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + if (Array.isArray(_data["parametersOnMethod"])) { + this.parametersOnMethod = [] as any; + for (let item of _data["parametersOnMethod"]) + this.parametersOnMethod!.push(MethodParameterApiDescriptionModel.fromJS(item)); + } + this.returnValue = _data["returnValue"] ? ReturnValueApiDescriptionModel.fromJS(_data["returnValue"]) : undefined; + } + } + + static fromJS(data: any): InterfaceMethodApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new InterfaceMethodApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + if (Array.isArray(this.parametersOnMethod)) { + data["parametersOnMethod"] = []; + for (let item of this.parametersOnMethod) + data["parametersOnMethod"].push(item.toJSON()); + } + data["returnValue"] = this.returnValue ? this.returnValue.toJSON() : undefined; + return data; + } } export interface IInterfaceMethodApiDescriptionModel { - name: string | undefined; - parametersOnMethod: MethodParameterApiDescriptionModel[] | undefined; - returnValue: ReturnValueApiDescriptionModel; + name: string | undefined; + parametersOnMethod: MethodParameterApiDescriptionModel[] | undefined; + returnValue: ReturnValueApiDescriptionModel; } export class LanguageInfo implements ILanguageInfo { - cultureName!: string | undefined; - uiCultureName!: string | undefined; - displayName!: string | undefined; - flagIcon!: string | undefined; - - constructor(data?: ILanguageInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.cultureName = _data['cultureName']; - this.uiCultureName = _data['uiCultureName']; - this.displayName = _data['displayName']; - this.flagIcon = _data['flagIcon']; - } - } - - static fromJS(data: any): LanguageInfo { - data = typeof data === 'object' ? data : {}; - let result = new LanguageInfo(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['cultureName'] = this.cultureName; - data['uiCultureName'] = this.uiCultureName; - data['displayName'] = this.displayName; - data['flagIcon'] = this.flagIcon; - return data; - } + cultureName!: string | undefined; + uiCultureName!: string | undefined; + displayName!: string | undefined; + readonly twoLetterISOLanguageName!: string | undefined; + flagIcon!: string | undefined; + + constructor(data?: ILanguageInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.cultureName = _data["cultureName"]; + this.uiCultureName = _data["uiCultureName"]; + this.displayName = _data["displayName"]; + (this).twoLetterISOLanguageName = _data["twoLetterISOLanguageName"]; + this.flagIcon = _data["flagIcon"]; + } + } + + static fromJS(data: any): LanguageInfo { + data = typeof data === 'object' ? data : {}; + let result = new LanguageInfo(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["cultureName"] = this.cultureName; + data["uiCultureName"] = this.uiCultureName; + data["displayName"] = this.displayName; + data["twoLetterISOLanguageName"] = this.twoLetterISOLanguageName; + data["flagIcon"] = this.flagIcon; + return data; + } } export interface ILanguageInfo { - cultureName: string | undefined; - uiCultureName: string | undefined; - displayName: string | undefined; - flagIcon: string | undefined; + cultureName: string | undefined; + uiCultureName: string | undefined; + displayName: string | undefined; + twoLetterISOLanguageName: string | undefined; + flagIcon: string | undefined; } export class LocalizableStringDto implements ILocalizableStringDto { - name!: string | undefined; - resource!: string | undefined; + name!: string | undefined; + resource!: string | undefined; - constructor(data?: ILocalizableStringDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ILocalizableStringDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.resource = _data['resource']; + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.resource = _data["resource"]; + } } - } - static fromJS(data: any): LocalizableStringDto { - data = typeof data === 'object' ? data : {}; - let result = new LocalizableStringDto(); - result.init(data); - return result; - } + static fromJS(data: any): LocalizableStringDto { + data = typeof data === 'object' ? data : {}; + let result = new LocalizableStringDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['resource'] = this.resource; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["resource"] = this.resource; + return data; + } } export interface ILocalizableStringDto { - name: string | undefined; - resource: string | undefined; + name: string | undefined; + resource: string | undefined; } export class LockUserInput implements ILockUserInput { - userId!: string; - locked!: boolean; + userId!: string; + locked!: boolean; - constructor(data?: ILockUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ILockUserInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.userId = _data['userId']; - this.locked = _data['locked']; + init(_data?: any) { + if (_data) { + this.userId = _data["userId"]; + this.locked = _data["locked"]; + } } - } - static fromJS(data: any): LockUserInput { - data = typeof data === 'object' ? data : {}; - let result = new LockUserInput(); - result.init(data); - return result; - } + static fromJS(data: any): LockUserInput { + data = typeof data === 'object' ? data : {}; + let result = new LockUserInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['userId'] = this.userId; - data['locked'] = this.locked; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["userId"] = this.userId; + data["locked"] = this.locked; + return data; + } } export interface ILockUserInput { - userId: string; - locked: boolean; + userId: string; + locked: boolean; } +/** 登录 */ export class LoginInput implements ILoginInput { - name!: string | undefined; - password!: string | undefined; + /** 用户名或者邮箱 */ + name!: string | undefined; + /** 密码 */ + password!: string | undefined; - constructor(data?: ILoginInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ILoginInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.password = _data['password']; + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.password = _data["password"]; + } } - } - static fromJS(data: any): LoginInput { - data = typeof data === 'object' ? data : {}; - let result = new LoginInput(); - result.init(data); - return result; - } + static fromJS(data: any): LoginInput { + data = typeof data === 'object' ? data : {}; + let result = new LoginInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['password'] = this.password; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["password"] = this.password; + return data; + } } +/** 登录 */ export interface ILoginInput { - name: string | undefined; - password: string | undefined; + /** 用户名或者邮箱 */ + name: string | undefined; + /** 密码 */ + password: string | undefined; } export class LoginOutput implements ILoginOutput { - id!: string; - name!: string | undefined; - userName!: string | undefined; - token!: string | undefined; - roles!: string[] | undefined; - - constructor(data?: ILoginOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.name = _data['name']; - this.userName = _data['userName']; - this.token = _data['token']; - if (Array.isArray(_data['roles'])) { - this.roles = [] as any; - for (let item of _data['roles']) this.roles!.push(item); - } - } - } - - static fromJS(data: any): LoginOutput { - data = typeof data === 'object' ? data : {}; - let result = new LoginOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['name'] = this.name; - data['userName'] = this.userName; - data['token'] = this.token; - if (Array.isArray(this.roles)) { - data['roles'] = []; - for (let item of this.roles) data['roles'].push(item); - } - return data; - } + id!: string; + name!: string | undefined; + userName!: string | undefined; + token!: string | undefined; + roles!: string[] | undefined; + + constructor(data?: ILoginOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + this.userName = _data["userName"]; + this.token = _data["token"]; + if (Array.isArray(_data["roles"])) { + this.roles = [] as any; + for (let item of _data["roles"]) + this.roles!.push(item); + } + } + } + + static fromJS(data: any): LoginOutput { + data = typeof data === 'object' ? data : {}; + let result = new LoginOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["name"] = this.name; + data["userName"] = this.userName; + data["token"] = this.token; + if (Array.isArray(this.roles)) { + data["roles"] = []; + for (let item of this.roles) + data["roles"].push(item); + } + return data; + } } export interface ILoginOutput { - id: string; - name: string | undefined; - userName: string | undefined; - token: string | undefined; - roles: string[] | undefined; + id: string; + name: string | undefined; + userName: string | undefined; + token: string | undefined; + roles: string[] | undefined; } export enum LoginResultType { - Success = 1, - InvalidUserNameOrPassword = 2, - NotAllowed = 3, - LockedOut = 4, - RequiresTwoFactor = 5, + Success = 1, + InvalidUserNameOrPassword = 2, + NotAllowed = 3, + LockedOut = 4, + RequiresTwoFactor = 5, } +/** 消息等级 */ export enum MessageLevel { - Warning = 10, - Information = 20, - Error = 30, + Warning = 10, + Information = 20, + Error = 30, } +/** 消息类型 */ export enum MessageType { - BroadCast = 10, - Common = 20, + BroadCast = 10, + Common = 20, } export class MethodParameterApiDescriptionModel implements IMethodParameterApiDescriptionModel { - name!: string | undefined; - typeAsString!: string | undefined; - type!: string | undefined; - typeSimple!: string | undefined; - isOptional!: boolean; - defaultValue!: any | undefined; - - constructor(data?: IMethodParameterApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.typeAsString = _data['typeAsString']; - this.type = _data['type']; - this.typeSimple = _data['typeSimple']; - this.isOptional = _data['isOptional']; - this.defaultValue = _data['defaultValue']; - } - } - - static fromJS(data: any): MethodParameterApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new MethodParameterApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['typeAsString'] = this.typeAsString; - data['type'] = this.type; - data['typeSimple'] = this.typeSimple; - data['isOptional'] = this.isOptional; - data['defaultValue'] = this.defaultValue; - return data; - } + name!: string | undefined; + typeAsString!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; + isOptional!: boolean; + defaultValue!: any | undefined; + + constructor(data?: IMethodParameterApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.typeAsString = _data["typeAsString"]; + this.type = _data["type"]; + this.typeSimple = _data["typeSimple"]; + this.isOptional = _data["isOptional"]; + this.defaultValue = _data["defaultValue"]; + } + } + + static fromJS(data: any): MethodParameterApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new MethodParameterApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["typeAsString"] = this.typeAsString; + data["type"] = this.type; + data["typeSimple"] = this.typeSimple; + data["isOptional"] = this.isOptional; + data["defaultValue"] = this.defaultValue; + return data; + } } export interface IMethodParameterApiDescriptionModel { - name: string | undefined; - typeAsString: string | undefined; - type: string | undefined; - typeSimple: string | undefined; - isOptional: boolean; - defaultValue: any | undefined; + name: string | undefined; + typeAsString: string | undefined; + type: string | undefined; + typeSimple: string | undefined; + isOptional: boolean; + defaultValue: any | undefined; } export class ModuleApiDescriptionModel implements IModuleApiDescriptionModel { - rootPath!: string | undefined; - remoteServiceName!: string | undefined; - controllers!: { [key: string]: ControllerApiDescriptionModel } | undefined; - - constructor(data?: IModuleApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.rootPath = _data['rootPath']; - this.remoteServiceName = _data['remoteServiceName']; - if (_data['controllers']) { - this.controllers = {} as any; - for (let key in _data['controllers']) { - if (_data['controllers'].hasOwnProperty(key)) - (this.controllers)![key] = _data['controllers'][key] - ? ControllerApiDescriptionModel.fromJS(_data['controllers'][key]) - : new ControllerApiDescriptionModel(); - } - } - } - } - - static fromJS(data: any): ModuleApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ModuleApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['rootPath'] = this.rootPath; - data['remoteServiceName'] = this.remoteServiceName; - if (this.controllers) { - data['controllers'] = {}; - for (let key in this.controllers) { - if (this.controllers.hasOwnProperty(key)) - (data['controllers'])[key] = this.controllers[key] - ? this.controllers[key].toJSON() - : undefined; - } - } - return data; - } + rootPath!: string | undefined; + remoteServiceName!: string | undefined; + controllers!: { [key: string]: ControllerApiDescriptionModel; } | undefined; + + constructor(data?: IModuleApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.rootPath = _data["rootPath"]; + this.remoteServiceName = _data["remoteServiceName"]; + if (_data["controllers"]) { + this.controllers = {} as any; + for (let key in _data["controllers"]) { + if (_data["controllers"].hasOwnProperty(key)) + (this.controllers)![key] = _data["controllers"][key] ? ControllerApiDescriptionModel.fromJS(_data["controllers"][key]) : new ControllerApiDescriptionModel(); + } + } + } + } + + static fromJS(data: any): ModuleApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ModuleApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["rootPath"] = this.rootPath; + data["remoteServiceName"] = this.remoteServiceName; + if (this.controllers) { + data["controllers"] = {}; + for (let key in this.controllers) { + if (this.controllers.hasOwnProperty(key)) + (data["controllers"])[key] = this.controllers[key] ? this.controllers[key].toJSON() : undefined; + } + } + return data; + } } export interface IModuleApiDescriptionModel { - rootPath: string | undefined; - remoteServiceName: string | undefined; - controllers: { [key: string]: ControllerApiDescriptionModel } | undefined; + rootPath: string | undefined; + remoteServiceName: string | undefined; + controllers: { [key: string]: ControllerApiDescriptionModel; } | undefined; } export class ModuleExtensionDto implements IModuleExtensionDto { - entities!: { [key: string]: EntityExtensionDto } | undefined; - configuration!: { [key: string]: any } | undefined; - - constructor(data?: IModuleExtensionDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['entities']) { - this.entities = {} as any; - for (let key in _data['entities']) { - if (_data['entities'].hasOwnProperty(key)) - (this.entities)![key] = _data['entities'][key] - ? EntityExtensionDto.fromJS(_data['entities'][key]) - : new EntityExtensionDto(); - } - } - if (_data['configuration']) { - this.configuration = {} as any; - for (let key in _data['configuration']) { - if (_data['configuration'].hasOwnProperty(key)) - (this.configuration)![key] = _data['configuration'][key]; - } - } - } - } - - static fromJS(data: any): ModuleExtensionDto { - data = typeof data === 'object' ? data : {}; - let result = new ModuleExtensionDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.entities) { - data['entities'] = {}; - for (let key in this.entities) { - if (this.entities.hasOwnProperty(key)) - (data['entities'])[key] = this.entities[key] - ? this.entities[key].toJSON() - : undefined; - } - } - if (this.configuration) { - data['configuration'] = {}; - for (let key in this.configuration) { - if (this.configuration.hasOwnProperty(key)) - (data['configuration'])[key] = (this.configuration)[key]; - } - } - return data; - } + entities!: { [key: string]: EntityExtensionDto; } | undefined; + configuration!: { [key: string]: any; } | undefined; + + constructor(data?: IModuleExtensionDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["entities"]) { + this.entities = {} as any; + for (let key in _data["entities"]) { + if (_data["entities"].hasOwnProperty(key)) + (this.entities)![key] = _data["entities"][key] ? EntityExtensionDto.fromJS(_data["entities"][key]) : new EntityExtensionDto(); + } + } + if (_data["configuration"]) { + this.configuration = {} as any; + for (let key in _data["configuration"]) { + if (_data["configuration"].hasOwnProperty(key)) + (this.configuration)![key] = _data["configuration"][key]; + } + } + } + } + + static fromJS(data: any): ModuleExtensionDto { + data = typeof data === 'object' ? data : {}; + let result = new ModuleExtensionDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.entities) { + data["entities"] = {}; + for (let key in this.entities) { + if (this.entities.hasOwnProperty(key)) + (data["entities"])[key] = this.entities[key] ? this.entities[key].toJSON() : undefined; + } + } + if (this.configuration) { + data["configuration"] = {}; + for (let key in this.configuration) { + if (this.configuration.hasOwnProperty(key)) + (data["configuration"])[key] = (this.configuration)[key]; + } + } + return data; + } } export interface IModuleExtensionDto { - entities: { [key: string]: EntityExtensionDto } | undefined; - configuration: { [key: string]: any } | undefined; + entities: { [key: string]: EntityExtensionDto; } | undefined; + configuration: { [key: string]: any; } | undefined; } export class MultiTenancyInfoDto implements IMultiTenancyInfoDto { - isEnabled!: boolean; + isEnabled!: boolean; - constructor(data?: IMultiTenancyInfoDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IMultiTenancyInfoDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.isEnabled = _data['isEnabled']; + init(_data?: any) { + if (_data) { + this.isEnabled = _data["isEnabled"]; + } } - } - static fromJS(data: any): MultiTenancyInfoDto { - data = typeof data === 'object' ? data : {}; - let result = new MultiTenancyInfoDto(); - result.init(data); - return result; - } + static fromJS(data: any): MultiTenancyInfoDto { + data = typeof data === 'object' ? data : {}; + let result = new MultiTenancyInfoDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['isEnabled'] = this.isEnabled; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["isEnabled"] = this.isEnabled; + return data; + } } export interface IMultiTenancyInfoDto { - isEnabled: boolean; + isEnabled: boolean; } export class NameValue implements INameValue { - name!: string | undefined; - value!: string | undefined; + name!: string | undefined; + value!: string | undefined; - constructor(data?: INameValue) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: INameValue) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.value = _data['value']; + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.value = _data["value"]; + } } - } - static fromJS(data: any): NameValue { - data = typeof data === 'object' ? data : {}; - let result = new NameValue(); - result.init(data); - return result; - } + static fromJS(data: any): NameValue { + data = typeof data === 'object' ? data : {}; + let result = new NameValue(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['value'] = this.value; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["value"] = this.value; + return data; + } } export interface INameValue { - name: string | undefined; - value: string | undefined; + name: string | undefined; + value: string | undefined; } export class ObjectExtensionsDto implements IObjectExtensionsDto { - modules!: { [key: string]: ModuleExtensionDto } | undefined; - enums!: { [key: string]: ExtensionEnumDto } | undefined; - - constructor(data?: IObjectExtensionsDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['modules']) { - this.modules = {} as any; - for (let key in _data['modules']) { - if (_data['modules'].hasOwnProperty(key)) - (this.modules)![key] = _data['modules'][key] - ? ModuleExtensionDto.fromJS(_data['modules'][key]) - : new ModuleExtensionDto(); - } - } - if (_data['enums']) { - this.enums = {} as any; - for (let key in _data['enums']) { - if (_data['enums'].hasOwnProperty(key)) - (this.enums)![key] = _data['enums'][key] - ? ExtensionEnumDto.fromJS(_data['enums'][key]) - : new ExtensionEnumDto(); - } - } - } - } - - static fromJS(data: any): ObjectExtensionsDto { - data = typeof data === 'object' ? data : {}; - let result = new ObjectExtensionsDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.modules) { - data['modules'] = {}; - for (let key in this.modules) { - if (this.modules.hasOwnProperty(key)) - (data['modules'])[key] = this.modules[key] - ? this.modules[key].toJSON() - : undefined; - } - } - if (this.enums) { - data['enums'] = {}; - for (let key in this.enums) { - if (this.enums.hasOwnProperty(key)) - (data['enums'])[key] = this.enums[key] ? this.enums[key].toJSON() : undefined; - } - } - return data; - } + modules!: { [key: string]: ModuleExtensionDto; } | undefined; + enums!: { [key: string]: ExtensionEnumDto; } | undefined; + + constructor(data?: IObjectExtensionsDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["modules"]) { + this.modules = {} as any; + for (let key in _data["modules"]) { + if (_data["modules"].hasOwnProperty(key)) + (this.modules)![key] = _data["modules"][key] ? ModuleExtensionDto.fromJS(_data["modules"][key]) : new ModuleExtensionDto(); + } + } + if (_data["enums"]) { + this.enums = {} as any; + for (let key in _data["enums"]) { + if (_data["enums"].hasOwnProperty(key)) + (this.enums)![key] = _data["enums"][key] ? ExtensionEnumDto.fromJS(_data["enums"][key]) : new ExtensionEnumDto(); + } + } + } + } + + static fromJS(data: any): ObjectExtensionsDto { + data = typeof data === 'object' ? data : {}; + let result = new ObjectExtensionsDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.modules) { + data["modules"] = {}; + for (let key in this.modules) { + if (this.modules.hasOwnProperty(key)) + (data["modules"])[key] = this.modules[key] ? this.modules[key].toJSON() : undefined; + } + } + if (this.enums) { + data["enums"] = {}; + for (let key in this.enums) { + if (this.enums.hasOwnProperty(key)) + (data["enums"])[key] = this.enums[key] ? this.enums[key].toJSON() : undefined; + } + } + return data; + } } export interface IObjectExtensionsDto { - modules: { [key: string]: ModuleExtensionDto } | undefined; - enums: { [key: string]: ExtensionEnumDto } | undefined; + modules: { [key: string]: ModuleExtensionDto; } | undefined; + enums: { [key: string]: ExtensionEnumDto; } | undefined; +} + +/** 创建语言 */ +export class PageLanguageInput implements IPageLanguageInput { + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPageLanguageInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): PageLanguageInput { + data = typeof data === 'object' ? data : {}; + let result = new PageLanguageInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["filter"] = this.filter; + return data; + } +} + +/** 创建语言 */ +export interface IPageLanguageInput { + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + filter: string | undefined; +} + +/** 创建语言 */ +export class PageLanguageOutput implements IPageLanguageOutput { + /** 语言Id */ + id!: string; + /** 语言名称 */ + cultureName!: string | undefined; + /** Ui语言名称 */ + uiCultureName!: string | undefined; + /** 显示名称 */ + displayName!: string | undefined; + /** 图标 */ + flagIcon!: string | undefined; + /** 是否启用 */ + isEnabled!: boolean; + /** 创建时间 */ + creationTime!: dayjs.Dayjs; + /** 是否是默认语言 */ + isDefault!: boolean; + + constructor(data?: IPageLanguageOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.cultureName = _data["cultureName"]; + this.uiCultureName = _data["uiCultureName"]; + this.displayName = _data["displayName"]; + this.flagIcon = _data["flagIcon"]; + this.isEnabled = _data["isEnabled"]; + this.creationTime = _data["creationTime"] ? dayjs(_data["creationTime"].toString()) : undefined; + this.isDefault = _data["isDefault"]; + } + } + + static fromJS(data: any): PageLanguageOutput { + data = typeof data === 'object' ? data : {}; + let result = new PageLanguageOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["cultureName"] = this.cultureName; + data["uiCultureName"] = this.uiCultureName; + data["displayName"] = this.displayName; + data["flagIcon"] = this.flagIcon; + data["isEnabled"] = this.isEnabled; + data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : undefined; + data["isDefault"] = this.isDefault; + return data; + } +} + +/** 创建语言 */ +export interface IPageLanguageOutput { + /** 语言Id */ + id: string; + /** 语言名称 */ + cultureName: string | undefined; + /** Ui语言名称 */ + uiCultureName: string | undefined; + /** 显示名称 */ + displayName: string | undefined; + /** 图标 */ + flagIcon: string | undefined; + /** 是否启用 */ + isEnabled: boolean; + /** 创建时间 */ + creationTime: dayjs.Dayjs; + /** 是否是默认语言 */ + isDefault: boolean; +} + +export class PageLanguageOutputPagedResultDto implements IPageLanguageOutputPagedResultDto { + items!: PageLanguageOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPageLanguageOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(PageLanguageOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): PageLanguageOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PageLanguageOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } +} + +export interface IPageLanguageOutputPagedResultDto { + items: PageLanguageOutput[] | undefined; + totalCount: number; +} + +/** 创建语言文本 */ +export class PageLanguageTextInput implements IPageLanguageTextInput { + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + /** 语言 */ + cultureName!: string | undefined; + /** 资源 */ + resourceName!: string | undefined; + /** 查询条件 name or value */ + filter!: string | undefined; + + constructor(data?: IPageLanguageTextInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.cultureName = _data["cultureName"]; + this.resourceName = _data["resourceName"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): PageLanguageTextInput { + data = typeof data === 'object' ? data : {}; + let result = new PageLanguageTextInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["cultureName"] = this.cultureName; + data["resourceName"] = this.resourceName; + data["filter"] = this.filter; + return data; + } +} + +/** 创建语言文本 */ +export interface IPageLanguageTextInput { + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + /** 语言 */ + cultureName: string | undefined; + /** 资源 */ + resourceName: string | undefined; + /** 查询条件 name or value */ + filter: string | undefined; +} + +/** 创建语言文本 */ +export class PageLanguageTextOutput implements IPageLanguageTextOutput { + /** 资源名称 */ + resourceName!: string | undefined; + /** 名称 */ + name!: string | undefined; + /** 值 */ + value!: string | undefined; + + constructor(data?: IPageLanguageTextOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.resourceName = _data["resourceName"]; + this.name = _data["name"]; + this.value = _data["value"]; + } + } + + static fromJS(data: any): PageLanguageTextOutput { + data = typeof data === 'object' ? data : {}; + let result = new PageLanguageTextOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["resourceName"] = this.resourceName; + data["name"] = this.name; + data["value"] = this.value; + return data; + } +} + +/** 创建语言文本 */ +export interface IPageLanguageTextOutput { + /** 资源名称 */ + resourceName: string | undefined; + /** 名称 */ + name: string | undefined; + /** 值 */ + value: string | undefined; +} + +export class PageLanguageTextOutputPagedResultDto implements IPageLanguageTextOutputPagedResultDto { + items!: PageLanguageTextOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPageLanguageTextOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(PageLanguageTextOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): PageLanguageTextOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PageLanguageTextOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } +} + +export interface IPageLanguageTextOutputPagedResultDto { + items: PageLanguageTextOutput[] | undefined; + totalCount: number; } export class PagingAuditLogListInput implements IPagingAuditLogListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - sorting!: string | undefined; - startTime!: dayjs.Dayjs | undefined; - endTime!: dayjs.Dayjs | undefined; - httpMethod!: string | undefined; - url!: string | undefined; - userName!: string | undefined; - applicationName!: string | undefined; - correlationId!: string | undefined; - maxExecutionDuration!: number | undefined; - minExecutionDuration!: number | undefined; - hasException!: boolean | undefined; - httpStatusCode!: HttpStatusCode; - - constructor(data?: IPagingAuditLogListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.sorting = _data['sorting']; - this.startTime = _data['startTime'] ? dayjs(_data['startTime'].toString()) : undefined; - this.endTime = _data['endTime'] ? dayjs(_data['endTime'].toString()) : undefined; - this.httpMethod = _data['httpMethod']; - this.url = _data['url']; - this.userName = _data['userName']; - this.applicationName = _data['applicationName']; - this.correlationId = _data['correlationId']; - this.maxExecutionDuration = _data['maxExecutionDuration']; - this.minExecutionDuration = _data['minExecutionDuration']; - this.hasException = _data['hasException']; - this.httpStatusCode = _data['httpStatusCode']; - } - } - - static fromJS(data: any): PagingAuditLogListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingAuditLogListInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['sorting'] = this.sorting; - data['startTime'] = this.startTime ? this.startTime.toISOString() : undefined; - data['endTime'] = this.endTime ? this.endTime.toISOString() : undefined; - data['httpMethod'] = this.httpMethod; - data['url'] = this.url; - data['userName'] = this.userName; - data['applicationName'] = this.applicationName; - data['correlationId'] = this.correlationId; - data['maxExecutionDuration'] = this.maxExecutionDuration; - data['minExecutionDuration'] = this.minExecutionDuration; - data['hasException'] = this.hasException; - data['httpStatusCode'] = this.httpStatusCode; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + /** 排序 */ + sorting!: string | undefined; + /** 开始时间 */ + startTime!: dayjs.Dayjs | undefined; + /** 结束时间 */ + endTime!: dayjs.Dayjs | undefined; + /** 请求方法 */ + httpMethod!: string | undefined; + /** 请求地址 */ + url!: string | undefined; + /** 用户名 */ + userName!: string | undefined; + /** 应用程序名称 */ + applicationName!: string | undefined; + /** RequestId */ + correlationId!: string | undefined; + /** 最大执行时间 */ + maxExecutionDuration!: number | undefined; + /** 最小执行时间 */ + minExecutionDuration!: number | undefined; + /** 是否有异常 */ + hasException!: boolean | undefined; + httpStatusCode!: HttpStatusCode; + + constructor(data?: IPagingAuditLogListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.sorting = _data["sorting"]; + this.startTime = _data["startTime"] ? dayjs(_data["startTime"].toString()) : undefined; + this.endTime = _data["endTime"] ? dayjs(_data["endTime"].toString()) : undefined; + this.httpMethod = _data["httpMethod"]; + this.url = _data["url"]; + this.userName = _data["userName"]; + this.applicationName = _data["applicationName"]; + this.correlationId = _data["correlationId"]; + this.maxExecutionDuration = _data["maxExecutionDuration"]; + this.minExecutionDuration = _data["minExecutionDuration"]; + this.hasException = _data["hasException"]; + this.httpStatusCode = _data["httpStatusCode"]; + } + } + + static fromJS(data: any): PagingAuditLogListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingAuditLogListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["sorting"] = this.sorting; + data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined; + data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined; + data["httpMethod"] = this.httpMethod; + data["url"] = this.url; + data["userName"] = this.userName; + data["applicationName"] = this.applicationName; + data["correlationId"] = this.correlationId; + data["maxExecutionDuration"] = this.maxExecutionDuration; + data["minExecutionDuration"] = this.minExecutionDuration; + data["hasException"] = this.hasException; + data["httpStatusCode"] = this.httpStatusCode; + return data; + } } export interface IPagingAuditLogListInput { - pageIndex: number; - pageSize: number; - skipCount: number; - sorting: string | undefined; - startTime: dayjs.Dayjs | undefined; - endTime: dayjs.Dayjs | undefined; - httpMethod: string | undefined; - url: string | undefined; - userName: string | undefined; - applicationName: string | undefined; - correlationId: string | undefined; - maxExecutionDuration: number | undefined; - minExecutionDuration: number | undefined; - hasException: boolean | undefined; - httpStatusCode: HttpStatusCode; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + /** 排序 */ + sorting: string | undefined; + /** 开始时间 */ + startTime: dayjs.Dayjs | undefined; + /** 结束时间 */ + endTime: dayjs.Dayjs | undefined; + /** 请求方法 */ + httpMethod: string | undefined; + /** 请求地址 */ + url: string | undefined; + /** 用户名 */ + userName: string | undefined; + /** 应用程序名称 */ + applicationName: string | undefined; + /** RequestId */ + correlationId: string | undefined; + /** 最大执行时间 */ + maxExecutionDuration: number | undefined; + /** 最小执行时间 */ + minExecutionDuration: number | undefined; + /** 是否有异常 */ + hasException: boolean | undefined; + httpStatusCode: HttpStatusCode; } export class PagingDataDictionaryDetailInput implements IPagingDataDictionaryDetailInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - dataDictionaryId!: string; - filter!: string | undefined; - - constructor(data?: IPagingDataDictionaryDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.dataDictionaryId = _data['dataDictionaryId']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): PagingDataDictionaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryDetailInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['dataDictionaryId'] = this.dataDictionaryId; - data['filter'] = this.filter; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + dataDictionaryId!: string; + filter!: string | undefined; + + constructor(data?: IPagingDataDictionaryDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.dataDictionaryId = _data["dataDictionaryId"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): PagingDataDictionaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryDetailInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["dataDictionaryId"] = this.dataDictionaryId; + data["filter"] = this.filter; + return data; + } } export interface IPagingDataDictionaryDetailInput { - pageIndex: number; - pageSize: number; - skipCount: number; - dataDictionaryId: string; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + dataDictionaryId: string; + filter: string | undefined; } export class PagingDataDictionaryDetailOutput implements IPagingDataDictionaryDetailOutput { - id!: string; - dataDictionaryId!: string; - code!: string | undefined; - order!: number; - displayText!: string | undefined; - description!: string | undefined; - isEnabled!: boolean; - - constructor(data?: IPagingDataDictionaryDetailOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.dataDictionaryId = _data['dataDictionaryId']; - this.code = _data['code']; - this.order = _data['order']; - this.displayText = _data['displayText']; - this.description = _data['description']; - this.isEnabled = _data['isEnabled']; - } - } - - static fromJS(data: any): PagingDataDictionaryDetailOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryDetailOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['dataDictionaryId'] = this.dataDictionaryId; - data['code'] = this.code; - data['order'] = this.order; - data['displayText'] = this.displayText; - data['description'] = this.description; - data['isEnabled'] = this.isEnabled; - return data; - } + id!: string; + /** 所属字典Id */ + dataDictionaryId!: string; + /** 字典明细编码 */ + code!: string | undefined; + /** 展现列表时排序用 */ + order!: number; + /** 英文显示名 */ + displayText!: string | undefined; + /** 描述 */ + description!: string | undefined; + /** 启/停用(默认启用) */ + isEnabled!: boolean; + + constructor(data?: IPagingDataDictionaryDetailOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.dataDictionaryId = _data["dataDictionaryId"]; + this.code = _data["code"]; + this.order = _data["order"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; + this.isEnabled = _data["isEnabled"]; + } + } + + static fromJS(data: any): PagingDataDictionaryDetailOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryDetailOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["dataDictionaryId"] = this.dataDictionaryId; + data["code"] = this.code; + data["order"] = this.order; + data["displayText"] = this.displayText; + data["description"] = this.description; + data["isEnabled"] = this.isEnabled; + return data; + } } export interface IPagingDataDictionaryDetailOutput { - id: string; - dataDictionaryId: string; - code: string | undefined; - order: number; - displayText: string | undefined; - description: string | undefined; - isEnabled: boolean; -} - -export class PagingDataDictionaryDetailOutputPagedResultDto - implements IPagingDataDictionaryDetailOutputPagedResultDto -{ - items!: PagingDataDictionaryDetailOutput[] | undefined; - totalCount!: number; - - constructor(data?: IPagingDataDictionaryDetailOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) - this.items!.push(PagingDataDictionaryDetailOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; - } - } - - static fromJS(data: any): PagingDataDictionaryDetailOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryDetailOutputPagedResultDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); - } - data['totalCount'] = this.totalCount; - return data; - } + id: string; + /** 所属字典Id */ + dataDictionaryId: string; + /** 字典明细编码 */ + code: string | undefined; + /** 展现列表时排序用 */ + order: number; + /** 英文显示名 */ + displayText: string | undefined; + /** 描述 */ + description: string | undefined; + /** 启/停用(默认启用) */ + isEnabled: boolean; +} + +export class PagingDataDictionaryDetailOutputPagedResultDto implements IPagingDataDictionaryDetailOutputPagedResultDto { + items!: PagingDataDictionaryDetailOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPagingDataDictionaryDetailOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(PagingDataDictionaryDetailOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): PagingDataDictionaryDetailOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryDetailOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } } export interface IPagingDataDictionaryDetailOutputPagedResultDto { - items: PagingDataDictionaryDetailOutput[] | undefined; - totalCount: number; + items: PagingDataDictionaryDetailOutput[] | undefined; + totalCount: number; } export class PagingDataDictionaryInput implements IPagingDataDictionaryInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingDataDictionaryInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): PagingDataDictionaryInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['filter'] = this.filter; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPagingDataDictionaryInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): PagingDataDictionaryInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["filter"] = this.filter; + return data; + } } export interface IPagingDataDictionaryInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + filter: string | undefined; } export class PagingDataDictionaryOutput implements IPagingDataDictionaryOutput { - id!: string; - code!: string | undefined; - displayText!: string | undefined; - description!: string | undefined; - - constructor(data?: IPagingDataDictionaryOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.code = _data['code']; - this.displayText = _data['displayText']; - this.description = _data['description']; - } - } - - static fromJS(data: any): PagingDataDictionaryOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['code'] = this.code; - data['displayText'] = this.displayText; - data['description'] = this.description; - return data; - } + id!: string; + /** 字典编码 */ + code!: string | undefined; + /** 显示名 */ + displayText!: string | undefined; + /** 描述 */ + description!: string | undefined; + + constructor(data?: IPagingDataDictionaryOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.code = _data["code"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; + } + } + + static fromJS(data: any): PagingDataDictionaryOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["code"] = this.code; + data["displayText"] = this.displayText; + data["description"] = this.description; + return data; + } } export interface IPagingDataDictionaryOutput { - id: string; - code: string | undefined; - displayText: string | undefined; - description: string | undefined; -} - -export class PagingDataDictionaryOutputPagedResultDto - implements IPagingDataDictionaryOutputPagedResultDto -{ - items!: PagingDataDictionaryOutput[] | undefined; - totalCount!: number; - - constructor(data?: IPagingDataDictionaryOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(PagingDataDictionaryOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; - } - } - - static fromJS(data: any): PagingDataDictionaryOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingDataDictionaryOutputPagedResultDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); - } - data['totalCount'] = this.totalCount; - return data; - } + id: string; + /** 字典编码 */ + code: string | undefined; + /** 显示名 */ + displayText: string | undefined; + /** 描述 */ + description: string | undefined; +} + +export class PagingDataDictionaryOutputPagedResultDto implements IPagingDataDictionaryOutputPagedResultDto { + items!: PagingDataDictionaryOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPagingDataDictionaryOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(PagingDataDictionaryOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): PagingDataDictionaryOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingDataDictionaryOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } } export interface IPagingDataDictionaryOutputPagedResultDto { - items: PagingDataDictionaryOutput[] | undefined; - totalCount: number; + items: PagingDataDictionaryOutput[] | undefined; + totalCount: number; } export class PagingElasticSearchLogInput implements IPagingElasticSearchLogInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - startCreationTime!: dayjs.Dayjs | undefined; - endCreationTime!: dayjs.Dayjs | undefined; - - constructor(data?: IPagingElasticSearchLogInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.filter = _data['filter']; - this.startCreationTime = _data['startCreationTime'] - ? dayjs(_data['startCreationTime'].toString()) - : undefined; - this.endCreationTime = _data['endCreationTime'] - ? dayjs(_data['endCreationTime'].toString()) - : undefined; - } - } - - static fromJS(data: any): PagingElasticSearchLogInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingElasticSearchLogInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['filter'] = this.filter; - data['startCreationTime'] = this.startCreationTime - ? this.startCreationTime.toISOString() - : undefined; - data['endCreationTime'] = this.endCreationTime - ? this.endCreationTime.toISOString() - : undefined; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + filter!: string | undefined; + startCreationTime!: dayjs.Dayjs | undefined; + endCreationTime!: dayjs.Dayjs | undefined; + + constructor(data?: IPagingElasticSearchLogInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.filter = _data["filter"]; + this.startCreationTime = _data["startCreationTime"] ? dayjs(_data["startCreationTime"].toString()) : undefined; + this.endCreationTime = _data["endCreationTime"] ? dayjs(_data["endCreationTime"].toString()) : undefined; + } + } + + static fromJS(data: any): PagingElasticSearchLogInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingElasticSearchLogInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["filter"] = this.filter; + data["startCreationTime"] = this.startCreationTime ? this.startCreationTime.toISOString() : undefined; + data["endCreationTime"] = this.endCreationTime ? this.endCreationTime.toISOString() : undefined; + return data; + } } export interface IPagingElasticSearchLogInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; - startCreationTime: dayjs.Dayjs | undefined; - endCreationTime: dayjs.Dayjs | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + filter: string | undefined; + startCreationTime: dayjs.Dayjs | undefined; + endCreationTime: dayjs.Dayjs | undefined; } export class PagingElasticSearchLogOutput implements IPagingElasticSearchLogOutput { - level!: string | undefined; - message!: string | undefined; - creationTime!: dayjs.Dayjs; - - constructor(data?: IPagingElasticSearchLogOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.level = _data['level']; - this.message = _data['message']; - this.creationTime = _data['creationTime'] - ? dayjs(_data['creationTime'].toString()) - : undefined; - } - } - - static fromJS(data: any): PagingElasticSearchLogOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingElasticSearchLogOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['level'] = this.level; - data['message'] = this.message; - data['creationTime'] = this.creationTime ? this.creationTime.toISOString() : undefined; - return data; - } + /** 日志级别 */ + level!: string | undefined; + /** 日志内容 */ + message!: string | undefined; + /** 创建时间 */ + creationTime!: dayjs.Dayjs; + + constructor(data?: IPagingElasticSearchLogOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.level = _data["level"]; + this.message = _data["message"]; + this.creationTime = _data["creationTime"] ? dayjs(_data["creationTime"].toString()) : undefined; + } + } + + static fromJS(data: any): PagingElasticSearchLogOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingElasticSearchLogOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["level"] = this.level; + data["message"] = this.message; + data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : undefined; + return data; + } } export interface IPagingElasticSearchLogOutput { - level: string | undefined; - message: string | undefined; - creationTime: dayjs.Dayjs; -} - -export class PagingElasticSearchLogOutputCustomPagedResultDto - implements IPagingElasticSearchLogOutputCustomPagedResultDto -{ - items!: PagingElasticSearchLogOutput[] | undefined; - totalCount!: number; - - constructor(data?: IPagingElasticSearchLogOutputCustomPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) - this.items!.push(PagingElasticSearchLogOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; - } - } - - static fromJS(data: any): PagingElasticSearchLogOutputCustomPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingElasticSearchLogOutputCustomPagedResultDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); - } - data['totalCount'] = this.totalCount; - return data; - } + /** 日志级别 */ + level: string | undefined; + /** 日志内容 */ + message: string | undefined; + /** 创建时间 */ + creationTime: dayjs.Dayjs; +} + +export class PagingElasticSearchLogOutputCustomPagedResultDto implements IPagingElasticSearchLogOutputCustomPagedResultDto { + items!: PagingElasticSearchLogOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPagingElasticSearchLogOutputCustomPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(PagingElasticSearchLogOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): PagingElasticSearchLogOutputCustomPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingElasticSearchLogOutputCustomPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } } export interface IPagingElasticSearchLogOutputCustomPagedResultDto { - items: PagingElasticSearchLogOutput[] | undefined; - totalCount: number; + items: PagingElasticSearchLogOutput[] | undefined; + totalCount: number; } export class PagingNotificationListInput implements IPagingNotificationListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - - constructor(data?: IPagingNotificationListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - } - } - - static fromJS(data: any): PagingNotificationListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingNotificationListInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + + constructor(data?: IPagingNotificationListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + } + } + + static fromJS(data: any): PagingNotificationListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingNotificationListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + return data; + } } export interface IPagingNotificationListInput { - pageIndex: number; - pageSize: number; - skipCount: number; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; } export class PagingNotificationListOutput implements IPagingNotificationListOutput { - id!: string; - title!: string | undefined; - content!: string | undefined; - messageType!: MessageType; - readonly messageTypeDescription!: string | undefined; - messageLevel!: MessageLevel; - readonly messageLevelDescription!: string | undefined; - senderId!: string; - creationTime!: dayjs.Dayjs; - read!: boolean; - - constructor(data?: IPagingNotificationListOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.title = _data['title']; - this.content = _data['content']; - this.messageType = _data['messageType']; - (this).messageTypeDescription = _data['messageTypeDescription']; - this.messageLevel = _data['messageLevel']; - (this).messageLevelDescription = _data['messageLevelDescription']; - this.senderId = _data['senderId']; - this.creationTime = _data['creationTime'] - ? dayjs(_data['creationTime'].toString()) - : undefined; - this.read = _data['read']; - } - } - - static fromJS(data: any): PagingNotificationListOutput { - data = typeof data === 'object' ? data : {}; - let result = new PagingNotificationListOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['title'] = this.title; - data['content'] = this.content; - data['messageType'] = this.messageType; - data['messageTypeDescription'] = this.messageTypeDescription; - data['messageLevel'] = this.messageLevel; - data['messageLevelDescription'] = this.messageLevelDescription; - data['senderId'] = this.senderId; - data['creationTime'] = this.creationTime ? this.creationTime.toISOString() : undefined; - data['read'] = this.read; - return data; - } + id!: string; + /** 消息标题 */ + title!: string | undefined; + /** 消息内容 */ + content!: string | undefined; + messageType!: MessageType; + readonly messageTypeDescription!: string | undefined; + messageLevel!: MessageLevel; + readonly messageLevelDescription!: string | undefined; + /** 发送人 */ + senderId!: string; + /** 创建时间 */ + creationTime!: dayjs.Dayjs; + /** 是否已读 */ + read!: boolean; + + constructor(data?: IPagingNotificationListOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.title = _data["title"]; + this.content = _data["content"]; + this.messageType = _data["messageType"]; + (this).messageTypeDescription = _data["messageTypeDescription"]; + this.messageLevel = _data["messageLevel"]; + (this).messageLevelDescription = _data["messageLevelDescription"]; + this.senderId = _data["senderId"]; + this.creationTime = _data["creationTime"] ? dayjs(_data["creationTime"].toString()) : undefined; + this.read = _data["read"]; + } + } + + static fromJS(data: any): PagingNotificationListOutput { + data = typeof data === 'object' ? data : {}; + let result = new PagingNotificationListOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["title"] = this.title; + data["content"] = this.content; + data["messageType"] = this.messageType; + data["messageTypeDescription"] = this.messageTypeDescription; + data["messageLevel"] = this.messageLevel; + data["messageLevelDescription"] = this.messageLevelDescription; + data["senderId"] = this.senderId; + data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : undefined; + data["read"] = this.read; + return data; + } } export interface IPagingNotificationListOutput { - id: string; - title: string | undefined; - content: string | undefined; - messageType: MessageType; - messageTypeDescription: string | undefined; - messageLevel: MessageLevel; - messageLevelDescription: string | undefined; - senderId: string; - creationTime: dayjs.Dayjs; - read: boolean; -} - -export class PagingNotificationListOutputPagedResultDto - implements IPagingNotificationListOutputPagedResultDto -{ - items!: PagingNotificationListOutput[] | undefined; - totalCount!: number; - - constructor(data?: IPagingNotificationListOutputPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) - this.items!.push(PagingNotificationListOutput.fromJS(item)); - } - this.totalCount = _data['totalCount']; - } - } - - static fromJS(data: any): PagingNotificationListOutputPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new PagingNotificationListOutputPagedResultDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); - } - data['totalCount'] = this.totalCount; - return data; - } + id: string; + /** 消息标题 */ + title: string | undefined; + /** 消息内容 */ + content: string | undefined; + messageType: MessageType; + messageTypeDescription: string | undefined; + messageLevel: MessageLevel; + messageLevelDescription: string | undefined; + /** 发送人 */ + senderId: string; + /** 创建时间 */ + creationTime: dayjs.Dayjs; + /** 是否已读 */ + read: boolean; +} + +export class PagingNotificationListOutputPagedResultDto implements IPagingNotificationListOutputPagedResultDto { + items!: PagingNotificationListOutput[] | undefined; + totalCount!: number; + + constructor(data?: IPagingNotificationListOutputPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(PagingNotificationListOutput.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } + } + + static fromJS(data: any): PagingNotificationListOutputPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new PagingNotificationListOutputPagedResultDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; + } } export interface IPagingNotificationListOutputPagedResultDto { - items: PagingNotificationListOutput[] | undefined; - totalCount: number; + items: PagingNotificationListOutput[] | undefined; + totalCount: number; } export class PagingRoleListInput implements IPagingRoleListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingRoleListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): PagingRoleListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingRoleListInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['filter'] = this.filter; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPagingRoleListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): PagingRoleListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingRoleListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["filter"] = this.filter; + return data; + } } export interface IPagingRoleListInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + filter: string | undefined; } -export class PagingTenantInput implements IPagingTenantInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingTenantInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): PagingTenantInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingTenantInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['filter'] = this.filter; - return data; - } +export class PagingTenantInput implements IPagingTenantInput { + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + filter!: string | undefined; + + constructor(data?: IPagingTenantInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): PagingTenantInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingTenantInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["filter"] = this.filter; + return data; + } } export interface IPagingTenantInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + filter: string | undefined; } export class PagingUserListInput implements IPagingUserListInput { - pageIndex!: number; - pageSize!: number; - readonly skipCount!: number; - filter!: string | undefined; - - constructor(data?: IPagingUserListInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.pageIndex = _data['pageIndex']; - this.pageSize = _data['pageSize']; - (this).skipCount = _data['skipCount']; - this.filter = _data['filter']; - } - } - - static fromJS(data: any): PagingUserListInput { - data = typeof data === 'object' ? data : {}; - let result = new PagingUserListInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['pageIndex'] = this.pageIndex; - data['pageSize'] = this.pageSize; - data['skipCount'] = this.skipCount; - data['filter'] = this.filter; - return data; - } + /** 当前页面.默认从1开始 */ + pageIndex!: number; + /** 每页多少条.每页显示多少记录 */ + pageSize!: number; + /** 跳过多少条 */ + readonly skipCount!: number; + /** 关键字 */ + filter!: string | undefined; + + constructor(data?: IPagingUserListInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.pageIndex = _data["pageIndex"]; + this.pageSize = _data["pageSize"]; + (this).skipCount = _data["skipCount"]; + this.filter = _data["filter"]; + } + } + + static fromJS(data: any): PagingUserListInput { + data = typeof data === 'object' ? data : {}; + let result = new PagingUserListInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["pageIndex"] = this.pageIndex; + data["pageSize"] = this.pageSize; + data["skipCount"] = this.skipCount; + data["filter"] = this.filter; + return data; + } } export interface IPagingUserListInput { - pageIndex: number; - pageSize: number; - skipCount: number; - filter: string | undefined; + /** 当前页面.默认从1开始 */ + pageIndex: number; + /** 每页多少条.每页显示多少记录 */ + pageSize: number; + /** 跳过多少条 */ + skipCount: number; + /** 关键字 */ + filter: string | undefined; } export class ParameterApiDescriptionModel implements IParameterApiDescriptionModel { - nameOnMethod!: string | undefined; - name!: string | undefined; - jsonName!: string | undefined; - type!: string | undefined; - typeSimple!: string | undefined; - isOptional!: boolean; - defaultValue!: any | undefined; - constraintTypes!: string[] | undefined; - bindingSourceId!: string | undefined; - descriptorName!: string | undefined; - - constructor(data?: IParameterApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.nameOnMethod = _data['nameOnMethod']; - this.name = _data['name']; - this.jsonName = _data['jsonName']; - this.type = _data['type']; - this.typeSimple = _data['typeSimple']; - this.isOptional = _data['isOptional']; - this.defaultValue = _data['defaultValue']; - if (Array.isArray(_data['constraintTypes'])) { - this.constraintTypes = [] as any; - for (let item of _data['constraintTypes']) this.constraintTypes!.push(item); - } - this.bindingSourceId = _data['bindingSourceId']; - this.descriptorName = _data['descriptorName']; - } - } - - static fromJS(data: any): ParameterApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ParameterApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['nameOnMethod'] = this.nameOnMethod; - data['name'] = this.name; - data['jsonName'] = this.jsonName; - data['type'] = this.type; - data['typeSimple'] = this.typeSimple; - data['isOptional'] = this.isOptional; - data['defaultValue'] = this.defaultValue; - if (Array.isArray(this.constraintTypes)) { - data['constraintTypes'] = []; - for (let item of this.constraintTypes) data['constraintTypes'].push(item); - } - data['bindingSourceId'] = this.bindingSourceId; - data['descriptorName'] = this.descriptorName; - return data; - } + nameOnMethod!: string | undefined; + name!: string | undefined; + jsonName!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; + isOptional!: boolean; + defaultValue!: any | undefined; + constraintTypes!: string[] | undefined; + bindingSourceId!: string | undefined; + descriptorName!: string | undefined; + + constructor(data?: IParameterApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.nameOnMethod = _data["nameOnMethod"]; + this.name = _data["name"]; + this.jsonName = _data["jsonName"]; + this.type = _data["type"]; + this.typeSimple = _data["typeSimple"]; + this.isOptional = _data["isOptional"]; + this.defaultValue = _data["defaultValue"]; + if (Array.isArray(_data["constraintTypes"])) { + this.constraintTypes = [] as any; + for (let item of _data["constraintTypes"]) + this.constraintTypes!.push(item); + } + this.bindingSourceId = _data["bindingSourceId"]; + this.descriptorName = _data["descriptorName"]; + } + } + + static fromJS(data: any): ParameterApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ParameterApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["nameOnMethod"] = this.nameOnMethod; + data["name"] = this.name; + data["jsonName"] = this.jsonName; + data["type"] = this.type; + data["typeSimple"] = this.typeSimple; + data["isOptional"] = this.isOptional; + data["defaultValue"] = this.defaultValue; + if (Array.isArray(this.constraintTypes)) { + data["constraintTypes"] = []; + for (let item of this.constraintTypes) + data["constraintTypes"].push(item); + } + data["bindingSourceId"] = this.bindingSourceId; + data["descriptorName"] = this.descriptorName; + return data; + } } export interface IParameterApiDescriptionModel { - nameOnMethod: string | undefined; - name: string | undefined; - jsonName: string | undefined; - type: string | undefined; - typeSimple: string | undefined; - isOptional: boolean; - defaultValue: any | undefined; - constraintTypes: string[] | undefined; - bindingSourceId: string | undefined; - descriptorName: string | undefined; + nameOnMethod: string | undefined; + name: string | undefined; + jsonName: string | undefined; + type: string | undefined; + typeSimple: string | undefined; + isOptional: boolean; + defaultValue: any | undefined; + constraintTypes: string[] | undefined; + bindingSourceId: string | undefined; + descriptorName: string | undefined; } export class PermissionOutput implements IPermissionOutput { - grants!: string[] | undefined; - allGrants!: string[] | undefined; - permissions!: PermissionTreeDto[] | undefined; - - constructor(data?: IPermissionOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['grants'])) { - this.grants = [] as any; - for (let item of _data['grants']) this.grants!.push(item); - } - if (Array.isArray(_data['allGrants'])) { - this.allGrants = [] as any; - for (let item of _data['allGrants']) this.allGrants!.push(item); - } - if (Array.isArray(_data['permissions'])) { - this.permissions = [] as any; - for (let item of _data['permissions']) - this.permissions!.push(PermissionTreeDto.fromJS(item)); - } - } - } - - static fromJS(data: any): PermissionOutput { - data = typeof data === 'object' ? data : {}; - let result = new PermissionOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.grants)) { - data['grants'] = []; - for (let item of this.grants) data['grants'].push(item); - } - if (Array.isArray(this.allGrants)) { - data['allGrants'] = []; - for (let item of this.allGrants) data['allGrants'].push(item); - } - if (Array.isArray(this.permissions)) { - data['permissions'] = []; - for (let item of this.permissions) data['permissions'].push(item.toJSON()); - } - return data; - } + grants!: string[] | undefined; + allGrants!: string[] | undefined; + permissions!: PermissionTreeDto[] | undefined; + + constructor(data?: IPermissionOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["grants"])) { + this.grants = [] as any; + for (let item of _data["grants"]) + this.grants!.push(item); + } + if (Array.isArray(_data["allGrants"])) { + this.allGrants = [] as any; + for (let item of _data["allGrants"]) + this.allGrants!.push(item); + } + if (Array.isArray(_data["permissions"])) { + this.permissions = [] as any; + for (let item of _data["permissions"]) + this.permissions!.push(PermissionTreeDto.fromJS(item)); + } + } + } + + static fromJS(data: any): PermissionOutput { + data = typeof data === 'object' ? data : {}; + let result = new PermissionOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.grants)) { + data["grants"] = []; + for (let item of this.grants) + data["grants"].push(item); + } + if (Array.isArray(this.allGrants)) { + data["allGrants"] = []; + for (let item of this.allGrants) + data["allGrants"].push(item); + } + if (Array.isArray(this.permissions)) { + data["permissions"] = []; + for (let item of this.permissions) + data["permissions"].push(item.toJSON()); + } + return data; + } } export interface IPermissionOutput { - grants: string[] | undefined; - allGrants: string[] | undefined; - permissions: PermissionTreeDto[] | undefined; + grants: string[] | undefined; + allGrants: string[] | undefined; + permissions: PermissionTreeDto[] | undefined; } export class PermissionTreeDto implements IPermissionTreeDto { - title!: string | undefined; - key!: string | undefined; - children!: PermissionTreeDto[] | undefined; - - constructor(data?: IPermissionTreeDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.title = _data['title']; - this.key = _data['key']; - if (Array.isArray(_data['children'])) { - this.children = [] as any; - for (let item of _data['children']) this.children!.push(PermissionTreeDto.fromJS(item)); - } - } - } - - static fromJS(data: any): PermissionTreeDto { - data = typeof data === 'object' ? data : {}; - let result = new PermissionTreeDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['title'] = this.title; - data['key'] = this.key; - if (Array.isArray(this.children)) { - data['children'] = []; - for (let item of this.children) data['children'].push(item.toJSON()); - } - return data; - } + title!: string | undefined; + key!: string | undefined; + children!: PermissionTreeDto[] | undefined; + + constructor(data?: IPermissionTreeDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.title = _data["title"]; + this.key = _data["key"]; + if (Array.isArray(_data["children"])) { + this.children = [] as any; + for (let item of _data["children"]) + this.children!.push(PermissionTreeDto.fromJS(item)); + } + } + } + + static fromJS(data: any): PermissionTreeDto { + data = typeof data === 'object' ? data : {}; + let result = new PermissionTreeDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["title"] = this.title; + data["key"] = this.key; + if (Array.isArray(this.children)) { + data["children"] = []; + for (let item of this.children) + data["children"].push(item.toJSON()); + } + return data; + } } export interface IPermissionTreeDto { - title: string | undefined; - key: string | undefined; - children: PermissionTreeDto[] | undefined; + title: string | undefined; + key: string | undefined; + children: PermissionTreeDto[] | undefined; } export class PropertyApiDescriptionModel implements IPropertyApiDescriptionModel { - name!: string | undefined; - jsonName!: string | undefined; - type!: string | undefined; - typeSimple!: string | undefined; - isRequired!: boolean; - minLength!: number | undefined; - maxLength!: number | undefined; - minimum!: string | undefined; - maximum!: string | undefined; - regex!: string | undefined; - - constructor(data?: IPropertyApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.jsonName = _data['jsonName']; - this.type = _data['type']; - this.typeSimple = _data['typeSimple']; - this.isRequired = _data['isRequired']; - this.minLength = _data['minLength']; - this.maxLength = _data['maxLength']; - this.minimum = _data['minimum']; - this.maximum = _data['maximum']; - this.regex = _data['regex']; - } - } - - static fromJS(data: any): PropertyApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new PropertyApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['jsonName'] = this.jsonName; - data['type'] = this.type; - data['typeSimple'] = this.typeSimple; - data['isRequired'] = this.isRequired; - data['minLength'] = this.minLength; - data['maxLength'] = this.maxLength; - data['minimum'] = this.minimum; - data['maximum'] = this.maximum; - data['regex'] = this.regex; - return data; - } + name!: string | undefined; + jsonName!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; + isRequired!: boolean; + minLength!: number | undefined; + maxLength!: number | undefined; + minimum!: string | undefined; + maximum!: string | undefined; + regex!: string | undefined; + + constructor(data?: IPropertyApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.jsonName = _data["jsonName"]; + this.type = _data["type"]; + this.typeSimple = _data["typeSimple"]; + this.isRequired = _data["isRequired"]; + this.minLength = _data["minLength"]; + this.maxLength = _data["maxLength"]; + this.minimum = _data["minimum"]; + this.maximum = _data["maximum"]; + this.regex = _data["regex"]; + } + } + + static fromJS(data: any): PropertyApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new PropertyApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["jsonName"] = this.jsonName; + data["type"] = this.type; + data["typeSimple"] = this.typeSimple; + data["isRequired"] = this.isRequired; + data["minLength"] = this.minLength; + data["maxLength"] = this.maxLength; + data["minimum"] = this.minimum; + data["maximum"] = this.maximum; + data["regex"] = this.regex; + return data; + } } export interface IPropertyApiDescriptionModel { - name: string | undefined; - jsonName: string | undefined; - type: string | undefined; - typeSimple: string | undefined; - isRequired: boolean; - minLength: number | undefined; - maxLength: number | undefined; - minimum: string | undefined; - maximum: string | undefined; - regex: string | undefined; + name: string | undefined; + jsonName: string | undefined; + type: string | undefined; + typeSimple: string | undefined; + isRequired: boolean; + minLength: number | undefined; + maxLength: number | undefined; + minimum: string | undefined; + maximum: string | undefined; + regex: string | undefined; } export class RemoteServiceErrorInfo implements IRemoteServiceErrorInfo { - code!: string | undefined; - message!: string | undefined; - details!: string | undefined; - data!: { [key: string]: any } | undefined; - validationErrors!: RemoteServiceValidationErrorInfo[] | undefined; - - constructor(data?: IRemoteServiceErrorInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.code = _data['code']; - this.message = _data['message']; - this.details = _data['details']; - if (_data['data']) { - this.data = {} as any; - for (let key in _data['data']) { - if (_data['data'].hasOwnProperty(key)) (this.data)![key] = _data['data'][key]; - } - } - if (Array.isArray(_data['validationErrors'])) { - this.validationErrors = [] as any; - for (let item of _data['validationErrors']) - this.validationErrors!.push(RemoteServiceValidationErrorInfo.fromJS(item)); - } - } - } - - static fromJS(data: any): RemoteServiceErrorInfo { - data = typeof data === 'object' ? data : {}; - let result = new RemoteServiceErrorInfo(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['code'] = this.code; - data['message'] = this.message; - data['details'] = this.details; - if (this.data) { - data['data'] = {}; - for (let key in this.data) { - if (this.data.hasOwnProperty(key)) (data['data'])[key] = (this.data)[key]; - } - } - if (Array.isArray(this.validationErrors)) { - data['validationErrors'] = []; - for (let item of this.validationErrors) data['validationErrors'].push(item.toJSON()); - } - return data; - } + code!: string | undefined; + message!: string | undefined; + details!: string | undefined; + data!: { [key: string]: any; } | undefined; + validationErrors!: RemoteServiceValidationErrorInfo[] | undefined; + + constructor(data?: IRemoteServiceErrorInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.code = _data["code"]; + this.message = _data["message"]; + this.details = _data["details"]; + if (_data["data"]) { + this.data = {} as any; + for (let key in _data["data"]) { + if (_data["data"].hasOwnProperty(key)) + (this.data)![key] = _data["data"][key]; + } + } + if (Array.isArray(_data["validationErrors"])) { + this.validationErrors = [] as any; + for (let item of _data["validationErrors"]) + this.validationErrors!.push(RemoteServiceValidationErrorInfo.fromJS(item)); + } + } + } + + static fromJS(data: any): RemoteServiceErrorInfo { + data = typeof data === 'object' ? data : {}; + let result = new RemoteServiceErrorInfo(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["code"] = this.code; + data["message"] = this.message; + data["details"] = this.details; + if (this.data) { + data["data"] = {}; + for (let key in this.data) { + if (this.data.hasOwnProperty(key)) + (data["data"])[key] = (this.data)[key]; + } + } + if (Array.isArray(this.validationErrors)) { + data["validationErrors"] = []; + for (let item of this.validationErrors) + data["validationErrors"].push(item.toJSON()); + } + return data; + } } export interface IRemoteServiceErrorInfo { - code: string | undefined; - message: string | undefined; - details: string | undefined; - data: { [key: string]: any } | undefined; - validationErrors: RemoteServiceValidationErrorInfo[] | undefined; + code: string | undefined; + message: string | undefined; + details: string | undefined; + data: { [key: string]: any; } | undefined; + validationErrors: RemoteServiceValidationErrorInfo[] | undefined; } export class RemoteServiceErrorResponse implements IRemoteServiceErrorResponse { - error!: RemoteServiceErrorInfo; + error!: RemoteServiceErrorInfo; - constructor(data?: IRemoteServiceErrorResponse) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IRemoteServiceErrorResponse) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.error = _data['error'] ? RemoteServiceErrorInfo.fromJS(_data['error']) : undefined; + init(_data?: any) { + if (_data) { + this.error = _data["error"] ? RemoteServiceErrorInfo.fromJS(_data["error"]) : undefined; + } } - } - static fromJS(data: any): RemoteServiceErrorResponse { - data = typeof data === 'object' ? data : {}; - let result = new RemoteServiceErrorResponse(); - result.init(data); - return result; - } + static fromJS(data: any): RemoteServiceErrorResponse { + data = typeof data === 'object' ? data : {}; + let result = new RemoteServiceErrorResponse(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['error'] = this.error ? this.error.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["error"] = this.error ? this.error.toJSON() : undefined; + return data; + } } export interface IRemoteServiceErrorResponse { - error: RemoteServiceErrorInfo; + error: RemoteServiceErrorInfo; } export class RemoteServiceValidationErrorInfo implements IRemoteServiceValidationErrorInfo { - message!: string | undefined; - members!: string[] | undefined; + message!: string | undefined; + members!: string[] | undefined; - constructor(data?: IRemoteServiceValidationErrorInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IRemoteServiceValidationErrorInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.message = _data['message']; - if (Array.isArray(_data['members'])) { - this.members = [] as any; - for (let item of _data['members']) this.members!.push(item); - } + init(_data?: any) { + if (_data) { + this.message = _data["message"]; + if (Array.isArray(_data["members"])) { + this.members = [] as any; + for (let item of _data["members"]) + this.members!.push(item); + } + } } - } - static fromJS(data: any): RemoteServiceValidationErrorInfo { - data = typeof data === 'object' ? data : {}; - let result = new RemoteServiceValidationErrorInfo(); - result.init(data); - return result; - } + static fromJS(data: any): RemoteServiceValidationErrorInfo { + data = typeof data === 'object' ? data : {}; + let result = new RemoteServiceValidationErrorInfo(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['message'] = this.message; - if (Array.isArray(this.members)) { - data['members'] = []; - for (let item of this.members) data['members'].push(item); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["message"] = this.message; + if (Array.isArray(this.members)) { + data["members"] = []; + for (let item of this.members) + data["members"].push(item); + } + return data; } - return data; - } } export interface IRemoteServiceValidationErrorInfo { - message: string | undefined; - members: string[] | undefined; + message: string | undefined; + members: string[] | undefined; } export class RemoveRoleToOrganizationUnitInput implements IRemoveRoleToOrganizationUnitInput { - roleId!: string; - organizationUnitId!: string; + roleId!: string; + organizationUnitId!: string; - constructor(data?: IRemoveRoleToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IRemoveRoleToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.roleId = _data['roleId']; - this.organizationUnitId = _data['organizationUnitId']; + init(_data?: any) { + if (_data) { + this.roleId = _data["roleId"]; + this.organizationUnitId = _data["organizationUnitId"]; + } } - } - static fromJS(data: any): RemoveRoleToOrganizationUnitInput { - data = typeof data === 'object' ? data : {}; - let result = new RemoveRoleToOrganizationUnitInput(); - result.init(data); - return result; - } + static fromJS(data: any): RemoveRoleToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new RemoveRoleToOrganizationUnitInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['roleId'] = this.roleId; - data['organizationUnitId'] = this.organizationUnitId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["roleId"] = this.roleId; + data["organizationUnitId"] = this.organizationUnitId; + return data; + } } export interface IRemoveRoleToOrganizationUnitInput { - roleId: string; - organizationUnitId: string; + roleId: string; + organizationUnitId: string; } export class RemoveUserToOrganizationUnitInput implements IRemoveUserToOrganizationUnitInput { - userId!: string; - organizationUnitId!: string; + userId!: string; + organizationUnitId!: string; - constructor(data?: IRemoveUserToOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IRemoveUserToOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.userId = _data['userId']; - this.organizationUnitId = _data['organizationUnitId']; + init(_data?: any) { + if (_data) { + this.userId = _data["userId"]; + this.organizationUnitId = _data["organizationUnitId"]; + } } - } - static fromJS(data: any): RemoveUserToOrganizationUnitInput { - data = typeof data === 'object' ? data : {}; - let result = new RemoveUserToOrganizationUnitInput(); - result.init(data); - return result; - } + static fromJS(data: any): RemoveUserToOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new RemoveUserToOrganizationUnitInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['userId'] = this.userId; - data['organizationUnitId'] = this.organizationUnitId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["userId"] = this.userId; + data["organizationUnitId"] = this.organizationUnitId; + return data; + } } export interface IRemoveUserToOrganizationUnitInput { - userId: string; - organizationUnitId: string; + userId: string; + organizationUnitId: string; } export class ReturnValueApiDescriptionModel implements IReturnValueApiDescriptionModel { - type!: string | undefined; - typeSimple!: string | undefined; + type!: string | undefined; + typeSimple!: string | undefined; - constructor(data?: IReturnValueApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IReturnValueApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.type = _data['type']; - this.typeSimple = _data['typeSimple']; + init(_data?: any) { + if (_data) { + this.type = _data["type"]; + this.typeSimple = _data["typeSimple"]; + } } - } - static fromJS(data: any): ReturnValueApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new ReturnValueApiDescriptionModel(); - result.init(data); - return result; - } + static fromJS(data: any): ReturnValueApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new ReturnValueApiDescriptionModel(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['type'] = this.type; - data['typeSimple'] = this.typeSimple; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["type"] = this.type; + data["typeSimple"] = this.typeSimple; + return data; + } } export interface IReturnValueApiDescriptionModel { - type: string | undefined; - typeSimple: string | undefined; + type: string | undefined; + typeSimple: string | undefined; } export class SendBroadCastMessageInput implements ISendBroadCastMessageInput { - title!: string | undefined; - content!: string | undefined; + /** 消息标题 */ + title!: string | undefined; + /** 消息内容 */ + content!: string | undefined; - constructor(data?: ISendBroadCastMessageInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ISendBroadCastMessageInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.title = _data['title']; - this.content = _data['content']; + init(_data?: any) { + if (_data) { + this.title = _data["title"]; + this.content = _data["content"]; + } } - } - static fromJS(data: any): SendBroadCastMessageInput { - data = typeof data === 'object' ? data : {}; - let result = new SendBroadCastMessageInput(); - result.init(data); - return result; - } + static fromJS(data: any): SendBroadCastMessageInput { + data = typeof data === 'object' ? data : {}; + let result = new SendBroadCastMessageInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['title'] = this.title; - data['content'] = this.content; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["title"] = this.title; + data["content"] = this.content; + return data; + } } export interface ISendBroadCastMessageInput { - title: string | undefined; - content: string | undefined; + /** 消息标题 */ + title: string | undefined; + /** 消息内容 */ + content: string | undefined; } export class SendCommonMessageInput implements ISendCommonMessageInput { - title!: string | undefined; - content!: string | undefined; - receiveIds!: string[] | undefined; - - constructor(data?: ISendCommonMessageInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.title = _data['title']; - this.content = _data['content']; - if (Array.isArray(_data['receiveIds'])) { - this.receiveIds = [] as any; - for (let item of _data['receiveIds']) this.receiveIds!.push(item); - } - } - } - - static fromJS(data: any): SendCommonMessageInput { - data = typeof data === 'object' ? data : {}; - let result = new SendCommonMessageInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['title'] = this.title; - data['content'] = this.content; - if (Array.isArray(this.receiveIds)) { - data['receiveIds'] = []; - for (let item of this.receiveIds) data['receiveIds'].push(item); - } - return data; - } + /** 消息标题 */ + title!: string | undefined; + /** 消息内容 */ + content!: string | undefined; + /** 发送人 */ + receiveIds!: string[] | undefined; + + constructor(data?: ISendCommonMessageInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.title = _data["title"]; + this.content = _data["content"]; + if (Array.isArray(_data["receiveIds"])) { + this.receiveIds = [] as any; + for (let item of _data["receiveIds"]) + this.receiveIds!.push(item); + } + } + } + + static fromJS(data: any): SendCommonMessageInput { + data = typeof data === 'object' ? data : {}; + let result = new SendCommonMessageInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["title"] = this.title; + data["content"] = this.content; + if (Array.isArray(this.receiveIds)) { + data["receiveIds"] = []; + for (let item of this.receiveIds) + data["receiveIds"].push(item); + } + return data; + } } export interface ISendCommonMessageInput { - title: string | undefined; - content: string | undefined; - receiveIds: string[] | undefined; + /** 消息标题 */ + title: string | undefined; + /** 消息内容 */ + content: string | undefined; + /** 发送人 */ + receiveIds: string[] | undefined; } export class SetDataDictinaryDetailInput implements ISetDataDictinaryDetailInput { - dataDictionaryId!: string; - dataDictionayDetailId!: string; - isEnabled!: boolean; - - constructor(data?: ISetDataDictinaryDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.dataDictionaryId = _data['dataDictionaryId']; - this.dataDictionayDetailId = _data['dataDictionayDetailId']; - this.isEnabled = _data['isEnabled']; - } - } - - static fromJS(data: any): SetDataDictinaryDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new SetDataDictinaryDetailInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['dataDictionaryId'] = this.dataDictionaryId; - data['dataDictionayDetailId'] = this.dataDictionayDetailId; - data['isEnabled'] = this.isEnabled; - return data; - } + dataDictionaryId!: string; + dataDictionayDetailId!: string; + isEnabled!: boolean; + + constructor(data?: ISetDataDictinaryDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.dataDictionaryId = _data["dataDictionaryId"]; + this.dataDictionayDetailId = _data["dataDictionayDetailId"]; + this.isEnabled = _data["isEnabled"]; + } + } + + static fromJS(data: any): SetDataDictinaryDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new SetDataDictinaryDetailInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["dataDictionaryId"] = this.dataDictionaryId; + data["dataDictionayDetailId"] = this.dataDictionayDetailId; + data["isEnabled"] = this.isEnabled; + return data; + } } export interface ISetDataDictinaryDetailInput { - dataDictionaryId: string; - dataDictionayDetailId: string; - isEnabled: boolean; + dataDictionaryId: string; + dataDictionayDetailId: string; + isEnabled: boolean; } export class SetReadInput implements ISetReadInput { - id!: string; + id!: string; - constructor(data?: ISetReadInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ISetReadInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.id = _data['id']; + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + } } - } - static fromJS(data: any): SetReadInput { - data = typeof data === 'object' ? data : {}; - let result = new SetReadInput(); - result.init(data); - return result; - } + static fromJS(data: any): SetReadInput { + data = typeof data === 'object' ? data : {}; + let result = new SetReadInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + return data; + } } export interface ISetReadInput { - id: string; + id: string; } export class SettingItemOutput implements ISettingItemOutput { - name!: string | undefined; - displayName!: string | undefined; - description!: string | undefined; - value!: string | undefined; - type!: string | undefined; - - constructor(data?: ISettingItemOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.displayName = _data['displayName']; - this.description = _data['description']; - this.value = _data['value']; - this.type = _data['type']; - } - } - - static fromJS(data: any): SettingItemOutput { - data = typeof data === 'object' ? data : {}; - let result = new SettingItemOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['displayName'] = this.displayName; - data['description'] = this.description; - data['value'] = this.value; - data['type'] = this.type; - return data; - } + /** 名称 */ + name!: string | undefined; + /** 显示名称 */ + displayName!: string | undefined; + /** 描述 */ + description!: string | undefined; + /** 值 */ + value!: string | undefined; + /** 前端控件类型 */ + type!: string | undefined; + + constructor(data?: ISettingItemOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.displayName = _data["displayName"]; + this.description = _data["description"]; + this.value = _data["value"]; + this.type = _data["type"]; + } + } + + static fromJS(data: any): SettingItemOutput { + data = typeof data === 'object' ? data : {}; + let result = new SettingItemOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["displayName"] = this.displayName; + data["description"] = this.description; + data["value"] = this.value; + data["type"] = this.type; + return data; + } } export interface ISettingItemOutput { - name: string | undefined; - displayName: string | undefined; - description: string | undefined; - value: string | undefined; - type: string | undefined; + /** 名称 */ + name: string | undefined; + /** 显示名称 */ + displayName: string | undefined; + /** 描述 */ + description: string | undefined; + /** 值 */ + value: string | undefined; + /** 前端控件类型 */ + type: string | undefined; } export class SettingOutput implements ISettingOutput { - group!: string | undefined; - groupDisplayName!: string | undefined; - settingItemOutput!: SettingItemOutput[] | undefined; - - constructor(data?: ISettingOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.group = _data['group']; - this.groupDisplayName = _data['groupDisplayName']; - if (Array.isArray(_data['settingItemOutput'])) { - this.settingItemOutput = [] as any; - for (let item of _data['settingItemOutput']) - this.settingItemOutput!.push(SettingItemOutput.fromJS(item)); - } - } - } - - static fromJS(data: any): SettingOutput { - data = typeof data === 'object' ? data : {}; - let result = new SettingOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['group'] = this.group; - data['groupDisplayName'] = this.groupDisplayName; - if (Array.isArray(this.settingItemOutput)) { - data['settingItemOutput'] = []; - for (let item of this.settingItemOutput) data['settingItemOutput'].push(item.toJSON()); - } - return data; - } + /** 分组 */ + group!: string | undefined; + /** 分组显示名称 */ + groupDisplayName!: string | undefined; + settingItemOutput!: SettingItemOutput[] | undefined; + + constructor(data?: ISettingOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.group = _data["group"]; + this.groupDisplayName = _data["groupDisplayName"]; + if (Array.isArray(_data["settingItemOutput"])) { + this.settingItemOutput = [] as any; + for (let item of _data["settingItemOutput"]) + this.settingItemOutput!.push(SettingItemOutput.fromJS(item)); + } + } + } + + static fromJS(data: any): SettingOutput { + data = typeof data === 'object' ? data : {}; + let result = new SettingOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["group"] = this.group; + data["groupDisplayName"] = this.groupDisplayName; + if (Array.isArray(this.settingItemOutput)) { + data["settingItemOutput"] = []; + for (let item of this.settingItemOutput) + data["settingItemOutput"].push(item.toJSON()); + } + return data; + } } export interface ISettingOutput { - group: string | undefined; - groupDisplayName: string | undefined; - settingItemOutput: SettingItemOutput[] | undefined; + /** 分组 */ + group: string | undefined; + /** 分组显示名称 */ + groupDisplayName: string | undefined; + settingItemOutput: SettingItemOutput[] | undefined; +} + +export class StringStringFromSelector implements IStringStringFromSelector { + readonly value!: string | undefined; + readonly label!: string | undefined; + + constructor(data?: IStringStringFromSelector) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + (this).value = _data["value"]; + (this).label = _data["label"]; + } + } + + static fromJS(data: any): StringStringFromSelector { + data = typeof data === 'object' ? data : {}; + let result = new StringStringFromSelector(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["value"] = this.value; + data["label"] = this.label; + return data; + } +} + +export interface IStringStringFromSelector { + value: string | undefined; + label: string | undefined; } export class TenantCreateDto implements ITenantCreateDto { - readonly extraProperties!: { [key: string]: any } | undefined; - name!: string; - adminEmailAddress!: string; - adminPassword!: string; - - constructor(data?: ITenantCreateDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.name = _data['name']; - this.adminEmailAddress = _data['adminEmailAddress']; - this.adminPassword = _data['adminPassword']; - } - } - - static fromJS(data: any): TenantCreateDto { - data = typeof data === 'object' ? data : {}; - let result = new TenantCreateDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['name'] = this.name; - data['adminEmailAddress'] = this.adminEmailAddress; - data['adminPassword'] = this.adminPassword; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + name!: string; + adminEmailAddress!: string; + adminPassword!: string; + + constructor(data?: ITenantCreateDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.name = _data["name"]; + this.adminEmailAddress = _data["adminEmailAddress"]; + this.adminPassword = _data["adminPassword"]; + } + } + + static fromJS(data: any): TenantCreateDto { + data = typeof data === 'object' ? data : {}; + let result = new TenantCreateDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["name"] = this.name; + data["adminEmailAddress"] = this.adminEmailAddress; + data["adminPassword"] = this.adminPassword; + return data; + } } export interface ITenantCreateDto { - extraProperties: { [key: string]: any } | undefined; - name: string; - adminEmailAddress: string; - adminPassword: string; + extraProperties: { [key: string]: any; } | undefined; + name: string; + adminEmailAddress: string; + adminPassword: string; } export class TenantDto implements ITenantDto { - readonly extraProperties!: { [key: string]: any } | undefined; - id!: string; - name!: string | undefined; - concurrencyStamp!: string | undefined; - - constructor(data?: ITenantDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - if (_data['extraProperties']) { - (this).extraProperties = {} as any; - for (let key in _data['extraProperties']) { - if (_data['extraProperties'].hasOwnProperty(key)) - ((this).extraProperties)![key] = _data['extraProperties'][key]; - } - } - this.id = _data['id']; - this.name = _data['name']; - this.concurrencyStamp = _data['concurrencyStamp']; - } - } - - static fromJS(data: any): TenantDto { - data = typeof data === 'object' ? data : {}; - let result = new TenantDto(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.extraProperties) { - data['extraProperties'] = {}; - for (let key in this.extraProperties) { - if (this.extraProperties.hasOwnProperty(key)) - (data['extraProperties'])[key] = (this.extraProperties)[key]; - } - } - data['id'] = this.id; - data['name'] = this.name; - data['concurrencyStamp'] = this.concurrencyStamp; - return data; - } + readonly extraProperties!: { [key: string]: any; } | undefined; + id!: string; + name!: string | undefined; + concurrencyStamp!: string | undefined; + + constructor(data?: ITenantDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + if (_data["extraProperties"]) { + (this).extraProperties = {} as any; + for (let key in _data["extraProperties"]) { + if (_data["extraProperties"].hasOwnProperty(key)) + ((this).extraProperties)![key] = _data["extraProperties"][key]; + } + } + this.id = _data["id"]; + this.name = _data["name"]; + this.concurrencyStamp = _data["concurrencyStamp"]; + } + } + + static fromJS(data: any): TenantDto { + data = typeof data === 'object' ? data : {}; + let result = new TenantDto(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.extraProperties) { + data["extraProperties"] = {}; + for (let key in this.extraProperties) { + if (this.extraProperties.hasOwnProperty(key)) + (data["extraProperties"])[key] = (this.extraProperties)[key]; + } + } + data["id"] = this.id; + data["name"] = this.name; + data["concurrencyStamp"] = this.concurrencyStamp; + return data; + } } export interface ITenantDto { - extraProperties: { [key: string]: any } | undefined; - id: string; - name: string | undefined; - concurrencyStamp: string | undefined; + extraProperties: { [key: string]: any; } | undefined; + id: string; + name: string | undefined; + concurrencyStamp: string | undefined; } export class TenantDtoPagedResultDto implements ITenantDtoPagedResultDto { - items!: TenantDto[] | undefined; - totalCount!: number; + items!: TenantDto[] | undefined; + totalCount!: number; - constructor(data?: ITenantDtoPagedResultDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ITenantDtoPagedResultDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['items'])) { - this.items = [] as any; - for (let item of _data['items']) this.items!.push(TenantDto.fromJS(item)); - } - this.totalCount = _data['totalCount']; + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["items"])) { + this.items = [] as any; + for (let item of _data["items"]) + this.items!.push(TenantDto.fromJS(item)); + } + this.totalCount = _data["totalCount"]; + } } - } - static fromJS(data: any): TenantDtoPagedResultDto { - data = typeof data === 'object' ? data : {}; - let result = new TenantDtoPagedResultDto(); - result.init(data); - return result; - } + static fromJS(data: any): TenantDtoPagedResultDto { + data = typeof data === 'object' ? data : {}; + let result = new TenantDtoPagedResultDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.items)) { - data['items'] = []; - for (let item of this.items) data['items'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.items)) { + data["items"] = []; + for (let item of this.items) + data["items"].push(item.toJSON()); + } + data["totalCount"] = this.totalCount; + return data; } - data['totalCount'] = this.totalCount; - return data; - } } export interface ITenantDtoPagedResultDto { - items: TenantDto[] | undefined; - totalCount: number; + items: TenantDto[] | undefined; + totalCount: number; } export class TimeZone implements ITimeZone { - iana!: IanaTimeZone; - windows!: WindowsTimeZone; + iana!: IanaTimeZone; + windows!: WindowsTimeZone; - constructor(data?: ITimeZone) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ITimeZone) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.iana = _data['iana'] ? IanaTimeZone.fromJS(_data['iana']) : undefined; - this.windows = _data['windows'] ? WindowsTimeZone.fromJS(_data['windows']) : undefined; + init(_data?: any) { + if (_data) { + this.iana = _data["iana"] ? IanaTimeZone.fromJS(_data["iana"]) : undefined; + this.windows = _data["windows"] ? WindowsTimeZone.fromJS(_data["windows"]) : undefined; + } } - } - static fromJS(data: any): TimeZone { - data = typeof data === 'object' ? data : {}; - let result = new TimeZone(); - result.init(data); - return result; - } + static fromJS(data: any): TimeZone { + data = typeof data === 'object' ? data : {}; + let result = new TimeZone(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['iana'] = this.iana ? this.iana.toJSON() : undefined; - data['windows'] = this.windows ? this.windows.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["iana"] = this.iana ? this.iana.toJSON() : undefined; + data["windows"] = this.windows ? this.windows.toJSON() : undefined; + return data; + } } export interface ITimeZone { - iana: IanaTimeZone; - windows: WindowsTimeZone; + iana: IanaTimeZone; + windows: WindowsTimeZone; } export class TimingDto implements ITimingDto { - timeZone!: TimeZone; + timeZone!: TimeZone; - constructor(data?: ITimingDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: ITimingDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.timeZone = _data['timeZone'] ? TimeZone.fromJS(_data['timeZone']) : undefined; + init(_data?: any) { + if (_data) { + this.timeZone = _data["timeZone"] ? TimeZone.fromJS(_data["timeZone"]) : undefined; + } } - } - static fromJS(data: any): TimingDto { - data = typeof data === 'object' ? data : {}; - let result = new TimingDto(); - result.init(data); - return result; - } + static fromJS(data: any): TimingDto { + data = typeof data === 'object' ? data : {}; + let result = new TimingDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['timeZone'] = this.timeZone ? this.timeZone.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["timeZone"] = this.timeZone ? this.timeZone.toJSON() : undefined; + return data; + } } export interface ITimingDto { - timeZone: TimeZone; + timeZone: TimeZone; } export class TreeOutput implements ITreeOutput { - title!: string | undefined; - key!: string; - children!: TreeOutput[] | undefined; - - constructor(data?: ITreeOutput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.title = _data['title']; - this.key = _data['key']; - if (Array.isArray(_data['children'])) { - this.children = [] as any; - for (let item of _data['children']) this.children!.push(TreeOutput.fromJS(item)); - } - } - } - - static fromJS(data: any): TreeOutput { - data = typeof data === 'object' ? data : {}; - let result = new TreeOutput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['title'] = this.title; - data['key'] = this.key; - if (Array.isArray(this.children)) { - data['children'] = []; - for (let item of this.children) data['children'].push(item.toJSON()); - } - return data; - } + title!: string | undefined; + key!: string; + children!: TreeOutput[] | undefined; + + constructor(data?: ITreeOutput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.title = _data["title"]; + this.key = _data["key"]; + if (Array.isArray(_data["children"])) { + this.children = [] as any; + for (let item of _data["children"]) + this.children!.push(TreeOutput.fromJS(item)); + } + } + } + + static fromJS(data: any): TreeOutput { + data = typeof data === 'object' ? data : {}; + let result = new TreeOutput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["title"] = this.title; + data["key"] = this.key; + if (Array.isArray(this.children)) { + data["children"] = []; + for (let item of this.children) + data["children"].push(item.toJSON()); + } + return data; + } } export interface ITreeOutput { - title: string | undefined; - key: string; - children: TreeOutput[] | undefined; + title: string | undefined; + key: string; + children: TreeOutput[] | undefined; } export class TypeApiDescriptionModel implements ITypeApiDescriptionModel { - baseType!: string | undefined; - isEnum!: boolean; - enumNames!: string[] | undefined; - enumValues!: any[] | undefined; - genericArguments!: string[] | undefined; - properties!: PropertyApiDescriptionModel[] | undefined; - - constructor(data?: ITypeApiDescriptionModel) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.baseType = _data['baseType']; - this.isEnum = _data['isEnum']; - if (Array.isArray(_data['enumNames'])) { - this.enumNames = [] as any; - for (let item of _data['enumNames']) this.enumNames!.push(item); - } - if (Array.isArray(_data['enumValues'])) { - this.enumValues = [] as any; - for (let item of _data['enumValues']) this.enumValues!.push(item); - } - if (Array.isArray(_data['genericArguments'])) { - this.genericArguments = [] as any; - for (let item of _data['genericArguments']) this.genericArguments!.push(item); - } - if (Array.isArray(_data['properties'])) { - this.properties = [] as any; - for (let item of _data['properties']) - this.properties!.push(PropertyApiDescriptionModel.fromJS(item)); - } - } - } - - static fromJS(data: any): TypeApiDescriptionModel { - data = typeof data === 'object' ? data : {}; - let result = new TypeApiDescriptionModel(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['baseType'] = this.baseType; - data['isEnum'] = this.isEnum; - if (Array.isArray(this.enumNames)) { - data['enumNames'] = []; - for (let item of this.enumNames) data['enumNames'].push(item); - } - if (Array.isArray(this.enumValues)) { - data['enumValues'] = []; - for (let item of this.enumValues) data['enumValues'].push(item); - } - if (Array.isArray(this.genericArguments)) { - data['genericArguments'] = []; - for (let item of this.genericArguments) data['genericArguments'].push(item); - } - if (Array.isArray(this.properties)) { - data['properties'] = []; - for (let item of this.properties) data['properties'].push(item.toJSON()); - } - return data; - } + baseType!: string | undefined; + isEnum!: boolean; + enumNames!: string[] | undefined; + enumValues!: any[] | undefined; + genericArguments!: string[] | undefined; + properties!: PropertyApiDescriptionModel[] | undefined; + + constructor(data?: ITypeApiDescriptionModel) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.baseType = _data["baseType"]; + this.isEnum = _data["isEnum"]; + if (Array.isArray(_data["enumNames"])) { + this.enumNames = [] as any; + for (let item of _data["enumNames"]) + this.enumNames!.push(item); + } + if (Array.isArray(_data["enumValues"])) { + this.enumValues = [] as any; + for (let item of _data["enumValues"]) + this.enumValues!.push(item); + } + if (Array.isArray(_data["genericArguments"])) { + this.genericArguments = [] as any; + for (let item of _data["genericArguments"]) + this.genericArguments!.push(item); + } + if (Array.isArray(_data["properties"])) { + this.properties = [] as any; + for (let item of _data["properties"]) + this.properties!.push(PropertyApiDescriptionModel.fromJS(item)); + } + } + } + + static fromJS(data: any): TypeApiDescriptionModel { + data = typeof data === 'object' ? data : {}; + let result = new TypeApiDescriptionModel(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["baseType"] = this.baseType; + data["isEnum"] = this.isEnum; + if (Array.isArray(this.enumNames)) { + data["enumNames"] = []; + for (let item of this.enumNames) + data["enumNames"].push(item); + } + if (Array.isArray(this.enumValues)) { + data["enumValues"] = []; + for (let item of this.enumValues) + data["enumValues"].push(item); + } + if (Array.isArray(this.genericArguments)) { + data["genericArguments"] = []; + for (let item of this.genericArguments) + data["genericArguments"].push(item); + } + if (Array.isArray(this.properties)) { + data["properties"] = []; + for (let item of this.properties) + data["properties"].push(item.toJSON()); + } + return data; + } } export interface ITypeApiDescriptionModel { - baseType: string | undefined; - isEnum: boolean; - enumNames: string[] | undefined; - enumValues: any[] | undefined; - genericArguments: string[] | undefined; - properties: PropertyApiDescriptionModel[] | undefined; + baseType: string | undefined; + isEnum: boolean; + enumNames: string[] | undefined; + enumValues: any[] | undefined; + genericArguments: string[] | undefined; + properties: PropertyApiDescriptionModel[] | undefined; } export class UpdateConnectionStringInput implements IUpdateConnectionStringInput { - id!: string; - connectionString!: string; + id!: string; + connectionString!: string; - constructor(data?: IUpdateConnectionStringInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdateConnectionStringInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.connectionString = _data['connectionString']; + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.connectionString = _data["connectionString"]; + } } - } - static fromJS(data: any): UpdateConnectionStringInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateConnectionStringInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateConnectionStringInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateConnectionStringInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['connectionString'] = this.connectionString; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["connectionString"] = this.connectionString; + return data; + } } export interface IUpdateConnectionStringInput { - id: string; - connectionString: string; + id: string; + connectionString: string; } export class UpdateDataDictinaryInput implements IUpdateDataDictinaryInput { - id!: string; - code!: string; - displayText!: string; - description!: string | undefined; - - constructor(data?: IUpdateDataDictinaryInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.code = _data['code']; - this.displayText = _data['displayText']; - this.description = _data['description']; - } - } - - static fromJS(data: any): UpdateDataDictinaryInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateDataDictinaryInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['code'] = this.code; - data['displayText'] = this.displayText; - data['description'] = this.description; - return data; - } + id!: string; + code!: string; + displayText!: string; + description!: string | undefined; + + constructor(data?: IUpdateDataDictinaryInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.code = _data["code"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; + } + } + + static fromJS(data: any): UpdateDataDictinaryInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateDataDictinaryInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["code"] = this.code; + data["displayText"] = this.displayText; + data["description"] = this.description; + return data; + } } export interface IUpdateDataDictinaryInput { - id: string; - code: string; - displayText: string; - description: string | undefined; + id: string; + code: string; + displayText: string; + description: string | undefined; } export class UpdateDetailInput implements IUpdateDetailInput { - dataDictionaryId!: string; - id!: string; - displayText!: string; - description!: string | undefined; - order!: number; - - constructor(data?: IUpdateDetailInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.dataDictionaryId = _data['dataDictionaryId']; - this.id = _data['id']; - this.displayText = _data['displayText']; - this.description = _data['description']; - this.order = _data['order']; - } - } - - static fromJS(data: any): UpdateDetailInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateDetailInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['dataDictionaryId'] = this.dataDictionaryId; - data['id'] = this.id; - data['displayText'] = this.displayText; - data['description'] = this.description; - data['order'] = this.order; - return data; - } + dataDictionaryId!: string; + id!: string; + displayText!: string; + description!: string | undefined; + order!: number; + + constructor(data?: IUpdateDetailInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.dataDictionaryId = _data["dataDictionaryId"]; + this.id = _data["id"]; + this.displayText = _data["displayText"]; + this.description = _data["description"]; + this.order = _data["order"]; + } + } + + static fromJS(data: any): UpdateDetailInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateDetailInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["dataDictionaryId"] = this.dataDictionaryId; + data["id"] = this.id; + data["displayText"] = this.displayText; + data["description"] = this.description; + data["order"] = this.order; + return data; + } } export interface IUpdateDetailInput { - dataDictionaryId: string; - id: string; - displayText: string; - description: string | undefined; - order: number; + dataDictionaryId: string; + id: string; + displayText: string; + description: string | undefined; + order: number; +} + +/** 删除语言 */ +export class UpdateLanguageInput implements IUpdateLanguageInput { + /** 语言Id */ + id!: string; + /** 语言名称 */ + cultureName!: string; + /** Ui语言名称 */ + uiCultureName!: string; + /** 显示名称 */ + displayName!: string; + /** 图标 */ + flagIcon!: string | undefined; + /** 是否启用 */ + isEnabled!: boolean; + + constructor(data?: IUpdateLanguageInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.cultureName = _data["cultureName"]; + this.uiCultureName = _data["uiCultureName"]; + this.displayName = _data["displayName"]; + this.flagIcon = _data["flagIcon"]; + this.isEnabled = _data["isEnabled"]; + } + } + + static fromJS(data: any): UpdateLanguageInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateLanguageInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["cultureName"] = this.cultureName; + data["uiCultureName"] = this.uiCultureName; + data["displayName"] = this.displayName; + data["flagIcon"] = this.flagIcon; + data["isEnabled"] = this.isEnabled; + return data; + } +} + +/** 删除语言 */ +export interface IUpdateLanguageInput { + /** 语言Id */ + id: string; + /** 语言名称 */ + cultureName: string; + /** Ui语言名称 */ + uiCultureName: string; + /** 显示名称 */ + displayName: string; + /** 图标 */ + flagIcon: string | undefined; + /** 是否启用 */ + isEnabled: boolean; +} + +/** 删除语言文本 */ +export class UpdateLanguageTextInput implements IUpdateLanguageTextInput { + /** 资源名称 */ + resourceName!: string; + /** 语言名称 */ + cultureName!: string; + /** 名称 */ + name!: string; + /** 值 */ + value!: string; + + constructor(data?: IUpdateLanguageTextInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.resourceName = _data["resourceName"]; + this.cultureName = _data["cultureName"]; + this.name = _data["name"]; + this.value = _data["value"]; + } + } + + static fromJS(data: any): UpdateLanguageTextInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateLanguageTextInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["resourceName"] = this.resourceName; + data["cultureName"] = this.cultureName; + data["name"] = this.name; + data["value"] = this.value; + return data; + } +} + +/** 删除语言文本 */ +export interface IUpdateLanguageTextInput { + /** 资源名称 */ + resourceName: string; + /** 语言名称 */ + cultureName: string; + /** 名称 */ + name: string; + /** 值 */ + value: string; } export class UpdateOrganizationUnitInput implements IUpdateOrganizationUnitInput { - displayName!: string; - id!: string; + displayName!: string; + id!: string; - constructor(data?: IUpdateOrganizationUnitInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdateOrganizationUnitInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.displayName = _data['displayName']; - this.id = _data['id']; + init(_data?: any) { + if (_data) { + this.displayName = _data["displayName"]; + this.id = _data["id"]; + } } - } - static fromJS(data: any): UpdateOrganizationUnitInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateOrganizationUnitInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateOrganizationUnitInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateOrganizationUnitInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['displayName'] = this.displayName; - data['id'] = this.id; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["displayName"] = this.displayName; + data["id"] = this.id; + return data; + } } export interface IUpdateOrganizationUnitInput { - displayName: string; - id: string; + displayName: string; + id: string; } export class UpdatePermissionDto implements IUpdatePermissionDto { - name!: string | undefined; - isGranted!: boolean; + name!: string | undefined; + isGranted!: boolean; - constructor(data?: IUpdatePermissionDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdatePermissionDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.name = _data['name']; - this.isGranted = _data['isGranted']; + init(_data?: any) { + if (_data) { + this.name = _data["name"]; + this.isGranted = _data["isGranted"]; + } } - } - static fromJS(data: any): UpdatePermissionDto { - data = typeof data === 'object' ? data : {}; - let result = new UpdatePermissionDto(); - result.init(data); - return result; - } + static fromJS(data: any): UpdatePermissionDto { + data = typeof data === 'object' ? data : {}; + let result = new UpdatePermissionDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['name'] = this.name; - data['isGranted'] = this.isGranted; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["name"] = this.name; + data["isGranted"] = this.isGranted; + return data; + } } export interface IUpdatePermissionDto { - name: string | undefined; - isGranted: boolean; + name: string | undefined; + isGranted: boolean; } export class UpdatePermissionsDto implements IUpdatePermissionsDto { - permissions!: UpdatePermissionDto[] | undefined; + permissions!: UpdatePermissionDto[] | undefined; - constructor(data?: IUpdatePermissionsDto) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdatePermissionsDto) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (Array.isArray(_data['permissions'])) { - this.permissions = [] as any; - for (let item of _data['permissions']) - this.permissions!.push(UpdatePermissionDto.fromJS(item)); - } + init(_data?: any) { + if (_data) { + if (Array.isArray(_data["permissions"])) { + this.permissions = [] as any; + for (let item of _data["permissions"]) + this.permissions!.push(UpdatePermissionDto.fromJS(item)); + } + } } - } - static fromJS(data: any): UpdatePermissionsDto { - data = typeof data === 'object' ? data : {}; - let result = new UpdatePermissionsDto(); - result.init(data); - return result; - } + static fromJS(data: any): UpdatePermissionsDto { + data = typeof data === 'object' ? data : {}; + let result = new UpdatePermissionsDto(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (Array.isArray(this.permissions)) { - data['permissions'] = []; - for (let item of this.permissions) data['permissions'].push(item.toJSON()); + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (Array.isArray(this.permissions)) { + data["permissions"] = []; + for (let item of this.permissions) + data["permissions"].push(item.toJSON()); + } + return data; } - return data; - } } export interface IUpdatePermissionsDto { - permissions: UpdatePermissionDto[] | undefined; + permissions: UpdatePermissionDto[] | undefined; } export class UpdateRoleInput implements IUpdateRoleInput { - roleId!: string; - roleInfo!: IdentityRoleUpdateDto; + roleId!: string; + roleInfo!: IdentityRoleUpdateDto; - constructor(data?: IUpdateRoleInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdateRoleInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.roleId = _data['roleId']; - this.roleInfo = _data['roleInfo'] - ? IdentityRoleUpdateDto.fromJS(_data['roleInfo']) - : undefined; + init(_data?: any) { + if (_data) { + this.roleId = _data["roleId"]; + this.roleInfo = _data["roleInfo"] ? IdentityRoleUpdateDto.fromJS(_data["roleInfo"]) : undefined; + } } - } - static fromJS(data: any): UpdateRoleInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateRoleInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateRoleInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateRoleInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['roleId'] = this.roleId; - data['roleInfo'] = this.roleInfo ? this.roleInfo.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["roleId"] = this.roleId; + data["roleInfo"] = this.roleInfo ? this.roleInfo.toJSON() : undefined; + return data; + } } export interface IUpdateRoleInput { - roleId: string; - roleInfo: IdentityRoleUpdateDto; + roleId: string; + roleInfo: IdentityRoleUpdateDto; } export class UpdateRolePermissionsInput implements IUpdateRolePermissionsInput { - providerName!: string; - providerKey!: string; - updatePermissionsDto!: UpdatePermissionsDto; - - constructor(data?: IUpdateRolePermissionsInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.providerName = _data['providerName']; - this.providerKey = _data['providerKey']; - this.updatePermissionsDto = _data['updatePermissionsDto'] - ? UpdatePermissionsDto.fromJS(_data['updatePermissionsDto']) - : undefined; - } - } - - static fromJS(data: any): UpdateRolePermissionsInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateRolePermissionsInput(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['providerName'] = this.providerName; - data['providerKey'] = this.providerKey; - data['updatePermissionsDto'] = this.updatePermissionsDto - ? this.updatePermissionsDto.toJSON() - : undefined; - return data; - } + providerName!: string; + providerKey!: string; + updatePermissionsDto!: UpdatePermissionsDto; + + constructor(data?: IUpdateRolePermissionsInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.providerName = _data["providerName"]; + this.providerKey = _data["providerKey"]; + this.updatePermissionsDto = _data["updatePermissionsDto"] ? UpdatePermissionsDto.fromJS(_data["updatePermissionsDto"]) : undefined; + } + } + + static fromJS(data: any): UpdateRolePermissionsInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateRolePermissionsInput(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["providerName"] = this.providerName; + data["providerKey"] = this.providerKey; + data["updatePermissionsDto"] = this.updatePermissionsDto ? this.updatePermissionsDto.toJSON() : undefined; + return data; + } } export interface IUpdateRolePermissionsInput { - providerName: string; - providerKey: string; - updatePermissionsDto: UpdatePermissionsDto; + providerName: string; + providerKey: string; + updatePermissionsDto: UpdatePermissionsDto; } export class UpdateSettingInput implements IUpdateSettingInput { - values!: { [key: string]: string } | undefined; + values!: { [key: string]: string; } | undefined; - constructor(data?: IUpdateSettingInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdateSettingInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - if (_data['values']) { - this.values = {} as any; - for (let key in _data['values']) { - if (_data['values'].hasOwnProperty(key)) (this.values)![key] = _data['values'][key]; + init(_data?: any) { + if (_data) { + if (_data["values"]) { + this.values = {} as any; + for (let key in _data["values"]) { + if (_data["values"].hasOwnProperty(key)) + (this.values)![key] = _data["values"][key]; + } + } } - } } - } - static fromJS(data: any): UpdateSettingInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateSettingInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateSettingInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateSettingInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - if (this.values) { - data['values'] = {}; - for (let key in this.values) { - if (this.values.hasOwnProperty(key)) (data['values'])[key] = (this.values)[key]; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + if (this.values) { + data["values"] = {}; + for (let key in this.values) { + if (this.values.hasOwnProperty(key)) + (data["values"])[key] = (this.values)[key]; + } + } + return data; } - return data; - } } export interface IUpdateSettingInput { - values: { [key: string]: string } | undefined; + values: { [key: string]: string; } | undefined; } export class UpdateTenantInput implements IUpdateTenantInput { - id!: string; - name!: string; + id!: string; + name!: string; - constructor(data?: IUpdateTenantInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdateTenantInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.id = _data['id']; - this.name = _data['name']; + init(_data?: any) { + if (_data) { + this.id = _data["id"]; + this.name = _data["name"]; + } } - } - static fromJS(data: any): UpdateTenantInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateTenantInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateTenantInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateTenantInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['id'] = this.id; - data['name'] = this.name; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["id"] = this.id; + data["name"] = this.name; + return data; + } } export interface IUpdateTenantInput { - id: string; - name: string; + id: string; + name: string; } export class UpdateUserInput implements IUpdateUserInput { - userId!: string; - userInfo!: IdentityUserUpdateDto; + userId!: string; + userInfo!: IdentityUserUpdateDto; - constructor(data?: IUpdateUserInput) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IUpdateUserInput) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.userId = _data['userId']; - this.userInfo = _data['userInfo'] - ? IdentityUserUpdateDto.fromJS(_data['userInfo']) - : undefined; + init(_data?: any) { + if (_data) { + this.userId = _data["userId"]; + this.userInfo = _data["userInfo"] ? IdentityUserUpdateDto.fromJS(_data["userInfo"]) : undefined; + } } - } - static fromJS(data: any): UpdateUserInput { - data = typeof data === 'object' ? data : {}; - let result = new UpdateUserInput(); - result.init(data); - return result; - } + static fromJS(data: any): UpdateUserInput { + data = typeof data === 'object' ? data : {}; + let result = new UpdateUserInput(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['userId'] = this.userId; - data['userInfo'] = this.userInfo ? this.userInfo.toJSON() : undefined; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["userId"] = this.userId; + data["userInfo"] = this.userInfo ? this.userInfo.toJSON() : undefined; + return data; + } } export interface IUpdateUserInput { - userId: string; - userInfo: IdentityUserUpdateDto; + userId: string; + userInfo: IdentityUserUpdateDto; } export class UserLoginInfo implements IUserLoginInfo { - userNameOrEmailAddress!: string; - password!: string; - rememberMe!: boolean; - - constructor(data?: IUserLoginInfo) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } - } - } - - init(_data?: any) { - if (_data) { - this.userNameOrEmailAddress = _data['userNameOrEmailAddress']; - this.password = _data['password']; - this.rememberMe = _data['rememberMe']; - } - } - - static fromJS(data: any): UserLoginInfo { - data = typeof data === 'object' ? data : {}; - let result = new UserLoginInfo(); - result.init(data); - return result; - } - - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['userNameOrEmailAddress'] = this.userNameOrEmailAddress; - data['password'] = this.password; - data['rememberMe'] = this.rememberMe; - return data; - } + userNameOrEmailAddress!: string; + password!: string; + rememberMe!: boolean; + + constructor(data?: IUserLoginInfo) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } + } + + init(_data?: any) { + if (_data) { + this.userNameOrEmailAddress = _data["userNameOrEmailAddress"]; + this.password = _data["password"]; + this.rememberMe = _data["rememberMe"]; + } + } + + static fromJS(data: any): UserLoginInfo { + data = typeof data === 'object' ? data : {}; + let result = new UserLoginInfo(); + result.init(data); + return result; + } + + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["userNameOrEmailAddress"] = this.userNameOrEmailAddress; + data["password"] = this.password; + data["rememberMe"] = this.rememberMe; + return data; + } } export interface IUserLoginInfo { - userNameOrEmailAddress: string; - password: string; - rememberMe: boolean; + userNameOrEmailAddress: string; + password: string; + rememberMe: boolean; } export class WindowsTimeZone implements IWindowsTimeZone { - timeZoneId!: string | undefined; + timeZoneId!: string | undefined; - constructor(data?: IWindowsTimeZone) { - if (data) { - for (var property in data) { - if (data.hasOwnProperty(property)) (this)[property] = (data)[property]; - } + constructor(data?: IWindowsTimeZone) { + if (data) { + for (var property in data) { + if (data.hasOwnProperty(property)) + (this)[property] = (data)[property]; + } + } } - } - init(_data?: any) { - if (_data) { - this.timeZoneId = _data['timeZoneId']; + init(_data?: any) { + if (_data) { + this.timeZoneId = _data["timeZoneId"]; + } } - } - static fromJS(data: any): WindowsTimeZone { - data = typeof data === 'object' ? data : {}; - let result = new WindowsTimeZone(); - result.init(data); - return result; - } + static fromJS(data: any): WindowsTimeZone { + data = typeof data === 'object' ? data : {}; + let result = new WindowsTimeZone(); + result.init(data); + return result; + } - toJSON(data?: any) { - data = typeof data === 'object' ? data : {}; - data['timeZoneId'] = this.timeZoneId; - return data; - } + toJSON(data?: any) { + data = typeof data === 'object' ? data : {}; + data["timeZoneId"] = this.timeZoneId; + return data; + } } export interface IWindowsTimeZone { - timeZoneId: string | undefined; + timeZoneId: string | undefined; } export interface FileResponse { - data: Blob; - status: number; - fileName?: string; - headers?: { [name: string]: any }; + data: Blob; + status: number; + fileName?: string; + headers?: { [name: string]: any }; } export class ApiException extends Error { - message: string; - status: number; - response: string; - headers: { [key: string]: any }; - result: any; - - constructor( - message: string, - status: number, - response: string, - headers: { [key: string]: any }, - result: any, - ) { - super(); - - this.message = message; - this.status = status; - this.response = response; - this.headers = headers; - this.result = result; - } - - protected isApiException = true; - - static isApiException(obj: any): obj is ApiException { - return obj.isApiException === true; - } -} - -function throwException( - message: string, - status: number, - response: string, - headers: { [key: string]: any }, - result?: any, -): any { - if (result !== null && result !== undefined) throw result; - else throw new ApiException(message, status, response, headers, null); + message: string; + status: number; + response: string; + headers: { [key: string]: any; }; + result: any; + + constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) { + super(); + + this.message = message; + this.status = status; + this.response = response; + this.headers = headers; + this.result = result; + } + + protected isApiException = true; + + static isApiException(obj: any): obj is ApiException { + return obj.isApiException === true; + } } -function isAxiosError(obj: any | undefined): obj is AxiosError { - return obj && obj.isAxiosError === true; +function throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any { + if (result !== null && result !== undefined) + throw result; + else + throw new ApiException(message, status, response, headers, null); } + +function isAxiosError(obj: any | undefined): obj is AxiosError { + return obj && obj.isAxiosError === true; +} \ No newline at end of file diff --git a/vben28/src/views/admin/auditLog/AuditLog.ts b/vben28/src/views/admin/auditLog/AuditLog.ts index 721a9bc9..7a223f94 100644 --- a/vben28/src/views/admin/auditLog/AuditLog.ts +++ b/vben28/src/views/admin/auditLog/AuditLog.ts @@ -1,40 +1,41 @@ -import { FormSchema } from "/@/components/Table"; -import { BasicColumn } from "/@/components/Table"; -import { useI18n } from "/@/hooks/web/useI18n"; +import { FormSchema } from '/@/components/Table'; +import { BasicColumn } from '/@/components/Table'; +import { useI18n } from '/@/hooks/web/useI18n'; const { t } = useI18n(); import { formatToDateTime } from '/@/utils/dateUtil'; -import { AuditLogsServiceProxy, PagingAuditLogListInput } from "/@/services/ServiceProxies"; +import { AuditLogsServiceProxy, PagingAuditLogListInput } from '/@/services/ServiceProxies'; export const searchFormSchema: FormSchema[] = [ { - field: "userName", - label: t("routes.admin.userManagement_userName"), - component: "Input", - colProps: { span: 8 } + field: 'userName', + label: t('routes.admin.userManagement_userName'), + component: 'Input', + colProps: { span: 4 }, }, { - field: "time", - component: "RangePicker", - label: t("routes.admin.audit_executeTime"), + field: 'time', + component: 'RangePicker', + label: t('routes.admin.audit_executeTime'), + labelWidth: 120, colProps: { - span: 6 - } + span: 6, + }, }, { - field: "hasException", - label: t("routes.admin.audit_hasException"), - component: "Select", + field: 'hasException', + label: t('routes.admin.audit_hasException'), + component: 'Select', colProps: { span: 4 }, - componentProps: ()=>{ + componentProps: () => { return { options: [ - { label: t("routes.admin.audit_hasException_all"), value: null }, - { label: t("routes.admin.audit_hasException_yes"), value: true }, - { label: t("routes.admin.audit_hasException_no"), value: false }, - ] - } - } + { label: t('routes.admin.audit_hasException_all'), value: null }, + { label: t('routes.admin.audit_hasException_yes'), value: true }, + { label: t('routes.admin.audit_hasException_no'), value: false }, + ], + }; + }, }, ]; @@ -45,40 +46,40 @@ export const tableColumns: BasicColumn[] = [ // width: 100, // }, { - title: "Url", - dataIndex: "url", + title: 'Url', + dataIndex: 'url', width: 350, - align: "left" + align: 'left', }, { - title: t("routes.admin.userManagement_userName"), - dataIndex: "userName", - width: 100 + title: t('routes.admin.userManagement_userName'), + dataIndex: 'userName', + width: 100, }, { - title: t("routes.admin.executionTime"), - dataIndex: "executionTime", + title: t('routes.admin.executionTime'), + dataIndex: 'executionTime', width: 200, customRender: ({ text }) => { return formatToDateTime(text); - } + }, }, { - title: t("routes.admin.executionDuration"), - dataIndex: "executionDuration", - width: 150 + title: t('routes.admin.executionDuration'), + dataIndex: 'executionDuration', + width: 150, }, { - title: t("routes.admin.executionMessage"), - dataIndex: "exceptions", - resizable:false, + title: t('routes.admin.executionMessage'), + dataIndex: 'exceptions', + resizable: false, width: 350, customRender: ({ text }) => { if (text) { return text.toString(); } - } - } + }, + }, ]; /** @@ -93,41 +94,41 @@ export async function getTableListAsync(params: PagingAuditLogListInput) { export function httpStatusCodeColor(statusCode?: number) { if (!statusCode) { - return ""; + return ''; } if (statusCode >= 200 && statusCode < 300) { - return "#87d068"; + return '#87d068'; } if (statusCode >= 300 && statusCode < 400) { - return "#108ee9"; + return '#108ee9'; } if (statusCode >= 400 && statusCode < 500) { - return "orange"; + return 'orange'; } if (statusCode >= 500) { - return "red"; + return 'red'; } - return "cyan"; + return 'cyan'; } export function httpMethodColor(method?: string) { - if (method == "GET") { - return "blue"; + if (method == 'GET') { + return 'blue'; } - if (method == "POST") { - return "blue"; + if (method == 'POST') { + return 'blue'; } - if (method == "PUT") { - return "orange"; + if (method == 'PUT') { + return 'orange'; } - if (method == "DELETE") { - return "red"; + if (method == 'DELETE') { + return 'red'; } - if (method == "OPTIONS") { - return "cyan"; + if (method == 'OPTIONS') { + return 'cyan'; } - if (method == "PATCH") { - return "pink"; + if (method == 'PATCH') { + return 'pink'; } - return "cyan"; + return 'cyan'; } diff --git a/vben28/src/views/admin/auditLog/AuditLog.vue b/vben28/src/views/admin/auditLog/AuditLog.vue index b769321c..2ee05e7a 100644 --- a/vben28/src/views/admin/auditLog/AuditLog.vue +++ b/vben28/src/views/admin/auditLog/AuditLog.vue @@ -1,61 +1,67 @@ -