From 2ac31c1243305a57f22233631150d90e1e32f9c0 Mon Sep 17 00:00:00 2001 From: wangjunzzz <> Date: Wed, 24 Dec 2025 15:26:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7abp10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/Directory.Build.Microsoft.targets | 30 +- aspnet-core/Directory.Build.Volo.targets | 190 +- aspnet-core/Directory.Build.targets | 48 +- .../Lion.AbpPro.AspNetCore.csproj | 13 +- .../AspNetCore/AbpProAspNetCoreModule.cs | 2 + .../ServiceCollectionExtensions.cs | 8 +- .../Swagger/CachingSwaggerProvider.cs | 52 +- .../Swagger/EnumSchemaFilter.cs | 42 +- .../Swagger/HiddenAbpDefaultApiFilter.cs | 96 +- ...Lion.AbpPro.CAP.EntityFrameworkCore.csproj | 2 +- .../Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj | 2 +- .../Lion.AbpPro.Cli.Core.csproj | 2 +- .../Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj | 2 +- .../Lion.AbpPro.Core/Lion.AbpPro.Core.csproj | 7 +- .../Lion.AbpPro.ElasticSearch.csproj | 2 +- ...on.AbpPro.EntityFrameworkCore.Mysql.csproj | 2 +- .../Lion.AbpPro.EntityFrameworkCore.csproj | 2 +- .../Lion.AbpPro.Hangfire.csproj | 2 +- .../Lion.AbpPro.HttpClient.csproj | 2 +- .../Lion.AbpPro.Localization.csproj | 2 +- .../Lion.AbpPro.SignalR.csproj | 2 +- .../Lion.AbpPro.Starter.csproj | 2 +- .../Lion.AbpPro.Core.Cli.Tests.csproj | 2 +- .../Lion.AbpPro.Core.Tests.csproj | 2 +- .../Lion.AbpPro.ElasticSearch.Tests.csproj | 2 +- ...on.AbpPro.EntityFrameworkCore.Tests.csproj | 2 +- .../Lion.AbpPro.Localization.Tests.csproj | 2 +- .../Lion.AbpPro.WebGateway.csproj | 2 +- aspnet-core/global.json | 7 + .../BasicManagementHttpApiHostModule.cs | 209 +- .../Controllers/HomeController.cs | 3 +- ...anagementHttpApiHostMigrationsDbContext.cs | 1 - .../GlobalUsings.cs | 24 + ...AbpPro.BasicManagement.HttpApi.Host.csproj | 3 +- ...sicManagement.Application.Contracts.csproj | 3 +- ...bpProApplicationConfigurationAppService.cs | 1 - .../AuditLogs/AuditLogAppService.cs | 4 +- ...cManagementApplicationAutoMapperProfile.cs | 41 - .../BasicManagementApplicationModule.cs | 8 - .../IdentitySecurityLogAppService.cs | 6 +- ....AbpPro.BasicManagement.Application.csproj | 4 +- .../OrganizationUnitAppService.cs | 14 +- .../Roles/RoleAppService.cs | 7 +- .../Tenants/VoloTenantAppService.cs | 3 +- .../Users/AccountAppService.cs | 5 +- .../Users/UserAppService.cs | 17 +- ...bpPro.BasicManagement.Domain.Shared.csproj | 2 +- .../BasicManagementDomainModule.cs | 7 - .../GlobalUsings.cs | 1 - .../Lion.AbpPro.BasicManagement.Domain.csproj | 2 +- ...BasicManagement.EntityFrameworkCore.csproj | 2 +- ...pPro.BasicManagement.HttpApi.Client.csproj | 2 +- ...Lion.AbpPro.BasicManagement.HttpApi.csproj | 2 +- ...o.BasicManagement.Application.Tests.csproj | 2 +- ...AbpPro.BasicManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ...ion.AbpPro.BasicManagement.TestBase.csproj | 2 +- ...taDictionaryManagementHttpApiHostModule.cs | 180 +- .../GlobalUsings.cs | 1 - ...taDictionaryManagement.HttpApi.Host.csproj | 2 +- ...aryManagement.Application.Contracts.csproj | 2 +- .../DataDictionaryAppService.cs | 6 +- ...yManagementApplicationAutoMapperProfile.cs | 14 - ...taDictionaryManagementApplicationModule.cs | 11 +- .../GlobalUsings.cs | 2 - ...ataDictionaryManagement.Application.csproj | 3 +- ...aDictionaryManagement.Domain.Shared.csproj | 2 +- .../DataDictionaries/DataDictionaryManager.cs | 6 +- .../DataDictionaryDomainAutoMapperProfile.cs | 11 - .../DataDictionaryDomainService.cs | 11 +- .../DataDictionaryManagementDomainModule.cs | 13 +- .../GlobalUsings.cs | 1 - ...Pro.DataDictionaryManagement.Domain.csproj | 3 +- ...onaryManagement.EntityFrameworkCore.csproj | 2 +- ...DictionaryManagement.HttpApi.Client.csproj | 2 +- .../DataDictionaryController.cs | 6 + .../GlobalUsings.cs | 3 - ...ro.DataDictionaryManagement.HttpApi.csproj | 2 +- ...tionaryManagement.Application.Tests.csproj | 2 +- ...ataDictionaryManagementDomainTestModule.cs | 7 - .../GlobalUsings.cs | 1 - ...taDictionaryManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ...o.DataDictionaryManagement.TestBase.csproj | 2 +- .../FileManagementHttpApiHostModule.cs | 167 +- .../GlobalUsings.cs | 1 - ....AbpPro.FileManagement.HttpApi.Host.csproj | 3 +- ...ileManagement.Application.Contracts.csproj | 3 +- ...eManagementApplicationAutoMapperProfile.cs | 11 - .../FileManagementApplicationModule.cs | 8 +- .../Files/FileAppService.cs | 4 +- .../GlobalUsings.cs | 2 - ...n.AbpPro.FileManagement.Application.csproj | 4 +- ...AbpPro.FileManagement.Domain.Shared.csproj | 2 +- .../FileManagementDomainAutoMapperProfile.cs | 13 - .../FileManagementDomainModule.cs | 7 - .../Files/FileObjectManager.cs | 13 +- .../Lion.AbpPro.FileManagement.Domain.csproj | 3 +- ....FileManagement.EntityFrameworkCore.csproj | 2 +- ...bpPro.FileManagement.HttpApi.Client.csproj | 3 +- .../Lion.AbpPro.FileManagement.HttpApi.csproj | 2 +- ...ro.FileManagement.Application.Tests.csproj | 2 +- ....AbpPro.FileManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ...Lion.AbpPro.FileManagement.TestBase.csproj | 3 +- .../GlobalUsings.cs | 1 - .../LanguageManagementHttpApiHostModule.cs | 172 +- ...Pro.LanguageManagement.HttpApi.Host.csproj | 3 +- ...ageManagement.Application.Contracts.csproj | 2 +- .../GlobalUsings.cs | 2 - ...eManagementApplicationAutoMapperProfile.cs | 15 - .../LanguageManagementApplicationModule.cs | 11 +- .../Languages/LanguageAppService.cs | 7 +- ...pPro.LanguageManagement.Application.csproj | 4 +- ...ro.LanguageManagement.Domain.Shared.csproj | 2 +- .../DatabaseLanguageProvider.cs | 9 +- .../GlobalUsings.cs | 2 - ...nguageManagementDomainAutoMapperProfile.cs | 15 - .../LanguageManagementDomainModule.cs | 5 - .../LanguageManagementDomainService.cs | 11 +- .../LanguageTexts/LanguageTextManager.cs | 16 +- .../Languages/LanguageManager.cs | 14 +- ...on.AbpPro.LanguageManagement.Domain.csproj | 3 +- ...guageManagement.EntityFrameworkCore.csproj | 2 +- ...o.LanguageManagement.HttpApi.Client.csproj | 2 +- ...n.AbpPro.LanguageManagement.HttpApi.csproj | 2 +- ...anguageManagement.Application.Tests.csproj | 2 +- .../GlobalUsings.cs | 1 - .../LanguageManagementDomainTestModule.cs | 7 - ...Pro.LanguageManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ....AbpPro.LanguageManagement.TestBase.csproj | 2 +- .../GlobalUsings.cs | 1 - ...NotificationManagement.HttpApi.Host.csproj | 2 +- ...NotificationManagementHttpApiHostModule.cs | 165 +- ...ionManagement.Application.Contracts.csproj | 2 +- .../GlobalUsings.cs | 2 - ....NotificationManagement.Application.csproj | 4 +- ...nManagementApplicationAutoMapperProfile.cs | 20 - ...NotificationManagementApplicationModule.cs | 6 - .../Notifications/NotificationAppService.cs | 5 +- ...otificationManagement.Domain.Shared.csproj | 3 +- .../GlobalUsings.cs | 2 - ...bpPro.NotificationManagement.Domain.csproj | 3 +- .../NotificationDomainAutoMapperProfile.cs | 13 - .../NotificationManagementDomainModule.cs | 9 - .../NotificationManagementDomainService.cs | 11 +- .../Notifications/NotificationManager.cs | 7 +- .../NotificationSubscriptionManager.cs | 7 +- ...ationManagement.EntityFrameworkCore.csproj | 2 +- ...tificationManagement.HttpApi.Client.csproj | 2 +- ...pPro.NotificationManagement.HttpApi.csproj | 2 +- ...icationManagement.Application.Tests.csproj | 2 +- ...NotificationManagement.Domain.Tests.csproj | 2 +- ...anagement.EntityFrameworkCore.Tests.csproj | 2 +- ...Pro.NotificationManagement.TestBase.csproj | 2 +- .../Lion.AbpPro.HttpApi.Host/GlobalUsings.cs | 3 +- .../Lion.AbpPro.HttpApi.Host.csproj | 3 +- .../Lion.AbpPro.HttpApi.Host/appsettings.json | 3 +- .../Lion.AbpPro.Application.Contracts.csproj | 3 +- .../AbpProApplicationAutoMapperProfile.cs | 10 - .../AbpProApplicationModule.cs | 4 - .../Lion.AbpPro.Application/GlobalUsings.cs | 4 +- .../Lion.AbpPro.Application.csproj | 3 +- .../Lion.AbpPro.DbMigrator.csproj | 2 +- .../Lion.AbpPro.DbMigrator/appsettings.json | 3 +- .../Lion.AbpPro.Domain.Shared.csproj | 2 +- .../Lion.AbpPro.Domain/AbpProDomainModule.cs | 4 - .../Lion.AbpPro.Domain/AbpProDomainService.cs | 10 - .../src/Lion.AbpPro.Domain/GlobalUsings.cs | 1 - .../Lion.AbpPro.Domain.csproj | 2 +- .../AbpProEntityFrameworkCoreModule.cs | 9 +- .../AbpProMigrationsDbContextFactory.cs | 2 +- .../GlobalUsings.cs | 1 - .../Lion.AbpPro.EntityFrameworkCore.csproj | 6 +- .../20251223131937_Init.Designer.cs | 0 .../Migrations/20251223131937_Init.cs | 0 ...ner.cs => 20251223140343_Init.Designer.cs} | 775 +++--- ...3033431_Init.cs => 20251223140343_Init.cs} | 887 ++++--- .../AbpProDbContextModelSnapshot.cs | 2198 ----------------- .../Lion.AbpPro.FreeSqlRepository.csproj | 2 +- .../Lion.AbpPro.HttpApi.Client.csproj | 2 +- .../Lion.AbpPro.HttpApi.csproj | 2 +- .../Lion.AbpPro.Application.Tests.csproj | 3 +- .../Lion.AbpPro.Domain.Tests.csproj | 3 +- ...on.AbpPro.EntityFrameworkCore.Tests.csproj | 2 +- ...Lion.AbpPro.FreeSqlRepository.Tests.csproj | 2 +- ...bpPro.HttpApi.Client.ConsoleTestApp.csproj | 3 +- .../Lion.AbpPro.TestBase.csproj | 2 +- 189 files changed, 1398 insertions(+), 4616 deletions(-) create mode 100644 aspnet-core/global.json create mode 100644 aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs delete mode 100644 aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs delete mode 100644 aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationDomainAutoMapperProfile.cs delete mode 100644 aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.Designer.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.cs rename aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/{20251113033431_Init.Designer.cs => 20251223140343_Init.Designer.cs} (74%) rename aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/{20251113033431_Init.cs => 20251223140343_Init.cs} (54%) diff --git a/aspnet-core/Directory.Build.Microsoft.targets b/aspnet-core/Directory.Build.Microsoft.targets index 938c0b67..1e807352 100644 --- a/aspnet-core/Directory.Build.Microsoft.targets +++ b/aspnet-core/Directory.Build.Microsoft.targets @@ -1,21 +1,21 @@  - - - - - - - - - - - - + + + + + + + + + + + + - - - + + + diff --git a/aspnet-core/Directory.Build.Volo.targets b/aspnet-core/Directory.Build.Volo.targets index 2c848ba2..f949bc55 100644 --- a/aspnet-core/Directory.Build.Volo.targets +++ b/aspnet-core/Directory.Build.Volo.targets @@ -1,99 +1,99 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/aspnet-core/Directory.Build.targets b/aspnet-core/Directory.Build.targets index 98365e55..4f3bbd24 100644 --- a/aspnet-core/Directory.Build.targets +++ b/aspnet-core/Directory.Build.targets @@ -7,7 +7,8 @@ latest 1.0.0 Abp vNext Pro - $(NoWarn);CS1591;CS0436;NU1504 + $(NoWarnNuGet)$(NoWarn);CS1591;CS0436; + $(NoWarnNuGet);1902;NU1903 app true WangJunZzz @@ -28,9 +29,9 @@ - - - + + + @@ -46,17 +47,17 @@ - - - - - + + + + + - - - - + + + @@ -81,13 +82,13 @@ - + - + - + @@ -95,8 +96,21 @@ - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj index 6dc5bfea..cb983e82 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 Lion.AbpPro.AspNetCore @@ -15,7 +15,8 @@ - + + @@ -36,13 +37,7 @@ - - - - - - - + diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs index b0e78a10..52dc2495 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs @@ -1,7 +1,9 @@ using Lion.AbpPro.AspNetCore.Options; +using Volo.Abp.Swashbuckle; namespace Lion.AbpPro.AspNetCore; +//[DependsOn(typeof(AbpSwashbuckleModule))] public class AbpProAspNetCoreModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs index 5c952413..0a44220a 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs @@ -4,7 +4,7 @@ using Lion.AbpPro.AspNetCore.Options; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.IdentityModel.Tokens; -using Swagger; + using Volo.Abp.AspNetCore.Auditing; using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.AspNetCore.Mvc.AntiForgery; @@ -160,9 +160,9 @@ public static class ServiceCollectionExtensions options.MapType(() => new OpenApiSchema() { Type = "file" }); options.SwaggerDoc(name, new OpenApiInfo { Title = name, Version = version }); options.DocInclusionPredicate((docName, description) => true); - options.EnableAnnotations(); // 启用注解 - options.DocumentFilter(); - options.SchemaFilter(); + //options.EnableAnnotations(); // 启用注解 + //options.DocumentFilter(); + //options.SchemaFilter(); // 加载所有xml注释,这里会导致swagger加载有点缓慢 var xmlPaths = Directory.GetFiles(AppContext.BaseDirectory, "*.xml"); foreach (var xml in xmlPaths) diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs index cfd40fd5..ca4b8288 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs @@ -1,26 +1,26 @@ -namespace Swagger; - -/// -/// swagger注释加载慢,把文档添加到缓存 -/// -[Dependency(ReplaceServices = true)] -[ExposeServices(typeof(ISwaggerProvider))] -public class CachingSwaggerProvider : ISwaggerProvider, ITransientDependency -{ - private static readonly ConcurrentDictionary _cache = new ConcurrentDictionary(); - - private readonly SwaggerGenerator _swaggerGenerator; - - public CachingSwaggerProvider( - IOptions optionsAccessor, - IApiDescriptionGroupCollectionProvider apiDescriptionsProvider, - ISchemaGenerator schemaGenerator) - { - _swaggerGenerator = new SwaggerGenerator(optionsAccessor.Value, apiDescriptionsProvider, schemaGenerator); - } - - public OpenApiDocument GetSwagger(string documentName, string host = null, string basePath = null) - { - return _cache.GetOrAdd(documentName, (_) => _swaggerGenerator.GetSwagger(documentName, host, basePath)); - } -} \ No newline at end of file +// namespace Swagger; +// +// /// +// /// swagger注释加载慢,把文档添加到缓存 +// /// +// [Dependency(ReplaceServices = true)] +// [ExposeServices(typeof(ISwaggerProvider))] +// public class CachingSwaggerProvider : ISwaggerProvider, ITransientDependency +// { +// private static readonly ConcurrentDictionary _cache = new ConcurrentDictionary(); +// +// private readonly SwaggerGenerator _swaggerGenerator; +// +// public CachingSwaggerProvider( +// IOptions optionsAccessor, +// IApiDescriptionGroupCollectionProvider apiDescriptionsProvider, +// ISchemaGenerator schemaGenerator) +// { +// _swaggerGenerator = new SwaggerGenerator(optionsAccessor.Value, apiDescriptionsProvider, schemaGenerator); +// } +// +// public OpenApiDocument GetSwagger(string documentName, string host = null, string basePath = null) +// { +// return _cache.GetOrAdd(documentName, (_) => _swaggerGenerator.GetSwagger(documentName, host, basePath)); +// } +// } \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs index 1197d5de..f0d9fd6e 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs @@ -1,21 +1,21 @@ -namespace Swagger; - -/// -/// swagger 枚举映射, -/// 原因:前端代理生成枚举是数字 -/// -public class EnumSchemaFilter : ISchemaFilter -{ - public void Apply(OpenApiSchema schema, SchemaFilterContext context) - { - if (context.Type.IsEnum) - { - var array = new OpenApiArray(); - array.AddRange(Enum.GetNames(context.Type).Select(n => new OpenApiString(n))); - // NSwag - schema.Extensions.Add("x-enumNames", array); - // Openapi-generator - schema.Extensions.Add("x-enum-varnames", array); - } - } -} \ No newline at end of file +// namespace Swagger; +// +// /// +// /// swagger 枚举映射, +// /// 原因:前端代理生成枚举是数字 +// /// +// public class EnumSchemaFilter : ISchemaFilter +// { +// public void Apply(OpenApiSchema schema, SchemaFilterContext context) +// { +// if (context.Type.IsEnum) +// { +// var array = new OpenApiArray(); +// array.AddRange(Enum.GetNames(context.Type).Select(n => new OpenApiString(n))); +// // NSwag +// schema.Extensions.Add("x-enumNames", array); +// // Openapi-generator +// schema.Extensions.Add("x-enum-varnames", array); +// } +// } +// } \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs index e4155e36..2be59eba 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs @@ -1,48 +1,48 @@ -namespace Swagger; - -/// -/// 在使用nswag的时候,原生默认的api导致生产的代理类存在问题 -/// 所有隐藏原生的api,重写路由 -/// -public class HiddenAbpDefaultApiFilter : IDocumentFilter -{ - public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) - { - foreach (ApiDescription apiDescription in context.ApiDescriptions) - { - if (apiDescription.TryGetMethodInfo(out MethodInfo method)) - { - string key = "/" + apiDescription.RelativePath; - var reuslt = IsHidden(key); - if (reuslt) swaggerDoc.Paths.Remove(key); - } - } - } - - private bool IsHidden(string key) - { - var list = GetHiddenAbpDefaultApiList(); - foreach (var item in list) - { - if (key.Contains(item)) return true; - } - - return false; - } - - private List GetHiddenAbpDefaultApiList() - { - return new List() { - "/api/abp/multi-tenancy/tenants", - "/api/account", - "/api/feature-management/features", - "/api/permission-management/permissions", - "/api/identity/my-profile", - "/api/identity", - "/api/multi-tenancy/tenants", - "/api/setting-management/emailing", - "/configuration", - "/outputcache" - }; - } -} \ No newline at end of file +// namespace Swagger; +// +// /// +// /// 在使用nswag的时候,原生默认的api导致生产的代理类存在问题 +// /// 所有隐藏原生的api,重写路由 +// /// +// public class HiddenAbpDefaultApiFilter : IDocumentFilter +// { +// public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) +// { +// foreach (ApiDescription apiDescription in context.ApiDescriptions) +// { +// if (apiDescription.TryGetMethodInfo(out MethodInfo method)) +// { +// string key = "/" + apiDescription.RelativePath; +// var reuslt = IsHidden(key); +// if (reuslt) swaggerDoc.Paths.Remove(key); +// } +// } +// } +// +// private bool IsHidden(string key) +// { +// var list = GetHiddenAbpDefaultApiList(); +// foreach (var item in list) +// { +// if (key.Contains(item)) return true; +// } +// +// return false; +// } +// +// private List GetHiddenAbpDefaultApiList() +// { +// return new List() { +// "/api/abp/multi-tenancy/tenants", +// "/api/account", +// "/api/feature-management/features", +// "/api/permission-management/permissions", +// "/api/identity/my-profile", +// "/api/identity", +// "/api/multi-tenancy/tenants", +// "/api/setting-management/emailing", +// "/configuration", +// "/outputcache" +// }; +// } +// } \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj index ac0ab42b..6cd40174 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable Lion.AbpPro.CAP.EntityFrameworkCore diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj index 6ef45adb..babd06fe 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.CAP diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj index bb07cd2a..9123cb47 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj index a5ccb2a8..d80385b2 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 true Lion.AbpPro.Cli lion.abp diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj index 6d8c78b7..70a3bdf5 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj @@ -1,12 +1,13 @@ - net9.0 + net10.0 Lion.AbpPro.Core - + - + + diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj index 77c75529..1fcddddf 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj index 0e3e5182..bc65739d 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj index 550cbac4..8713c429 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj index 4b177f7a..a3d78e27 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj index c5cf6d20..038588c8 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 Lion.AbpPro.HttpClient diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj index 8b57e0fe..daebb89d 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.Localization diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj index 74eb0528..583470cd 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 Lion.AbpPro.SignalR diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj index 7f3f5d60..11a1fc81 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable Lion.AbpPro.Starter diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj index b4bb58ec..6244403c 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable false diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj index 6861fc97..d4e31bfe 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable false diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj index 6adfefc5..17b9e2d1 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj +++ b/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable false true diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj index 28a6f525..426178ea 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable true diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj index 6a471fab..9c65afb0 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable false diff --git a/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj b/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj index b4e1981a..9b37f7ba 100644 --- a/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj +++ b/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 diff --git a/aspnet-core/global.json b/aspnet-core/global.json new file mode 100644 index 00000000..a11f48e1 --- /dev/null +++ b/aspnet-core/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "10.0.0", + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs index 0264bdd5..8e5a1bfd 100644 --- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs +++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs @@ -1,28 +1,3 @@ -using System.Text; -using Lion.AbpPro.AspNetCore; -using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.AspNetCore.DataProtection; -using Lion.AbpPro.BasicManagement.EntityFrameworkCore; -using Microsoft.AspNetCore.Mvc; -using Microsoft.IdentityModel.Tokens; -using StackExchange.Redis; -using Microsoft.OpenApi.Models; -using Swagger; -using Swashbuckle.AspNetCore.SwaggerUI; -using Volo.Abp; -using Volo.Abp.AspNetCore.ExceptionHandling; -using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; -using Volo.Abp.AspNetCore.Serilog; -using Volo.Abp.Autofac; -using Volo.Abp.Caching; -using Volo.Abp.Caching.StackExchangeRedis; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.MySQL; -using Volo.Abp.Localization; -using Volo.Abp.Modularity; -using Volo.Abp.Swashbuckle; -using Volo.Abp.VirtualFileSystem; - namespace Lion.AbpPro.BasicManagement; [DependsOn( @@ -39,25 +14,25 @@ namespace Lion.AbpPro.BasicManagement; )] public class BasicManagementHttpApiHostModule : AbpModule { - private const string DefaultCorsPolicyName = "Default"; - public override void ConfigureServices(ServiceConfigurationContext context) { - ConfigureCache(context); - ConfigureSwaggerServices(context); - ConfigureJwtAuthentication(context); + context.Services + .AddAbpProAuditLog() + .AddAbpProAuthentication() + .AddAbpProMultiTenancy() + .AddAbpProHealthChecks() + .AddAbpProTenantResolvers() + .AddAbpProLocalization() + .AddAbpProExceptions() + .AddAbpProSwagger("BasicManagement"); Configure(options => { options.UseMySQL(); }); - Configure(options => - { - options.SendExceptionsDetailsToClients = false; - }); - ConfigureVirtualFileSystem(context); } - + public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); - + + app.UseCorrelationId(); app.UseStaticFiles(); app.UseRouting(); @@ -77,164 +52,4 @@ public class BasicManagementHttpApiHostModule : AbpModule app.UseAbpSerilogEnrichers(); app.UseConfiguredEndpoints(); } - /// - /// 配置虚拟文件系统 - /// - /// - private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) - { - Configure(options => - { - options.FileSets.AddEmbedded(); - }); - } - /// - /// Redis缓存 - /// - private void ConfigureCache(ServiceConfigurationContext context) - { - Configure( - options => { options.KeyPrefix = "AbpPro:"; }); - var configuration = context.Services.GetConfiguration(); - var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); - context.Services - .AddDataProtection() - .PersistKeysToStackExchangeRedis(redis, "AbpPro-Protection-Keys"); - } - - private static void ConfigureSwaggerServices(ServiceConfigurationContext context) - { - context.Services.AddSwaggerGen( - options => - { - // 文件下载类型 - options.MapType(() => new OpenApiSchema() { Type = "file" }); - - options.SwaggerDoc("BasicManagement", - new OpenApiInfo { Title = "BasicManagement API", Version = "v1" }); - options.DocInclusionPredicate((docName, description) => true); - options.EnableAnnotations(); // 启用注解 - options.DocumentFilter(); - options.SchemaFilter(); - // 加载所有xml注释,这里会导致swagger加载有点缓慢 - var xmlPaths = Directory.GetFiles(AppContext.BaseDirectory, "*.xml"); - foreach (var xml in xmlPaths) - { - options.IncludeXmlComments(xml, true); - } - - options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, - new OpenApiSecurityScheme() - { - Description = "直接在下框输入JWT生成的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() - } - }); - - options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme() - { - Type = SecuritySchemeType.ApiKey, - In = ParameterLocation.Header, - Name = "Accept-Language", - Description = "多语言设置,系统预设语言有zh-Hans、en,默认为zh-Hans", - }); - - options.AddSecurityRequirement(new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { Type = ReferenceType.SecurityScheme, Id = "ApiKey" } - }, - Array.Empty() - } - }); - }); - } - - /// - /// 配置JWT - /// - private void ConfigureJwtAuthentication(ServiceConfigurationContext context) - { - var configuration = context.Services.GetConfiguration(); - context.Services.AddAuthentication(options => - { - options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; - }) - .AddJwtBearer(options => - { - options.TokenValidationParameters = - new TokenValidationParameters() - { - // 是否开启签名认证 - ValidateIssuerSigningKey = true, - ValidateIssuer = true, - ValidateAudience = true, - ValidateLifetime = true, - //ClockSkew = TimeSpan.Zero, - ValidIssuer = configuration["Jwt:Issuer"], - ValidAudience = configuration["Jwt:Audience"], - IssuerSigningKey = - new SymmetricSecurityKey( - Encoding.ASCII.GetBytes(configuration["Jwt:SecurityKey"])) - }; - - options.Events = new JwtBearerEvents - { - OnMessageReceived = currentContext => - { - var path = currentContext.HttpContext.Request.Path; - if (path.StartsWithSegments("/login")) - { - return Task.CompletedTask; - } - - var accessToken = string.Empty; - if (currentContext.HttpContext.Request.Headers.ContainsKey("Authorization")) - { - accessToken = currentContext.HttpContext.Request.Headers["Authorization"]; - if (!string.IsNullOrWhiteSpace(accessToken)) - { - accessToken = accessToken.Split(" ").LastOrDefault(); - } - } - - if (accessToken.IsNullOrWhiteSpace()) - { - accessToken = currentContext.Request.Query["access_token"].FirstOrDefault(); - } - - if (accessToken.IsNullOrWhiteSpace()) - { - accessToken = currentContext.Request.Cookies[DefaultCorsPolicyName]; - } - - currentContext.Token = accessToken; - currentContext.Request.Headers.Remove("Authorization"); - currentContext.Request.Headers.Append("Authorization", $"Bearer {accessToken}"); - - return Task.CompletedTask; - } - }; - }); - } } \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs index 8455b54d..7c2fcc65 100644 --- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs @@ -1,5 +1,4 @@ -using Microsoft.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; namespace Lion.AbpPro.BasicManagement.Controllers; diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs index 9a3bd045..f9e18854 100644 --- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs +++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore; namespace Lion.AbpPro.BasicManagement.EntityFrameworkCore; diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs new file mode 100644 index 00000000..2b80a9bb --- /dev/null +++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs @@ -0,0 +1,24 @@ +// Global using directives + +global using System.Text; +global using Lion.AbpPro.AspNetCore; +global using Lion.AbpPro.BasicManagement.EntityFrameworkCore; +global using Microsoft.AspNetCore.Authentication.JwtBearer; +global using Microsoft.AspNetCore.DataProtection; +global using Microsoft.AspNetCore.Mvc; +global using Microsoft.IdentityModel.Tokens; +global using StackExchange.Redis; + +global using Swashbuckle.AspNetCore.SwaggerUI; +global using Volo.Abp; +global using Volo.Abp.AspNetCore.ExceptionHandling; +global using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; +global using Volo.Abp.AspNetCore.Serilog; +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.Swashbuckle; \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj index 263d3ec4..b124e8eb 100644 --- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj @@ -1,10 +1,11 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement true Lion.AbpPro.BasicManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 + NU1903;NU1902;$(NoWarnNuGet) diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj index e7f86a54..689a9cfa 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj @@ -1,7 +1,8 @@  - net9.0 + net10.0 Lion.AbpPro.BasicManagement + NU1903;NU1902;$(NoWarnNuGet) diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs index 8f3345dd..bbe3d7f5 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs @@ -75,7 +75,6 @@ public class AbpProApplicationConfigurationAppService : ApplicationService, IAbp Clock = GetClockConfig(), ObjectExtensions = _cachedObjectExtensionsDtoService.Get() }; - if (options.IncludeLocalizationResources) { result.Localization = await GetLocalizationConfigAsync(options); diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs index a5d3c788..c6398f41 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs @@ -1,3 +1,5 @@ +using Mapster; + namespace Lion.AbpPro.BasicManagement.AuditLogs { [Authorize(Policy = BasicManagementPermissions.SystemManagement.AuditLog)] @@ -57,7 +59,7 @@ namespace Lion.AbpPro.BasicManagement.AuditLogs input.HttpStatusCode, true); - return new PagedResultDto(totalCount, ObjectMapper.Map, List>(list)); + return new PagedResultDto(totalCount, list.Adapt>()); } } } \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs deleted file mode 100644 index 5b920d6b..00000000 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,41 +0,0 @@ -using AutoMapper; -using Lion.AbpPro.BasicManagement.AuditLogs; -using Lion.AbpPro.BasicManagement.IdentitySecurityLogs; -using Lion.AbpPro.BasicManagement.Users.Dtos; - -namespace Lion.AbpPro.BasicManagement; - -public class BasicManagementApplicationAutoMapperProfile : Profile -{ - public BasicManagementApplicationAutoMapperProfile() - { - CreateMap() - .ForMember(dest => dest.ExecutionTime, - opt => opt.MapFrom(s => s.ExecutionTime.ToString("O"))); - CreateMap() - .ForMember(dest => dest.ExecutionTime, - opt => opt.MapFrom(s => s.ExecutionTime.ToString("O"))); - - CreateMap() - .ForMember(dest => dest.ChangeTypeDescription, - opt => opt.MapFrom(s => s.ChangeType.ToDescription())) - .ForMember(dest => dest.ChangeTime, - opt => opt.MapFrom(s => s.ChangeTime.ToString("O"))); - CreateMap(); - - CreateMap() - .ForMember(dest => dest.Token, opt => opt.Ignore()); - CreateMap() - .ForMember(e => e.CreationTimeFormat, opt => opt.Ignore()) - .ForMember(e => e.Status, opt => opt.Ignore()); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - } -} \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs index 6095e2d4..67da984d 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs @@ -3,7 +3,6 @@ using Lion.AbpPro.BasicManagement.Roles; using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Excel; using Volo.Abp.Account; -using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; using Volo.Abp.Application; using Volo.Abp.FeatureManagement; @@ -18,7 +17,6 @@ namespace Lion.AbpPro.BasicManagement; typeof(BasicManagementApplicationContractsModule), typeof(AbpDddApplicationModule), typeof(AbpIdentityAspNetCoreModule), - typeof(AbpAutoMapperModule), typeof(AbpAccountApplicationModule), typeof(AbpIdentityApplicationModule), typeof(AbpPermissionManagementApplicationModule), @@ -31,12 +29,6 @@ public class BasicManagementApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); - }); - Configure(options => { diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs index b1763433..ca244655 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs @@ -1,4 +1,6 @@ -namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs; +using Mapster; + +namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs; public class IdentitySecurityLogAppService : BasicManagementAppService, IIdentitySecurityLogAppService { @@ -41,6 +43,6 @@ public class IdentitySecurityLogAppService : BasicManagementAppService, IIdentit input.ClientId, input.CorrelationId); - return new PagedResultDto(totalCount, ObjectMapper.Map, List>(list)); + return new PagedResultDto(totalCount,list.Adapt>()); } } \ No newline at end of file diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj index 02514415..f7cd94ba 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj @@ -1,12 +1,12 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement + NU1903;NU1902;$(NoWarnNuGet) - diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs index bbfe483f..f9217795 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs @@ -1,4 +1,6 @@ -namespace Lion.AbpPro.BasicManagement.OrganizationUnits; +using Mapster; + +namespace Lion.AbpPro.BasicManagement.OrganizationUnits; [Authorize(Policy = BasicManagementPermissions.SystemManagement.OrganizationUnitManagement.Default)] public class OrganizationUnitAppService : BasicManagementAppService, IOrganizationUnitAppService @@ -20,7 +22,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati public virtual async Task> GetTreeAsync() { var organizationUnits = await _organizationUnitRepository.GetListAsync(); - var organizationUnitDtos = ObjectMapper.Map, List>(organizationUnits); + var organizationUnitDtos =organizationUnits.Adapt>(); return ConvertToTree(organizationUnitDtos); } @@ -100,7 +102,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati skipCount: input.SkipCount, filter: input.Filter ); - listResult = ObjectMapper.Map, List>(list); + listResult = list.Adapt>(); } return new PagedResultDto(count, listResult); @@ -121,7 +123,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati skipCount: input.SkipCount, filter: input.Filter ); - listResult = ObjectMapper.Map, List>(users); + listResult = users.Adapt>(); } return new PagedResultDto(count, listResult); @@ -137,7 +139,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati if (count > 0) { var list = await _organizationUnitRepository.GetRolesAsync(organizationUnit, maxResultCount: input.PageSize, skipCount: input.SkipCount); - listResult = ObjectMapper.Map, List>(list); + listResult = list.Adapt>(); } return new PagedResultDto(count, listResult); @@ -158,7 +160,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati skipCount: input.SkipCount, filter: input.Filter ); - listResult = ObjectMapper.Map, List>(roles); + listResult = roles.Adapt>(); } return new PagedResultDto(count, listResult); diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs index 4698e4d0..d6ebd201 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs @@ -1,3 +1,5 @@ +using Mapster; + namespace Lion.AbpPro.BasicManagement.Roles; [Authorize(Policy = IdentityPermissions.Roles.Default)] @@ -27,8 +29,7 @@ public class RoleAppService : BasicManagementAppService, IRoleAppService List source = await _roleRepository.GetListAsync() .ConfigureAwait(continueOnCapturedContext: false); - return new ListResultDto( - ObjectMapper.Map, List>(source)); + return new ListResultDto(source.Adapt>()); } /// @@ -50,7 +51,7 @@ public class RoleAppService : BasicManagementAppService, IRoleAppService return new PagedResultDto( await _roleRepository.GetCountAsync(request.Filter) .ConfigureAwait(continueOnCapturedContext: false), - ObjectMapper.Map, List>(list)); + list.Adapt>()); } diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs index 1f269678..5bb58d9f 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs @@ -1,3 +1,4 @@ +using Mapster; using Volo.Abp.BackgroundJobs; using Volo.Abp.FeatureManagement; using Volo.Abp.SettingManagement; @@ -73,7 +74,7 @@ namespace Lion.AbpPro.BasicManagement.Tenants result.TotalCount = tenant.ConnectionStrings.Count; - var items = ObjectMapper.Map, List>(tenant.ConnectionStrings); + var items = tenant.ConnectionStrings.Adapt>(); if (input.Name.IsNotNullOrWhiteSpace()) { items = items.Where(e => e.Name.ToLower().Contains(input.Name.ToLower())).ToList(); diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs index a04a1979..8650c8ea 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs @@ -1,9 +1,10 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using System.Text; -using IdentityModel; +using Duende.IdentityModel; using Lion.AbpPro.BasicManagement.ConfigurationOptions; using Lion.AbpPro.BasicManagement.Users.Dtos; +using Mapster; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.IdentityModel.Tokens; @@ -82,7 +83,7 @@ namespace Lion.AbpPro.BasicManagement.Users if (roles == null || roles.Count == 0) throw new AbpAuthorizationException(); var token = GenerateJwt(user.Id, user.UserName, user.Name, user.Email, user.TenantId.ToString(), roles.ToList()); - var loginOutput = ObjectMapper.Map(user); + var loginOutput = user.Adapt(); loginOutput.Token = token; loginOutput.Roles = roles.ToList(); return loginOutput; diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs index 396ca5e7..5bdbcc19 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs @@ -2,6 +2,7 @@ using System.Security.Claims; using Lion.AbpPro.BasicManagement.Users.Dtos; using Magicodes.ExporterAndImporter.Excel; using Magicodes.ExporterAndImporter.Excel.AspNetCore; +using Mapster; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical; @@ -56,8 +57,7 @@ namespace Lion.AbpPro.BasicManagement.Users var source = await _identityUserRepository .GetListAsync(request.Sorting, request.MaxResultCount, request.SkipCount, request.Filter); - return new PagedResultDto(count, - base.ObjectMapper.Map, List>(source)); + return new PagedResultDto(count,source.Adapt>()); } public async Task> ListAllAsync(PagingUserListInput input) @@ -73,7 +73,7 @@ namespace Lion.AbpPro.BasicManagement.Users var source = await _identityUserRepository .GetListAsync(request.Sorting, request.MaxResultCount, request.SkipCount, request.Filter); - return ObjectMapper.Map, List>(source); + return source.Adapt>(); } /// @@ -91,7 +91,7 @@ namespace Lion.AbpPro.BasicManagement.Users }; var source = await _identityUserRepository .GetListAsync(request.Sorting, request.MaxResultCount, request.SkipCount, request.Filter); - var result = ObjectMapper.Map, List>(source); + var result = source.Adapt>(); var bytes = await _excelExporter.ExportAsByteArray(result); return new XlsxFileResult(bytes: bytes, fileDownloadName: $"用户导出列表{Clock.Now:yyyyMMdd}"); } @@ -132,9 +132,7 @@ namespace Lion.AbpPro.BasicManagement.Users public virtual async Task> GetRoleByUserId(IdInput input) { var roles = await _identityUserRepository.GetRolesAsync(input.Id); - return new ListResultDto( - ObjectMapper.Map, List>(roles) - ); + return new ListResultDto(roles.Adapt>()); } /// @@ -224,7 +222,7 @@ namespace Lion.AbpPro.BasicManagement.Users throw new BusinessException(BasicManagementErrorCodes.UserNotExist); } - return ObjectMapper.Map(user); + return user.Adapt(); } public virtual async Task MyProfileAsync() @@ -234,8 +232,7 @@ namespace Lion.AbpPro.BasicManagement.Users { throw new BusinessException(BasicManagementErrorCodes.UserNotExist); } - - return ObjectMapper.Map(user); + return user.Adapt(); } public virtual async Task NeedChangePasswordAsync() diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj index 8794dbba..ebdcd80a 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement true diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs index 43639958..8b9bcfe3 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs @@ -13,11 +13,4 @@ )] public class BasicManagementDomainModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.AddMaps(); - }); - } } diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs index d4b72d28..f27ccc71 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs @@ -5,7 +5,6 @@ global using Lion.AbpPro.BasicManagement.Localization; global using Lion.AbpPro.Core; global using Volo.Abp.Auditing; global using Volo.Abp.AuditLogging; -global using Volo.Abp.AutoMapper; global using Volo.Abp.BackgroundJobs; global using Volo.Abp.Domain; global using Volo.Abp.Domain.Services; diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj index 6ccd3ed0..48d21cdc 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj index d0581476..95176066 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj index 0e56e4c4..56e5ce77 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj index e48384f9..62688ad5 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj index a1fe6c68..19a968e2 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj index 7b1de812..76849c15 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj index d0ad4b36..144ed9e0 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj index 2bbf5a01..6e0b3fd7 100644 --- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj +++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.BasicManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs index bc66f7f6..235c9359 100644 --- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs @@ -1,4 +1,6 @@ using Lion.AbpPro.AspNetCore; +using Microsoft.OpenApi; +using Swashbuckle.AspNetCore.SwaggerUI; namespace Lion.AbpPro.DataDictionaryManagement { @@ -16,191 +18,45 @@ namespace Lion.AbpPro.DataDictionaryManagement typeof(AbpAspNetCoreSerilogModule), typeof(AbpSwashbuckleModule), typeof(AbpProAspNetCoreModule) - )] + )] public class DataDictionaryManagementHttpApiHostModule : AbpModule { - private const string DefaultCorsPolicyName = "Default"; - public override void ConfigureServices(ServiceConfigurationContext context) { - - // Configure(options => - // { - // options.IsEnabled = MultiTenancyConsts.IsEnabled; - // }); - context.Services.AddAlwaysAllowAuthorization(); - ConfigureSwaggerServices(context); - ConfigureCache(context); - ConfigureCors(context); - ConfigureDB(); - ConfigureLocalization(); - ConfigureVirtualFileSystem(context); + context.Services + .AddAbpProAuditLog() + .AddAbpProAuthentication() + .AddAbpProMultiTenancy() + .AddAbpProHealthChecks() + .AddAbpProTenantResolvers() + .AddAbpProLocalization() + .AddAbpProExceptions() + .AddAbpProSwagger("DataDictionaryManagement"); } 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.UseCors(); app.UseAuthentication(); - // if (MultiTenancyConsts.IsEnabled) - // { - // app.UseMultiTenancy(); - // } + app.UseMultiTenancy(); 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("DataDictionaryManagement"); + options.SwaggerEndpoint("/swagger/DataDictionaryManagement/swagger.json", "DataDictionaryManagement API"); + options.DocExpansion(DocExpansion.None); + options.DefaultModelsExpandDepth(-1); }); 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 = "DataDictionaryManagement 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 = "DataDictionaryManagement:"; }); - - if (!hostingEnvironment.IsDevelopment()) - { - var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); - context.Services - .AddDataProtection() - .PersistKeysToStackExchangeRedis(redis, "DataDictionaryManagement-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(); - }); } } -} +} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs index f041f7bb..b92e0b72 100644 --- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs +++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs @@ -16,7 +16,6 @@ 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; diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj index da09e1b0..2bf10a87 100644 --- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement true Lion.AbpPro.DataDictionaryManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj index 76a26d21..1d530fd0 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs index 296a2517..3dd7729b 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs @@ -1,3 +1,5 @@ +using Mapster; + namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { [Authorize(DataDictionaryManagementPermissions.DataDictionaryManagement.Default)] @@ -32,7 +34,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries var entities = await _dataDictionaryRepository.GetPagingListAsync(input.Filter, input.PageSize, input.SkipCount, false); - result.Items = ObjectMapper.Map, List>(entities); + result.Items = entities.Adapt>(); return result; } @@ -64,7 +66,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries return new PagedResultDto( entity.Details.Count, - ObjectMapper.Map, List>(details)); + details.Adapt>()); } diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs deleted file mode 100644 index a483beea..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Lion.AbpPro.DataDictionaryManagement -{ - public class DataDictionaryManagementApplicationAutoMapperProfile : Profile - { - public DataDictionaryManagementApplicationAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - CreateMap(); - CreateMap(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs index 4b820e8a..60383215 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs @@ -3,18 +3,9 @@ namespace Lion.AbpPro.DataDictionaryManagement [DependsOn( typeof(DataDictionaryManagementDomainModule), typeof(DataDictionaryManagementApplicationContractsModule), - typeof(AbpDddApplicationModule), - typeof(AbpAutoMapperModule) + typeof(AbpDddApplicationModule) )] public class DataDictionaryManagementApplicationModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); - }); - } } } diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs index 4a85ac94..71d0a31c 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs @@ -4,7 +4,6 @@ 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.DataDictionaryManagement.DataDictionaries.Aggregates; global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dto; global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dtos; @@ -16,5 +15,4 @@ global using Microsoft.Extensions.DependencyInjection; 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.Modularity; \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj index 88a2336f..0b0af5e5 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj @@ -1,12 +1,11 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement - diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj index 8909b79c..811fa423 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement true diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs index 7e38195b..49550a7b 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs @@ -1,3 +1,5 @@ +using Mapster; + namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { public class DataDictionaryManager : DataDictionaryDomainService, IDataDictionaryManager @@ -31,7 +33,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries true, cancellationToken ); - return ObjectMapper.Map(entity); + return entity.Adapt(); }, token: cancellationToken ); @@ -54,7 +56,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries true, cancellationToken ); - return ObjectMapper.Map(entity); + return entity.Adapt(); }, token: cancellationToken ); diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs deleted file mode 100644 index 4045395b..00000000 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Lion.AbpPro.DataDictionaryManagement -{ - public class DataDictionaryDomainAutoMapperProfile : Profile - { - public DataDictionaryDomainAutoMapperProfile() - { - CreateMap(); - CreateMap(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs index a23d3d5d..5e83f3e3 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs @@ -15,15 +15,6 @@ namespace Lion.AbpPro.DataDictionaryManagement /// 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/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs index 0204a66b..13762b70 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs @@ -1,22 +1,11 @@ -using Volo.Abp.AutoMapper; - namespace Lion.AbpPro.DataDictionaryManagement { [DependsOn( typeof(AbpDddDomainModule), typeof(DataDictionaryManagementDomainSharedModule), - typeof(AbpCachingModule), - typeof(AbpAutoMapperModule) + typeof(AbpCachingModule) )] public class DataDictionaryManagementDomainModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); - }); - } } } diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs index 028a1074..0607bf16 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs @@ -6,7 +6,6 @@ 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.DataDictionaryManagement.DataDictionaries.Aggregates; global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dto; global using Lion.AbpPro.Core; diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj index 8160cbb6..a914f1b9 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj @@ -1,14 +1,13 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement - diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj index 4bb09321..0cd2671b 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj index 6da8806b..31b95e6b 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs index d8dde3a4..d7a648eb 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs @@ -1,3 +1,9 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Swashbuckle.AspNetCore.Annotations; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries { [Route("DataDictionary")] diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs index b8e60a5a..16fb5699 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs @@ -3,6 +3,3 @@ global using System.Threading.Tasks; global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dtos; 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/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj index 344f7508..52342185 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj index 3a2c0364..ce049a91 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs index b997c920..04724471 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs @@ -9,12 +9,5 @@ namespace Lion.AbpPro.DataDictionaryManagement )] public class DataDictionaryManagementDomainTestModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.AddMaps(validate: true); - }); - } } } diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs index 96a6aceb..ac0ae9ff 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs @@ -5,6 +5,5 @@ global using System.Linq; global using System.Threading.Tasks; global using Lion.AbpPro.DataDictionaryManagement.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/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj index 5582fdfe..1b70d575 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj index 750681df..a7b8d176 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj index cf755b88..fe5bf094 100644 --- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj +++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.DataDictionaryManagement false diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs index ee88f312..eb442d6b 100644 --- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs +++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs @@ -15,178 +15,41 @@ namespace Lion.AbpPro.FileManagement; )] public class FileManagementHttpApiHostModule : AbpModule { - private const string DefaultCorsPolicyName = "Default"; - public override void ConfigureServices(ServiceConfigurationContext context) { - ConfigureVirtualFileSystem(); - ConfigureSwaggerServices(context); - ConfigAntiForgery(); - ConfigureLocalization(); - ConfigureCache(context); - ConfigureCors(context); - ConfigDB(); + context.Services + .AddAbpProAuditLog() + .AddAbpProAuthentication() + .AddAbpProMultiTenancy() + .AddAbpProHealthChecks() + .AddAbpProTenantResolvers() + .AddAbpProLocalization() + .AddAbpProExceptions() + .AddAbpProSwagger("FileManagement"); + Configure(options => { options.UseMySQL(); }); } public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); - var env = context.GetEnvironment(); - app.UseHttpsRedirection(); + app.UseCorrelationId(); app.UseStaticFiles(); app.UseRouting(); - app.UseCors(DefaultCorsPolicyName); + app.UseCors(); app.UseAuthentication(); + app.UseMultiTenancy(); app.UseAbpRequestLocalization(); app.UseAuthorization(); app.UseSwagger(); app.UseAbpSwaggerUI(options => { - options.SwaggerEndpoint("/swagger/v1/swagger.json", "FileManagement API"); + options.SwaggerEndpoint("/swagger/FileManagement/swagger.json", "FileManagement API"); options.DocExpansion(DocExpansion.None); - options.DefaultModelExpandDepth(-2); + options.DefaultModelsExpandDepth(-1); }); app.UseAuditing(); app.UseAbpSerilogEnrichers(); app.UseConfiguredEndpoints(); } - - /// - /// 配置虚拟文件系统 - /// - private void ConfigureVirtualFileSystem() - { - Configure(options => { options.FileSets.AddEmbedded(); }); - } - - /// - /// 配置SwaggerUI - /// - /// - private static void ConfigureSwaggerServices(ServiceConfigurationContext context) - { - context.Services.AddSwaggerGen( - options => - { - options.SwaggerDoc("v1", new OpenApiInfo { Title = "FileManagement API", Version = "v1" }); - options.DocInclusionPredicate((docName, description) => true); - - - - - #region 多语言 - - options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme - { - Type = SecuritySchemeType.ApiKey, - In = ParameterLocation.Header, - Name = "Accept-Language", - Description = "多语言" - }); - - options.AddSecurityRequirement(new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "ApiKey" } - }, - new string[] { } - } - }); - - #endregion - }); - } - - private void ConfigAntiForgery() - { - Configure(options => { options.AutoValidate = false; }); - } - private void ConfigDB() - { - Configure(options => - { - /* The main point to change your DBMS. - * See also OperationsMigrationsDbContextFactory for EF Core tooling. */ - options.UseMySQL(); - }); - } - - - /// - /// 配置本地化 - /// - private void ConfigureLocalization() - { - Configure(options => - { - options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); - 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("fi", "fi", "Finnish")); - 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("ro-RO", "ro-RO", "Română")); - options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); - options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak")); - 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", "繁體中文")); - options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch")); - options.Languages.Add(new LanguageInfo("es", "es", "Español")); - }); - } - - /// - /// Redis缓存 - /// - /// - private void ConfigureCache(ServiceConfigurationContext context) - { - Configure(options => - { - options.KeyPrefix = "FileManagement:"; - options.GlobalCacheEntryOptions = new DistributedCacheEntryOptions - { - // 全局缓存有效时间 - AbsoluteExpiration = DateTimeOffset.UtcNow.AddHours(2) - }; - }); - - var configuration = context.Services.GetConfiguration(); - var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); - context.Services - .AddDataProtection() - .PersistKeysToStackExchangeRedis(redis, "YH.Wms.Operations-Keys"); - } - - /// - /// 配置跨域 - /// - 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(); - }); - }); - } } \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs index 7aa527c8..98451e35 100644 --- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs +++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs @@ -15,7 +15,6 @@ global using Microsoft.Extensions.Caching.Distributed; 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 StackExchange.Redis; global using Swashbuckle.AspNetCore.SwaggerUI; diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj index a41965bd..74bb5f6c 100644 --- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj @@ -2,10 +2,11 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement true Lion.AbpPro.FileManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 + NU1903;NU1902;$(NoWarnNuGet) diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj index 766bc2ac..d4e14b2b 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj @@ -2,8 +2,9 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement + NU1903;NU1902;$(NoWarnNuGet) diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs deleted file mode 100644 index b617b2d5..00000000 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Lion.AbpPro.FileManagement.Files; - -namespace Lion.AbpPro.FileManagement; - -public class FileManagementApplicationAutoMapperProfile : Profile -{ - public FileManagementApplicationAutoMapperProfile() - { - CreateMap(); - } -} \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs index 7a7d83b2..026bb8e9 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs @@ -3,14 +3,8 @@ namespace Lion.AbpPro.FileManagement; [DependsOn( typeof(FileManagementDomainModule), typeof(FileManagementApplicationContractsModule), - typeof(AbpDddApplicationModule), - typeof(AbpAutoMapperModule) + typeof(AbpDddApplicationModule) )] public class FileManagementApplicationModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => { options.AddMaps(true); }); - } } \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs index ec3829d4..fad62937 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs @@ -1,3 +1,5 @@ +using Mapster; + namespace Lion.AbpPro.FileManagement.Files; /// @@ -27,7 +29,7 @@ public class FileAppService : ApplicationService, IFileAppService result.TotalCount = totalCount; if (totalCount <= 0) return result; var list = await _fileObjectManager.GetListAsync(input.FileName, input.StartCreationTime, input.EndCreationTime, input.PageSize, input.SkipCount); - result.Items = ObjectMapper.Map, List>(list); + result.Items = list.Adapt>(); return result; } diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs index 086045cb..167cec46 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs @@ -2,7 +2,6 @@ global using System.Collections.Generic; global using System.Threading.Tasks; -global using AutoMapper; global using Lion.AbpPro.FileManagement.Localization; global using Lion.AbpPro.FileManagement.Permissions; global using Microsoft.AspNetCore.Authorization; @@ -12,7 +11,6 @@ global using Microsoft.Extensions.DependencyInjection; 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.BlobStoring; global using Volo.Abp.Content; global using Volo.Abp.Modularity; \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj index b9a9a855..68034f97 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj @@ -2,13 +2,13 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement + NU1903;NU1902;$(NoWarnNuGet) - diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj index 76f1e344..0f3b7967 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement true diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs deleted file mode 100644 index 52348a97..00000000 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using AutoMapper; -using Lion.AbpPro.FileManagement.Files; - -namespace Lion.AbpPro.FileManagement -{ - public class FileManagementDomainAutoMapperProfile : Profile - { - public FileManagementDomainAutoMapperProfile() - { - CreateMap(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs index 7014ecd7..b8b7f0d2 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs @@ -1,17 +1,10 @@ -using Volo.Abp.AutoMapper; - namespace Lion.AbpPro.FileManagement; [DependsOn( typeof(AbpDddDomainModule), - typeof(AbpAutoMapperModule), typeof(FileManagementDomainSharedModule), typeof(AbpBlobStoringModule) )] public class FileManagementDomainModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => { options.AddMaps(); }); - } } \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs index 5e6618e5..8db6cade 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs @@ -1,26 +1,24 @@ -using Volo.Abp.ObjectMapping; +using Mapster; namespace Lion.AbpPro.FileManagement.Files; public class FileObjectManager : DomainService { private readonly IFileObjectRepository _fileObjectRepository; - private readonly IObjectMapper _objectMapper; + private readonly ICurrentTenant _currentTenant; public FileObjectManager(IFileObjectRepository fileObjectRepository, - IObjectMapper objectMapper, ICurrentTenant currentTenant) { _fileObjectRepository = fileObjectRepository; - _objectMapper = objectMapper; _currentTenant = currentTenant; } public async Task> GetListAsync(string fileName, DateTime? startDateTime = null, DateTime? endDateTime = null, int maxResultCount = 10, int skipCount = 0) { var list = await _fileObjectRepository.GetListAsync(fileName, startDateTime, endDateTime, maxResultCount, skipCount); - return _objectMapper.Map, List>(list); + return list.Adapt>(); } public async Task GetCountAsync(string fileName, DateTime? startDateTime = null, DateTime? endDateTime = null) @@ -56,8 +54,7 @@ public class FileObjectManager : DomainService entity = new FileObject(id, fileName, fileSize, contentType, CurrentTenant?.Id); await _fileObjectRepository.InsertAsync(entity); } - - return _objectMapper.Map(entity); + return entity.Adapt(); } @@ -78,6 +75,6 @@ public class FileObjectManager : DomainService { var entity = await _fileObjectRepository.FindAsync(id); if (entity == null) throw new DomainFileManagementException(FileManagementErrorCodes.FileNotFound); - return _objectMapper.Map(entity); + return entity.Adapt(); } } \ No newline at end of file diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj index 01d0ecf7..e7806b5f 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj @@ -2,13 +2,12 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement - diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj index 856f4155..c016a717 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj index 31c4691b..74726c7f 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj @@ -3,8 +3,9 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement + NU1903;NU1902;$(NoWarnNuGet) diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj index 7b6ae56b..25b54b32 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj index 023f9489..f0c4ddf6 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj index 7a19db85..ca57e82f 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj index fffc48cc..229f8d06 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj index 1dafcbf3..c42c8896 100644 --- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj +++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj @@ -3,8 +3,9 @@ - net9.0 + net10.0 Lion.AbpPro.FileManagement + NU1903;NU1902;$(NoWarnNuGet) 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 index 2752dfde..0922358b 100644 --- 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 @@ -16,7 +16,6 @@ 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; 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 index c46e0ac6..0048866e 100644 --- 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 @@ -1,4 +1,5 @@ using Lion.AbpPro.AspNetCore; +using Swashbuckle.AspNetCore.SwaggerUI; namespace Lion.AbpPro.LanguageManagement { @@ -16,182 +17,45 @@ namespace Lion.AbpPro.LanguageManagement typeof(AbpAspNetCoreSerilogModule), typeof(AbpSwashbuckleModule), typeof(AbpProAspNetCoreModule) - )] + )] 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); + context.Services + .AddAbpProAuditLog() + .AddAbpProAuthentication() + .AddAbpProMultiTenancy() + .AddAbpProHealthChecks() + .AddAbpProTenantResolvers() + .AddAbpProLocalization() + .AddAbpProExceptions() + .AddAbpProSwagger("LanguageManagement"); + Configure(options => { options.UseMySQL(); }); } 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.UseCors(); app.UseAuthentication(); + app.UseMultiTenancy(); 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"); + options.SwaggerEndpoint("/swagger/LanguageManagement/swagger.json", "LanguageManagement API"); + options.DocExpansion(DocExpansion.None); + options.DefaultModelsExpandDepth(-1); }); 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(); - }); - } } -} +} \ No newline at end of file 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 index b364eef6..bd4921a4 100644 --- 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 @@ -2,10 +2,11 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement true Lion.AbpPro.LanguageManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 + NU1903;NU1902;$(NoWarnNuGet) 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 index d0bccc14..9055bcb0 100644 --- 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 @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement 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 index 9918804d..67cd7935 100644 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs @@ -5,7 +5,6 @@ global using System.Globalization; 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; @@ -18,7 +17,6 @@ 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.Json; global using Volo.Abp.Localization; global using Volo.Abp.Localization.External; 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 deleted file mode 100644 index 405f31a0..00000000 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,15 +0,0 @@ -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 index 5ddd490b..515860dd 100644 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs @@ -3,18 +3,9 @@ namespace Lion.AbpPro.LanguageManagement [DependsOn( typeof(LanguageManagementDomainModule), typeof(LanguageManagementApplicationContractsModule), - typeof(AbpDddApplicationModule), - typeof(AbpAutoMapperModule) + typeof(AbpDddApplicationModule) )] 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/Languages/LanguageAppService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs index fe30a79c..5d1c932b 100644 --- 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 @@ -1,3 +1,5 @@ +using Mapster; + namespace Lion.AbpPro.LanguageManagement.Languages; /// @@ -21,8 +23,7 @@ public class LanguageAppService : ApplicationService, ILanguageAppService public virtual async Task> AllListAsync() { var languages = await _languageManager.ListAsync(); - var list = ObjectMapper.Map, List>(languages); - return list.ToList(); + return languages.Adapt< List>(); } @@ -36,7 +37,7 @@ public class LanguageAppService : ApplicationService, ILanguageAppService 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); + result.Items = list.Adapt< List>(); return result; } 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 index b58adc38..8c777445 100644 --- 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 @@ -1,12 +1,12 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement + NU1903;NU1902;$(NoWarnNuGet) - 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 index 13710021..ca1c6478 100644 --- 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 @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement true 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 index 9fecf102..f3ee0a68 100644 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs @@ -1,4 +1,5 @@ using Lion.AbpPro.LanguageManagement.Languages; +using Mapster; namespace Lion.AbpPro.LanguageManagement; @@ -21,7 +22,13 @@ public class DatabaseLanguageProvider : ILanguageProvider, ITransientDependency var result = await _distributedCache.GetOrAddAsync(LanguageListCacheItem.CalculateCacheKey(), async () => { var languages = await _languageManager.ListAsync(true); - return new LanguageListCacheItem(_objectMapper.Map, List>(languages)); + var languageInfos = new List(); + foreach (var language in languages) + { + var temp = new LanguageInfo(language.CultureName, language.UiCultureName, language.DisplayName); + languageInfos.Add(temp); + } + return new LanguageListCacheItem(languageInfos); }); return result.Languages; } 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 index ae0cfe74..7a8dd263 100644 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs @@ -6,7 +6,6 @@ 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; @@ -15,7 +14,6 @@ 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; 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 deleted file mode 100644 index 90a1b178..00000000 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs +++ /dev/null @@ -1,15 +0,0 @@ -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 index b87f9f51..fafc37ac 100644 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs @@ -6,7 +6,6 @@ namespace Lion.AbpPro.LanguageManagement typeof(AbpDddDomainModule), typeof(LanguageManagementDomainSharedModule), typeof(AbpCachingModule), - typeof(AbpAutoMapperModule), typeof(AbpSettingManagementDomainModule) )] public class LanguageManagementDomainModule : AbpModule @@ -17,10 +16,6 @@ namespace Lion.AbpPro.LanguageManagement { 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 index cc2b561d..3449a7bc 100644 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs @@ -17,15 +17,6 @@ namespace Lion.AbpPro.LanguageManagement /// 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/LanguageTextManager.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs index ec7588c9..faaab7cc 100644 --- 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 @@ -1,14 +1,14 @@ -namespace Lion.AbpPro.LanguageManagement.LanguageTexts; +using Mapster; + +namespace Lion.AbpPro.LanguageManagement.LanguageTexts; public class LanguageTextManager : LanguageManagementDomainService, ILanguageTextManager { private readonly ILanguageTextRepository _languageTextRepository; - private readonly IObjectMapper _objectMapper; - public LanguageTextManager(ILanguageTextRepository languageTextRepository, IObjectMapper objectMapper) + public LanguageTextManager(ILanguageTextRepository languageTextRepository) { _languageTextRepository = languageTextRepository; - _objectMapper = objectMapper; } /// @@ -22,7 +22,7 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex public virtual 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); + return list.Adapt>(); } /// @@ -49,7 +49,7 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex entity = new LanguageText(id, cultureName, resourceName, name, value, CurrentTenant.Id); entity = await _languageTextRepository.InsertAsync(entity); - return _objectMapper.Map(entity); + return entity.Adapt(); } @@ -74,7 +74,7 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex entity = await _languageTextRepository.UpdateAsync(entity); } - return _objectMapper.Map(entity); + return entity.Adapt(); } /// @@ -95,6 +95,6 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex public virtual async Task> FindAsync(string cultureName, string resourceName) { var languageTexts = await _languageTextRepository.FindAsync(cultureName, resourceName); - return _objectMapper.Map, List>(languageTexts); + return languageTexts.Adapt>(); } } \ 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 index 80bb5c2e..bf2af450 100644 --- 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 @@ -1,4 +1,6 @@ -namespace Lion.AbpPro.LanguageManagement.Languages; +using Mapster; + +namespace Lion.AbpPro.LanguageManagement.Languages; public class LanguageManager : LanguageManagementDomainService, ILanguageManager { @@ -24,7 +26,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager public virtual 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); + return list.Adapt>(); } /// @@ -56,7 +58,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager entity = new Language(id, cultureName, uiCultureName, displayName, flagIcon, isEnabled, false, CurrentTenant.Id); entity = await _languageRepository.InsertAsync(entity); - return ObjectMapper.Map(entity); + return entity.Adapt(); } /// @@ -75,7 +77,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); entity.Update(cultureName, uiCultureName, displayName, flagIcon, isEnabled); entity = await _languageRepository.UpdateAsync(entity); - return ObjectMapper.Map(entity); + return entity.Adapt(); } /// @@ -95,7 +97,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager { var entity = await _languageRepository.FindAsync(id); if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); - return ObjectMapper.Map(entity); + return entity.Adapt(); } /// @@ -105,7 +107,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager { var entity = await _languageRepository.FindAsync(cultureName); if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound); - return ObjectMapper.Map(entity); + return entity.Adapt(); } /// 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 index 627318ef..d514238c 100644 --- 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 @@ -1,14 +1,13 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement - 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 index dccef595..8e72d5ea 100644 --- 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 @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement 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 index c545a274..251dea27 100644 --- 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 @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement 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 index f3fa8804..c2b45dd9 100644 --- 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 @@ -1,7 +1,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement 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 index f589f38a..ea75acec 100644 --- 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 @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement false 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 index 4efda282..2cc13c38 100644 --- 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 @@ -5,6 +5,5 @@ 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/LanguageManagementDomainTestModule.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs index a085f179..31c9b7a8 100644 --- 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 @@ -9,12 +9,5 @@ namespace Lion.AbpPro.LanguageManagement )] 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 index 37538111..843993b9 100644 --- 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 @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement false 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 index 82c0b5c6..9991ee97 100644 --- 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 @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement false 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 index cd23cd72..b953e676 100644 --- 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 @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.LanguageManagement false diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs index 32b202f9..ff7e2d53 100644 --- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs +++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs @@ -12,7 +12,6 @@ global using Microsoft.EntityFrameworkCore.Design; global using Microsoft.Extensions.Caching.Distributed; global using Microsoft.Extensions.Configuration; global using Microsoft.Extensions.Hosting; -global using Microsoft.OpenApi.Models; global using Serilog; global using StackExchange.Redis; global using Swashbuckle.AspNetCore.SwaggerUI; diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj index 5f6be1df..5c8fe031 100644 --- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj +++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement true Lion.AbpPro.NotificationManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010 diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs index fc341b4d..ddaf9899 100644 --- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs +++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs @@ -16,176 +16,41 @@ namespace Lion.AbpPro.NotificationManagement; )] public class NotificationManagementHttpApiHostModule : AbpModule { - private const string DefaultCorsPolicyName = "Default"; - public override void ConfigureServices(ServiceConfigurationContext context) { - ConfigureVirtualFileSystem(); - ConfigureSwaggerServices(context); - ConfigAntiForgery(); - ConfigureLocalization(); - ConfigureCache(context); - ConfigureCors(context); - ConfigDB(); + context.Services + .AddAbpProAuditLog() + .AddAbpProAuthentication() + .AddAbpProMultiTenancy() + .AddAbpProHealthChecks() + .AddAbpProTenantResolvers() + .AddAbpProLocalization() + .AddAbpProExceptions() + .AddAbpProSwagger("NotificationManagement"); + Configure(options => { options.UseMySQL(); }); } public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); - var env = context.GetEnvironment(); + app.UseCorrelationId(); app.UseStaticFiles(); app.UseRouting(); - app.UseCors(DefaultCorsPolicyName); + app.UseCors(); app.UseAuthentication(); + app.UseMultiTenancy(); app.UseAbpRequestLocalization(); app.UseAuthorization(); app.UseSwagger(); app.UseAbpSwaggerUI(options => { - options.SwaggerEndpoint("/swagger/v1/swagger.json", "NotificationManagement API"); + options.SwaggerEndpoint("/swagger/NotificationManagement/swagger.json", "NotificationManagement API"); options.DocExpansion(DocExpansion.None); - options.DefaultModelExpandDepth(-2); + options.DefaultModelsExpandDepth(-1); }); app.UseAuditing(); app.UseAbpSerilogEnrichers(); app.UseConfiguredEndpoints(); } - - /// - /// 配置虚拟文件系统 - /// - private void ConfigureVirtualFileSystem() - { - Configure(options => { options.FileSets.AddEmbedded(); }); - } - - private void ConfigDB() - { - Configure(options => - { - /* The main point to change your DBMS. - * See also OperationsMigrationsDbContextFactory for EF Core tooling. */ - options.UseMySQL(); - }); - } - - - /// - /// 配置SwaggerUI - /// - /// - private static void ConfigureSwaggerServices(ServiceConfigurationContext context) - { - context.Services.AddSwaggerGen( - options => - { - options.SwaggerDoc("v1", new OpenApiInfo { Title = "NotificationManagement API", Version = "v1" }); - options.DocInclusionPredicate((docName, description) => true); - - - #region 多语言 - - options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme - { - Type = SecuritySchemeType.ApiKey, - In = ParameterLocation.Header, - Name = "Accept-Language", - Description = "多语言" - }); - - options.AddSecurityRequirement(new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "ApiKey" } - }, - new string[] { } - } - }); - - #endregion - }); - } - - private void ConfigAntiForgery() - { - Configure(options => { options.AutoValidate = false; }); - } - - /// - /// 配置本地化 - /// - private void ConfigureLocalization() - { - Configure(options => - { - options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); - 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("fi", "fi", "Finnish")); - 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("ro-RO", "ro-RO", "Română")); - options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); - options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak")); - 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", "繁體中文")); - options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch")); - options.Languages.Add(new LanguageInfo("es", "es", "Español")); - }); - } - - /// - /// Redis缓存 - /// - /// - private void ConfigureCache(ServiceConfigurationContext context) - { - Configure(options => - { - options.KeyPrefix = "NotificationManagement:"; - options.GlobalCacheEntryOptions = new DistributedCacheEntryOptions - { - // 全局缓存有效时间 - AbsoluteExpiration = DateTimeOffset.UtcNow.AddHours(2) - }; - }); - - var configuration = context.Services.GetConfiguration(); - var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); - context.Services - .AddDataProtection() - .PersistKeysToStackExchangeRedis(redis, "YH.Wms.Operations-Keys"); - } - - /// - /// 配置跨域 - /// - 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(); - }); - }); - } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj index b8b680f7..0460e7c0 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs index 9351ae64..948c917b 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs @@ -4,7 +4,6 @@ global using System; global using System.Collections.Generic; global using System.Linq; global using System.Threading.Tasks; -global using AutoMapper; global using Lion.AbpPro.NotificationManagement.Localization; global using Lion.AbpPro.NotificationManagement.Notifications; global using Lion.AbpPro.NotificationManagement.Notifications.Dtos; @@ -18,7 +17,6 @@ global using Volo.Abp.Application.Dtos; global using Volo.Abp.Application.Services; global using Volo.Abp.AspNetCore.SignalR; global using Volo.Abp.Auditing; -global using Volo.Abp.AutoMapper; global using Volo.Abp.DependencyInjection; global using Volo.Abp.EventBus; global using Volo.Abp.Modularity; diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj index 4b36f0c4..b8414eb2 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj @@ -3,14 +3,14 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement + NU1903; - diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs deleted file mode 100644 index 7eea8871..00000000 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Lion.AbpPro.NotificationManagement -{ - public class NotificationManagementApplicationAutoMapperProfile : Profile - { - public NotificationManagementApplicationAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - CreateMap(); - CreateMap() - .ForMember(dest => dest.Title, opt => opt.Ignore()) - .ForMember(dest => dest.Content, opt => opt.Ignore()) - .ForMember(dest => dest.MessageType, opt => opt.Ignore()) - .ForMember(dest => dest.MessageLevel, opt => opt.Ignore()) - .ForMember(dest => dest.SenderUserId, opt => opt.Ignore()) - .ForMember(dest => dest.SenderUserName, opt => opt.Ignore()); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationModule.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationModule.cs index 4ac10b6b..4e1c4023 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationModule.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationModule.cs @@ -4,15 +4,9 @@ namespace Lion.AbpPro.NotificationManagement typeof(NotificationManagementDomainModule), typeof(NotificationManagementApplicationContractsModule), typeof(AbpDddApplicationModule), - typeof(AbpAutoMapperModule), typeof(AbpAspNetCoreSignalRModule) )] public class NotificationManagementApplicationModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => { options.AddMaps(validate: true); }); - } } } \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs index 3811a784..607cd599 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Notifications/NotificationAppService.cs @@ -1,6 +1,7 @@ using System.Security.Authentication; using Lion.AbpPro.SignalR; using Lion.AbpPro.SignalR.Enums; +using Mapster; namespace Lion.AbpPro.NotificationManagement.Notifications { @@ -119,7 +120,7 @@ namespace Lion.AbpPro.NotificationManagement.Notifications // item.ReceiveUserId = sub?.ReceiveUserId; // item.ReceiveUserName = sub?.ReceiveUserName; // } - return new PagedResultDto(totalCount, ObjectMapper.Map, List>(list)); + return new PagedResultDto(totalCount, list.Adapt>()); } /// @@ -129,7 +130,7 @@ namespace Lion.AbpPro.NotificationManagement.Notifications { var totalCount = await _notificationSubscriptionManager.GetPagingCountAsync(input.NotificationId, input.ReceiverUserId, input.ReceiverUserName, input.StartReadTime, input.EndReadTime); var list = await _notificationSubscriptionManager.GetPagingListAsync(input.NotificationId, input.ReceiverUserId, input.ReceiverUserName, input.StartReadTime, input.EndReadTime, input.PageSize, input.SkipCount); - var result = new PagedResultDto(totalCount, ObjectMapper.Map, List>(list)); + var result = new PagedResultDto(totalCount, list.Adapt>()); // 获取消息内容 if (totalCount > 0) { diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Lion.AbpPro.NotificationManagement.Domain.Shared.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Lion.AbpPro.NotificationManagement.Domain.Shared.csproj index 8a5cb063..d8ffbc5f 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Lion.AbpPro.NotificationManagement.Domain.Shared.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/Lion.AbpPro.NotificationManagement.Domain.Shared.csproj @@ -3,14 +3,13 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement true - diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/GlobalUsings.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/GlobalUsings.cs index cfd2cb43..d7a6bd2f 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/GlobalUsings.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/GlobalUsings.cs @@ -7,7 +7,6 @@ global using System.Linq; global using System.Runtime.Serialization; global using System.Threading; global using System.Threading.Tasks; -global using AutoMapper; global using Lion.AbpPro.Core; global using Lion.AbpPro.NotificationManagement.Notifications; global using Lion.AbpPro.NotificationManagement.Notifications.Aggregates; @@ -16,7 +15,6 @@ global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.Logging; global using Volo.Abp; global using Volo.Abp.Authorization; -global using Volo.Abp.AutoMapper; global using Volo.Abp.Domain; global using Volo.Abp.Domain.Entities.Auditing; global using Volo.Abp.Domain.Repositories; diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj index 3450ee0d..db691ede 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Lion.AbpPro.NotificationManagement.Domain.csproj @@ -3,13 +3,12 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement - diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationDomainAutoMapperProfile.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationDomainAutoMapperProfile.cs deleted file mode 100644 index e6831d05..00000000 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationDomainAutoMapperProfile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Lion.AbpPro.NotificationManagement.Notifications.Dtos; - -namespace Lion.AbpPro.NotificationManagement -{ - public class NotificationDomainAutoMapperProfile:Profile - { - public NotificationDomainAutoMapperProfile() - { - CreateMap(); - CreateMap(); - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainModule.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainModule.cs index b58db758..6dcc8f08 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainModule.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainModule.cs @@ -5,18 +5,9 @@ namespace Lion.AbpPro.NotificationManagement [DependsOn( typeof(AbpDddDomainModule), typeof(NotificationManagementDomainSharedModule), - typeof(AbpAutoMapperModule), typeof(AbpProSignalRModule) )] public class NotificationManagementDomainModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddProfile(validate: true); - }); - } } } diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainService.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainService.cs index 37fc2531..2f7fb1ef 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainService.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationManagementDomainService.cs @@ -15,15 +15,6 @@ namespace Lion.AbpPro.NotificationManagement /// 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/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs index 420f9ddb..141d9dcc 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationManager.cs @@ -1,5 +1,6 @@ using Lion.AbpPro.NotificationManagement.Notifications.Dtos; using Lion.AbpPro.SignalR.Enums; +using Mapster; namespace Lion.AbpPro.NotificationManagement.Notifications { @@ -34,7 +35,7 @@ namespace Lion.AbpPro.NotificationManagement.Notifications int skipCount = 0) { var list = await _notificationRepository.GetPagingListAsync(title, content, senderUserId, senderUserName, receiverUserId, receiverUserName, read, startReadTime, endReadTime, messageType, messageLevel, maxResultCount, skipCount); - return ObjectMapper.Map, List>(list); + return list.Adapt>(); } /// @@ -73,13 +74,13 @@ namespace Lion.AbpPro.NotificationManagement.Notifications { var notification = await _notificationRepository.FindAsync(id); if (notification == null) throw new NotificationManagementDomainException(NotificationManagementErrorCodes.MessageNotExist); - return ObjectMapper.Map(notification); + return notification.Adapt(); } public async Task> GetListAsync(List ids) { var notifications = await _notificationRepository.GetListAsync(ids); - return ObjectMapper.Map, List>(notifications); + return notifications.Adapt>(); } public async Task DeleteAsync(Guid id) diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationSubscriptionManager.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationSubscriptionManager.cs index 8b6a2d4e..b67e8bc7 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationSubscriptionManager.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/Notifications/NotificationSubscriptionManager.cs @@ -1,4 +1,5 @@ using Lion.AbpPro.NotificationManagement.Notifications.Dtos; +using Mapster; namespace Lion.AbpPro.NotificationManagement.Notifications; @@ -27,19 +28,19 @@ public class NotificationSubscriptionManager : NotificationManagementDomainServi CancellationToken cancellationToken = default) { var list = await _notificationSubscriptionRepository.GetPagingListAsync(notificationId, receiverUserId, receiverUserName, startReadTime, endReadTime, maxResultCount, skipCount, cancellationToken); - return ObjectMapper.Map, List>(list); + return list.Adapt>(); } public async Task> GetListAsync(List notificationId, Guid receiverUserId, CancellationToken cancellationToken = default) { var list = await _notificationSubscriptionRepository.GetListAsync(notificationId, receiverUserId, cancellationToken); - return ObjectMapper.Map, List>(list); + return list.Adapt>(); } public async Task FindAsync(Guid receiveUserId, Guid notificationId, CancellationToken cancellationToken = default) { var subscription = await _notificationSubscriptionRepository.FindAsync(receiveUserId, notificationId, cancellationToken); - return ObjectMapper.Map(subscription); + return subscription.Adapt(); } public async Task DeleteAsync(Guid id, CancellationToken cancellationToken = default) diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj index 79796365..f0e9aef5 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.EntityFrameworkCore/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi.Client/Lion.AbpPro.NotificationManagement.HttpApi.Client.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi.Client/Lion.AbpPro.NotificationManagement.HttpApi.Client.csproj index db6a08b0..2024f9df 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi.Client/Lion.AbpPro.NotificationManagement.HttpApi.Client.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi.Client/Lion.AbpPro.NotificationManagement.HttpApi.Client.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj index 6569c51d..393c3650 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.HttpApi/Lion.AbpPro.NotificationManagement.HttpApi.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj index 87056b08..6b1576d4 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Application.Tests/Lion.AbpPro.NotificationManagement.Application.Tests.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj index 0fa4d0fc..94eba98d 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.Domain.Tests/Lion.AbpPro.NotificationManagement.Domain.Tests.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj index ad423ca0..6103ab23 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests/Lion.AbpPro.NotificationManagement.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj index 8c760cbe..6bcd2d93 100644 --- a/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj +++ b/aspnet-core/modules/NotificationManagement/test/Lion.AbpPro.NotificationManagement.TestBase/Lion.AbpPro.NotificationManagement.TestBase.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro.NotificationManagement false diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs index d9bf9117..ad611b61 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs @@ -44,11 +44,10 @@ global using Microsoft.Extensions.Logging; global using Microsoft.Extensions.Logging.Abstractions; global using Microsoft.Extensions.Options; global using Microsoft.IdentityModel.Tokens; -global using Microsoft.OpenApi.Models; global using Serilog; global using Serilog.Events; global using StackExchange.Redis; -global using Swagger; + global using Swashbuckle.AspNetCore.SwaggerUI; global using Volo.Abp; global using Volo.Abp.Account.Web; diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj index fb5228ce..b191c34f 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj @@ -1,7 +1,8 @@ - net9.0 + net10.0 Lion.AbpPro + NU1902; true Lion.AbpPro-4681b4fd-151f-4221-84a4-929d86723e4c 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 e1222c38..51d2d7b8 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json @@ -44,7 +44,8 @@ "SelfUrl": "http://localhost:44315", }, "ConnectionStrings": { - "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDemo9;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + //"Default": "Data Source=localhost;Port=3306;Database=LionAbpProDemo9;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "User ID=postgres;Password=1q2w3E*;Host=localhost;Port=5432;Database=LionAbpProDemo10;" }, "Hangfire": { "Redis": { 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 3cbbf77b..2206f3e3 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 @@ -1,7 +1,8 @@ - net9.0 + net10.0 Lion.AbpPro + NU1903; diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs deleted file mode 100644 index 0693a39f..00000000 --- a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Lion.AbpPro -{ - public class AbpProApplicationAutoMapperProfile : Profile - { - public AbpProApplicationAutoMapperProfile() - { - - } - } -} diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs index c18a07b5..93c58e84 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs @@ -15,9 +15,5 @@ namespace Lion.AbpPro )] public class AbpProApplicationModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => { options.AddMaps(); }); - } } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs b/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs index 5aa5f83e..088a9fd4 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/GlobalUsings.cs @@ -15,7 +15,5 @@ global using Microsoft.AspNetCore.Authorization; global using Microsoft.Extensions.Configuration; global using Microsoft.Extensions.Localization; global using Volo.Abp.Application.Services; -global using Volo.Abp.AutoMapper; global using Volo.Abp.DependencyInjection; -global using Volo.Abp.Modularity; -global using Profile = AutoMapper.Profile; \ No newline at end of file +global using Volo.Abp.Modularity; \ No newline at end of file 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 cdebdd2e..e9f220b5 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 @@ -2,8 +2,9 @@ - net9.0 + net10.0 Lion.AbpPro + NU1903; diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj index f2393940..0e6bed15 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj @@ -4,7 +4,7 @@ Exe - net9.0 + net10.0 diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json index 226024d7..7b75bd3b 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json @@ -1,5 +1,6 @@ { "ConnectionStrings": { - "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDemo9;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + // "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDemo10;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "User ID=postgres;Password=1q2w3E*;Host=localhost;Port=5432;Database=LionAbpProDemo10;" } } \ 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 327704aa..d6fc551d 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 @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro true diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs index 1a16fba8..429d5826 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainModule.cs @@ -13,9 +13,5 @@ namespace Lion.AbpPro )] public class AbpProDomainModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => { options.AddMaps(); }); - } } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainService.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainService.cs index 7177ef8e..da1a61d8 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainService.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/AbpProDomainService.cs @@ -22,15 +22,5 @@ namespace Lion.AbpPro /// 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/services/src/Lion.AbpPro.Domain/GlobalUsings.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/GlobalUsings.cs index 8a5421c2..0723d064 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/GlobalUsings.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/GlobalUsings.cs @@ -16,7 +16,6 @@ global using Lion.AbpPro.Users.Dto; global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.Logging; global using Microsoft.Extensions.Logging.Abstractions; -global using Volo.Abp.AutoMapper; global using Volo.Abp.Data; global using Volo.Abp.DependencyInjection; global using Volo.Abp.Domain.Services; 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 b785a1ba..244c4d44 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 @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro 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 5d497316..4276fff9 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProEntityFrameworkCoreModule.cs @@ -1,13 +1,13 @@ using Lion.AbpPro.FileManagement.EntityFrameworkCore; using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; -using Volo.Abp.Guids; +using Volo.Abp.EntityFrameworkCore.PostgreSql; namespace Lion.AbpPro.EntityFrameworkCore { [DependsOn( typeof(AbpProDomainModule), typeof(BasicManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), + typeof(AbpEntityFrameworkCorePostgreSqlModule), typeof(DataDictionaryManagementEntityFrameworkCoreModule), typeof(NotificationManagementEntityFrameworkCoreModule), typeof(LanguageManagementEntityFrameworkCoreModule), @@ -18,6 +18,7 @@ namespace Lion.AbpPro.EntityFrameworkCore public override void PreConfigureServices(ServiceConfigurationContext context) { AbpProEfCoreEntityExtensionMappings.Configure(); + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); } public override void ConfigureServices(ServiceConfigurationContext context) @@ -35,9 +36,9 @@ namespace Lion.AbpPro.EntityFrameworkCore * See also HayoonKoreaDbContextFactory for EF Core tooling. * https://github.com/abpframework/abp/issues/21879 * */ - options.UseMySQL(builder => + options.UseNpgsql(builder => { - builder.TranslateParameterizedCollectionsToConstants(); + builder.UseParameterizedCollectionMode(ParameterTranslationMode.MultipleParameters); }); }); } diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs index f41e786e..c9bf5901 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs @@ -11,7 +11,7 @@ namespace Lion.AbpPro.EntityFrameworkCore var configuration = BuildConfiguration(); var builder = new DbContextOptionsBuilder() - .UseMySQL(configuration.GetConnectionString("Default") ?? string.Empty); + .UseNpgsql(configuration.GetConnectionString("Default") ?? string.Empty); return new AbpProDbContext(builder.Options); } diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/GlobalUsings.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/GlobalUsings.cs index 75106637..c025dee0 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/GlobalUsings.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/GlobalUsings.cs @@ -27,7 +27,6 @@ global using Volo.Abp.Data; global using Volo.Abp.DependencyInjection; global using Volo.Abp.EntityFrameworkCore; global using Volo.Abp.EntityFrameworkCore.Modeling; -global using Volo.Abp.EntityFrameworkCore.MySQL; global using Volo.Abp.FeatureManagement; global using Volo.Abp.FeatureManagement.EntityFrameworkCore; global using Volo.Abp.Identity; 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 131f41d5..08e2a7f8 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 @@ -2,7 +2,7 @@ - net9.0 + net10.0 Lion.AbpPro @@ -13,12 +13,14 @@ - + runtime; build; native; contentfiles; analyzers compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native + + \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.Designer.cs new file mode 100644 index 00000000..e69de29b diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.cs new file mode 100644 index 00000000..e69de29b diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251113033431_Init.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.Designer.cs similarity index 74% rename from aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251113033431_Init.Designer.cs rename to aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.Designer.cs index 0b3f3a53..4ae7ff85 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251113033431_Init.Designer.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.Designer.cs @@ -5,13 +5,15 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Volo.Abp.EntityFrameworkCore; #nullable disable namespace Lion.AbpPro.Migrations { [DbContext(typeof(AbpProDbContext))] - [Migration("20251113033431_Init")] + [Migration("20251223140343_Init")] partial class Init { /// @@ -19,73 +21,76 @@ namespace Lion.AbpPro.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "9.0.6") - .HasAnnotation("Relational:MaxIdentifierLength", 64); + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "10.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Description") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("DisplayText") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -96,44 +101,44 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DataDictionaryId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Description") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("DisplayText") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Order") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -145,46 +150,46 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Lion.AbpPro.FileManagement.Files.FileObject", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("ContentType") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("文件名称"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FileName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("文件名称"); b.Property("FileSize") @@ -193,20 +198,20 @@ namespace Lion.AbpPro.Migrations b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -219,76 +224,76 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言名称"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("名称"); b.Property("ResourceName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("资源名称"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasComment("值"); b.HasKey("Id"); @@ -301,81 +306,81 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("CultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("语言名称"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("显示名称"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("FlagIcon") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("图标"); b.Property("IsDefault") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UiCultureName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasComment("Ui语言名称"); b.HasKey("Id"); @@ -388,90 +393,90 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("Content") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("MessageLevel") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("MessageType") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("Read") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ReceiveUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ReceiveUserName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("SenderUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SenderUserName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Title") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -481,68 +486,68 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("NotificationId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Read") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ReceiveUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ReceiveUserName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -557,113 +562,113 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)") + .HasColumnType("character varying(96)") .HasColumnName("ApplicationName"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("BrowserInfo"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientId"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ClientIpAddress"); b.Property("ClientName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("ClientName"); b.Property("Comments") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Comments"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasColumnType("longtext"); + .HasColumnType("text"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("HttpMethod") .HasMaxLength(16) - .HasColumnType("varchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("HttpMethod"); b.Property("HttpStatusCode") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("HttpStatusCode"); b.Property("ImpersonatorTenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("ImpersonatorTenantId"); b.Property("ImpersonatorTenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("ImpersonatorTenantName"); b.Property("ImpersonatorUserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("ImpersonatorUserId"); b.Property("ImpersonatorUserName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ImpersonatorUserName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("TenantName"); b.Property("Url") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Url"); b.Property("UserId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("UserId"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -678,41 +683,41 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ExecutionDuration") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("MethodName") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("MethodName"); b.Property("Parameters") .HasMaxLength(2000) - .HasColumnType("varchar(2000)") + .HasColumnType("character varying(2000)") .HasColumnName("Parameters"); b.Property("ServiceName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("ServiceName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -727,23 +732,23 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogExcelFile", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("FileName") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("FileName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -754,40 +759,40 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AuditLogId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("ChangeTime"); b.Property("ChangeType") - .HasColumnType("tinyint unsigned") + .HasColumnType("smallint") .HasColumnName("ChangeType"); b.Property("EntityId") .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityId"); b.Property("EntityTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EntityTypeFullName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("EntityTypeFullName"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -802,35 +807,35 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EntityChangeId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("NewValue") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("NewValue"); b.Property("OriginalValue") .HasMaxLength(512) - .HasColumnType("varchar(512)") + .HasColumnType("character varying(512)") .HasColumnName("OriginalValue"); b.Property("PropertyName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("PropertyName"); b.Property("PropertyTypeFullName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("PropertyTypeFullName"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -843,52 +848,52 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsAbandoned") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false); b.Property("JobArgs") .IsRequired() .HasMaxLength(1048576) - .HasColumnType("longtext"); + .HasColumnType("character varying(1048576)"); b.Property("JobName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("LastTryTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("NextTryTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("Priority") .ValueGeneratedOnAdd() - .HasColumnType("tinyint unsigned") + .HasColumnType("smallint") .HasDefaultValue((byte)15); b.Property("TryCount") @@ -906,52 +911,52 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AllowedProviders") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("DefaultValue") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("IsAvailableToHost") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ValueType") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); @@ -966,21 +971,21 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -993,25 +998,25 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -1024,49 +1029,49 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("Description") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsStatic") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("Regex") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("RegexDescription") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Required") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("ValueType") - .HasColumnType("int"); + .HasColumnType("integer"); b.HasKey("Id"); @@ -1076,19 +1081,19 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SourceTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("SourceUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TargetTenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TargetUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -1101,51 +1106,51 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDefault") - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasColumnName("IsDefault"); b.Property("IsPublic") - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasColumnName("IsPublic"); b.Property("IsStatic") - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasColumnName("IsStatic"); b.Property("Name") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1158,22 +1163,22 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1186,65 +1191,65 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Action") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("ApplicationName") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("BrowserInfo") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ClientIpAddress") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CorrelationId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Identity") .HasMaxLength(96) - .HasColumnType("varchar(96)"); + .HasColumnType("character varying(96)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TenantName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("UserName") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -1262,46 +1267,46 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClientId") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Device") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("DeviceInfo") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasMaxLength(256) + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IpAddresses") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.Property("LastAccessed") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("SessionId") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("SignedIn") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -1317,11 +1322,11 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("AccessFailedCount") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasDefaultValue(0) .HasColumnName("AccessFailedCount"); @@ -1329,142 +1334,142 @@ namespace Lion.AbpPro.Migrations .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("Email") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("Email"); b.Property("EmailConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("EmailConfirmed"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsActive") - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasColumnName("IsActive"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("IsExternal") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("LastPasswordChangeTime") - .HasColumnType("datetime"); + .HasColumnType("timestamp with time zone"); b.Property("LockoutEnabled") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("LockoutEnabled"); b.Property("LockoutEnd") - .HasColumnType("datetime"); + .HasColumnType("timestamp with time zone"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Name"); b.Property("NormalizedEmail") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedEmail"); b.Property("NormalizedUserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("NormalizedUserName"); b.Property("PasswordHash") .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("PasswordHash"); b.Property("PhoneNumber") .HasMaxLength(16) - .HasColumnType("varchar(16)") + .HasColumnType("character varying(16)") .HasColumnName("PhoneNumber"); b.Property("PhoneNumberConfirmed") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("PhoneNumberConfirmed"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("SecurityStamp"); b.Property("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("Surname") .HasMaxLength(64) - .HasColumnType("varchar(64)") + .HasColumnType("character varying(64)") .HasColumnName("Surname"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("TwoFactorEnabled") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("TwoFactorEnabled"); b.Property("UserName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)") + .HasColumnType("character varying(256)") .HasColumnName("UserName"); b.HasKey("Id"); @@ -1483,23 +1488,23 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ClaimType") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ClaimValue") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.HasKey("Id"); @@ -1511,22 +1516,22 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("EndTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("SourceUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("StartTime") - .HasColumnType("datetime(6)"); + .HasColumnType("timestamp with time zone"); b.Property("TargetUserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1537,23 +1542,23 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderDisplayName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(196) - .HasColumnType("varchar(196)"); + .HasColumnType("character varying(196)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "LoginProvider"); @@ -1566,21 +1571,21 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => { b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "UserId"); @@ -1593,13 +1598,13 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("UserId", "RoleId"); @@ -1612,22 +1617,22 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => { b.Property("UserId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("LoginProvider") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Name") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.Property("Value") - .HasColumnType("longtext"); + .HasColumnType("text"); b.HasKey("UserId", "LoginProvider", "Name"); @@ -1637,70 +1642,70 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(95) - .HasColumnType("varchar(95)") + .HasColumnType("character varying(95)") .HasColumnName("Code"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)") + .HasColumnType("character varying(128)") .HasColumnName("DisplayName"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("ParentId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1715,21 +1720,21 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => { b.Property("OrganizationUnitId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("RoleId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("OrganizationUnitId", "RoleId"); @@ -1742,44 +1747,44 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("GroupName") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("MultiTenancySide") - .HasColumnType("tinyint unsigned"); + .HasColumnType("smallint"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ParentName") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Providers") .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("StateCheckers") .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.HasKey("Id"); @@ -1794,25 +1799,25 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("TenantId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("TenantId"); b.HasKey("Id"); @@ -1826,21 +1831,21 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.HasKey("Id"); @@ -1853,25 +1858,25 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("ProviderKey") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("ProviderName") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.HasKey("Id"); @@ -1884,42 +1889,42 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("DefaultValue") .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + .HasColumnType("character varying(2048)"); b.Property("Description") .HasMaxLength(512) - .HasColumnType("varchar(512)"); + .HasColumnType("character varying(512)"); b.Property("DisplayName") .IsRequired() .HasMaxLength(256) - .HasColumnType("varchar(256)"); + .HasColumnType("character varying(256)"); b.Property("ExtraProperties") - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("IsInherited") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); + .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(128) - .HasColumnType("varchar(128)"); + .HasColumnType("character varying(128)"); b.Property("Providers") .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.HasKey("Id"); @@ -1932,62 +1937,62 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() .HasMaxLength(40) - .HasColumnType("varchar(40)") + .HasColumnType("character varying(40)") .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("CreatorId"); b.Property("DeleterId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("DeletionTime"); b.Property("EntityVersion") - .HasColumnType("int"); + .HasColumnType("integer"); b.Property("ExtraProperties") .IsRequired() - .HasColumnType("longtext") + .HasColumnType("text") .HasColumnName("ExtraProperties"); b.Property("IsDeleted") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasDefaultValue(false) .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("datetime(6)") + .HasColumnType("timestamp with time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") - .HasColumnType("char(36)") + .HasColumnType("uuid") .HasColumnName("LastModifierId"); b.Property("Name") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("NormalizedName") .IsRequired() .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.HasKey("Id"); @@ -2001,16 +2006,16 @@ namespace Lion.AbpPro.Migrations modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => { b.Property("TenantId") - .HasColumnType("char(36)"); + .HasColumnType("uuid"); b.Property("Name") .HasMaxLength(64) - .HasColumnType("varchar(64)"); + .HasColumnType("character varying(64)"); b.Property("Value") .IsRequired() .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); + .HasColumnType("character varying(1024)"); b.HasKey("TenantId", "Name"); diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251113033431_Init.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.cs similarity index 54% rename from aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251113033431_Init.cs rename to aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.cs index a45dadd2..a968d5d9 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251113033431_Init.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.cs @@ -11,194 +11,183 @@ namespace Lion.AbpPro.Migrations /// protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.AlterDatabase() - .Annotation("MySQL:Charset", "utf8mb4"); - migrationBuilder.CreateTable( name: "AbpAuditLogExcelFiles", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - FileName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + FileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpAuditLogExcelFiles", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpAuditLogs", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true), - UserId = table.Column(type: "char(36)", nullable: true), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true), - TenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - ImpersonatorUserId = table.Column(type: "char(36)", nullable: true), - ImpersonatorUserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - ImpersonatorTenantId = table.Column(type: "char(36)", nullable: true), - ImpersonatorTenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - ExecutionTime = table.Column(type: "datetime(6)", nullable: false), - ExecutionDuration = table.Column(type: "int", nullable: false), - ClientIpAddress = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - ClientName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - CorrelationId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - BrowserInfo = table.Column(type: "varchar(512)", maxLength: 512, nullable: true), - HttpMethod = table.Column(type: "varchar(16)", maxLength: 16, nullable: true), - Url = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - Exceptions = table.Column(type: "longtext", nullable: true), - Comments = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - HttpStatusCode = table.Column(type: "int", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uuid", nullable: true), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ImpersonatorUserId = table.Column(type: "uuid", nullable: true), + ImpersonatorUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ImpersonatorTenantId = table.Column(type: "uuid", nullable: true), + ImpersonatorTenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ExecutionTime = table.Column(type: "timestamp with time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + HttpMethod = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + Url = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + Exceptions = table.Column(type: "text", nullable: true), + Comments = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + HttpStatusCode = table.Column(type: "integer", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpBackgroundJobs", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true), - JobName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - JobArgs = table.Column(type: "longtext", maxLength: 1048576, nullable: false), + Id = table.Column(type: "uuid", nullable: false), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + JobName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + JobArgs = table.Column(type: "character varying(1048576)", maxLength: 1048576, nullable: false), TryCount = table.Column(type: "smallint", nullable: false, defaultValue: (short)0), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - NextTryTime = table.Column(type: "datetime(6)", nullable: false), - LastTryTime = table.Column(type: "datetime(6)", nullable: true), - IsAbandoned = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - Priority = table.Column(type: "tinyint unsigned", nullable: false, defaultValue: (byte)15), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + NextTryTime = table.Column(type: "timestamp with time zone", nullable: false), + LastTryTime = table.Column(type: "timestamp with time zone", nullable: true), + IsAbandoned = table.Column(type: "boolean", nullable: false, defaultValue: false), + Priority = table.Column(type: "smallint", nullable: false, defaultValue: (byte)15), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpClaimTypes", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - Required = table.Column(type: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - Regex = table.Column(type: "varchar(512)", maxLength: 512, nullable: true), - RegexDescription = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + Regex = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "integer", nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpFeatureGroups", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpFeatureGroups", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpFeatures", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - DefaultValue = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - IsVisibleToClients = table.Column(type: "tinyint(1)", nullable: false), - IsAvailableToHost = table.Column(type: "tinyint(1)", nullable: false), - AllowedProviders = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + GroupName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ParentName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + DefaultValue = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + IsVisibleToClients = table.Column(type: "boolean", nullable: false), + IsAvailableToHost = table.Column(type: "boolean", nullable: false), + AllowedProviders = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpFeatures", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpFeatureValues", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - Value = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpLinkUsers", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - SourceUserId = table.Column(type: "char(36)", nullable: false), - SourceTenantId = table.Column(type: "char(36)", nullable: true), - TargetUserId = table.Column(type: "char(36)", nullable: false), - TargetTenantId = table.Column(type: "char(36)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + SourceUserId = table.Column(type: "uuid", nullable: false), + SourceTenantId = table.Column(type: "uuid", nullable: true), + TargetUserId = table.Column(type: "uuid", nullable: false), + TargetTenantId = table.Column(type: "uuid", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpOrganizationUnits", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - ParentId = table.Column(type: "char(36)", nullable: true), - Code = table.Column(type: "varchar(95)", maxLength: 95, nullable: false), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ParentId = table.Column(type: "uuid", nullable: true), + Code = table.Column(type: "character varying(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { @@ -208,427 +197,409 @@ namespace Lion.AbpPro.Migrations column: x => x.ParentId, principalTable: "AbpOrganizationUnits", principalColumn: "Id"); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpPermissionGrants", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpPermissionGroups", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpPermissions", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - GroupName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - ParentName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - MultiTenancySide = table.Column(type: "tinyint unsigned", nullable: false), - Providers = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - StateCheckers = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + GroupName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ParentName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsEnabled = table.Column(type: "boolean", nullable: false), + MultiTenancySide = table.Column(type: "smallint", nullable: false), + Providers = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + StateCheckers = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpPermissions", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpProDataDictionaries", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - Code = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - DisplayText = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Code = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + DisplayText = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpProDataDictionaries", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpProFileObjects", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - FileName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "文件名称"), + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + FileName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "文件名称"), FileSize = table.Column(type: "bigint", nullable: false, comment: "文件大小"), - ContentType = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "文件名称"), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + ContentType = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "文件名称"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpProFileObjects", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpProLanguages", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称"), - UiCultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "Ui语言名称"), - DisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "显示名称"), - FlagIcon = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "图标"), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - IsDefault = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CultureName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "语言名称"), + UiCultureName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "Ui语言名称"), + DisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "显示名称"), + FlagIcon = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, comment: "图标"), + IsEnabled = table.Column(type: "boolean", nullable: false), + IsDefault = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpProLanguages", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpProLanguageTexts", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - CultureName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "语言名称"), - ResourceName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "资源名称"), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "名称"), - Value = table.Column(type: "varchar(256)", maxLength: 256, nullable: false, comment: "值"), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CultureName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "语言名称"), + ResourceName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false, comment: "资源名称"), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "名称"), + Value = table.Column(type: "character varying(256)", maxLength: 256, nullable: false, comment: "值"), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpProLanguageTexts", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpProNotifications", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - Title = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - Content = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false), - MessageType = table.Column(type: "int", nullable: false), - MessageLevel = table.Column(type: "int", nullable: false), - SenderUserId = table.Column(type: "char(36)", nullable: false), - SenderUserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - ReceiveUserId = table.Column(type: "char(36)", nullable: true), - ReceiveUserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - Read = table.Column(type: "tinyint(1)", nullable: false), - ReadTime = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Title = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Content = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + MessageType = table.Column(type: "integer", nullable: false), + MessageLevel = table.Column(type: "integer", nullable: false), + SenderUserId = table.Column(type: "uuid", nullable: false), + SenderUserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ReceiveUserId = table.Column(type: "uuid", nullable: true), + ReceiveUserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Read = table.Column(type: "boolean", nullable: false), + ReadTime = table.Column(type: "timestamp with time zone", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpProNotifications", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpProNotificationSubscriptions", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - NotificationId = table.Column(type: "char(36)", nullable: false), - ReceiveUserId = table.Column(type: "char(36)", nullable: false), - ReceiveUserName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - Read = table.Column(type: "tinyint(1)", nullable: false), - ReadTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + NotificationId = table.Column(type: "uuid", nullable: false), + ReceiveUserId = table.Column(type: "uuid", nullable: false), + ReceiveUserName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Read = table.Column(type: "boolean", nullable: false), + ReadTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpProNotificationSubscriptions", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpRoles", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - Name = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - NormalizedName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - IsDefault = table.Column(type: "tinyint(1)", nullable: false), - IsStatic = table.Column(type: "tinyint(1)", nullable: false), - IsPublic = table.Column(type: "tinyint(1)", nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "boolean", nullable: false), + IsStatic = table.Column(type: "boolean", nullable: false), + IsPublic = table.Column(type: "boolean", nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpRoles", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpSecurityLogs", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - ApplicationName = table.Column(type: "varchar(96)", maxLength: 96, nullable: true), - Identity = table.Column(type: "varchar(96)", maxLength: 96, nullable: true), - Action = table.Column(type: "varchar(96)", maxLength: 96, nullable: true), - UserId = table.Column(type: "char(36)", nullable: true), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - TenantName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - CorrelationId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - ClientIpAddress = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - BrowserInfo = table.Column(type: "varchar(512)", maxLength: 512, nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ApplicationName = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "character varying(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpSessions", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - SessionId = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - Device = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - DeviceInfo = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - TenantId = table.Column(type: "char(36)", nullable: true), - UserId = table.Column(type: "char(36)", nullable: false), - ClientId = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - IpAddresses = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true), - SignedIn = table.Column(type: "datetime(6)", nullable: false), - LastAccessed = table.Column(type: "datetime(6)", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + SessionId = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Device = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + DeviceInfo = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + TenantId = table.Column(type: "uuid", nullable: true), + UserId = table.Column(type: "uuid", nullable: false), + ClientId = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + IpAddresses = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), + SignedIn = table.Column(type: "timestamp with time zone", nullable: false), + LastAccessed = table.Column(type: "timestamp with time zone", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpSessions", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpSettingDefinitions", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - DisplayName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "varchar(512)", maxLength: 512, nullable: true), - DefaultValue = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: true), - IsVisibleToClients = table.Column(type: "tinyint(1)", nullable: false), - Providers = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true), - IsInherited = table.Column(type: "tinyint(1)", nullable: false), - IsEncrypted = table.Column(type: "tinyint(1)", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + DefaultValue = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), + IsVisibleToClients = table.Column(type: "boolean", nullable: false), + Providers = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + IsInherited = table.Column(type: "boolean", nullable: false), + IsEncrypted = table.Column(type: "boolean", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpSettingDefinitions", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpSettings", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - Value = table.Column(type: "varchar(2048)", maxLength: 2048, nullable: false), - ProviderName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - ProviderKey = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + Value = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), + ProviderName = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + ProviderKey = table.Column(type: "character varying(64)", maxLength: 64, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpSettings", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpTenants", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - NormalizedName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + NormalizedName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpTenants", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpUserDelegations", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - SourceUserId = table.Column(type: "char(36)", nullable: false), - TargetUserId = table.Column(type: "char(36)", nullable: false), - StartTime = table.Column(type: "datetime(6)", nullable: false), - EndTime = table.Column(type: "datetime(6)", nullable: false) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + SourceUserId = table.Column(type: "uuid", nullable: false), + TargetUserId = table.Column(type: "uuid", nullable: false), + StartTime = table.Column(type: "timestamp with time zone", nullable: false), + EndTime = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpUsers", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - UserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - NormalizedUserName = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - Surname = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - Email = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - NormalizedEmail = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - EmailConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - PasswordHash = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - SecurityStamp = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - IsExternal = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - PhoneNumber = table.Column(type: "varchar(16)", maxLength: 16, nullable: true), - PhoneNumberConfirmed = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - IsActive = table.Column(type: "tinyint(1)", nullable: false), - TwoFactorEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - LockoutEnd = table.Column(type: "datetime", nullable: true), - LockoutEnabled = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), - ShouldChangePasswordOnNextLogin = table.Column(type: "tinyint(1)", nullable: false), - EntityVersion = table.Column(type: "int", nullable: false), - LastPasswordChangeTime = table.Column(type: "datetime", nullable: true), - ExtraProperties = table.Column(type: "longtext", nullable: false), - ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "char(36)", nullable: true), - DeletionTime = table.Column(type: "datetime(6)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + UserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "boolean", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "character varying(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "boolean", nullable: false, defaultValue: false), + IsActive = table.Column(type: "boolean", nullable: false), + TwoFactorEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "timestamp with time zone", nullable: true), + LockoutEnabled = table.Column(type: "boolean", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "integer", nullable: false, defaultValue: 0), + ShouldChangePasswordOnNextLogin = table.Column(type: "boolean", nullable: false), + EntityVersion = table.Column(type: "integer", nullable: false), + LastPasswordChangeTime = table.Column(type: "timestamp with time zone", nullable: true), + ExtraProperties = table.Column(type: "text", nullable: false), + ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true), + IsDeleted = table.Column(type: "boolean", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uuid", nullable: true), + DeletionTime = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUsers", x => x.Id); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpAuditLogActions", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - AuditLogId = table.Column(type: "char(36)", nullable: false), - ServiceName = table.Column(type: "varchar(256)", maxLength: 256, nullable: true), - MethodName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - Parameters = table.Column(type: "varchar(2000)", maxLength: 2000, nullable: true), - ExecutionTime = table.Column(type: "datetime(6)", nullable: false), - ExecutionDuration = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + AuditLogId = table.Column(type: "uuid", nullable: false), + ServiceName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + MethodName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + Parameters = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + ExecutionTime = table.Column(type: "timestamp with time zone", nullable: false), + ExecutionDuration = table.Column(type: "integer", nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { @@ -639,22 +610,21 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpAuditLogs", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpEntityChanges", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - AuditLogId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - ChangeTime = table.Column(type: "datetime(6)", nullable: false), - ChangeType = table.Column(type: "tinyint unsigned", nullable: false), - EntityTenantId = table.Column(type: "char(36)", nullable: true), - EntityId = table.Column(type: "varchar(128)", maxLength: 128, nullable: true), - EntityTypeFullName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - ExtraProperties = table.Column(type: "longtext", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + AuditLogId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ChangeTime = table.Column(type: "timestamp with time zone", nullable: false), + ChangeType = table.Column(type: "smallint", nullable: false), + EntityTenantId = table.Column(type: "uuid", nullable: true), + EntityId = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + EntityTypeFullName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => { @@ -665,24 +635,23 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpAuditLogs", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpProDataDictionaryDetails", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - DataDictionaryId = table.Column(type: "char(36)", nullable: false), - Code = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - Order = table.Column(type: "int", nullable: false), - DisplayText = table.Column(type: "varchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true), - IsEnabled = table.Column(type: "tinyint(1)", nullable: false), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true), - LastModificationTime = table.Column(type: "datetime(6)", nullable: true), - LastModifierId = table.Column(type: "char(36)", nullable: true) + Id = table.Column(type: "uuid", nullable: false), + DataDictionaryId = table.Column(type: "uuid", nullable: false), + Code = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Order = table.Column(type: "integer", nullable: false), + DisplayText = table.Column(type: "character varying(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + IsEnabled = table.Column(type: "boolean", nullable: false), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModifierId = table.Column(type: "uuid", nullable: true) }, constraints: table => { @@ -693,24 +662,23 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpProDataDictionaries", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpOrganizationUnitRoles", columns: table => new { - RoleId = table.Column(type: "char(36)", nullable: false), - OrganizationUnitId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true) + RoleId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); table.ForeignKey( - name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUn~", + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationU~", column: x => x.OrganizationUnitId, principalTable: "AbpOrganizationUnits", principalColumn: "Id", @@ -721,18 +689,17 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpRoles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpRoleClaims", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - RoleId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -743,16 +710,15 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpRoles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpTenantConnectionStrings", columns: table => new { - TenantId = table.Column(type: "char(36)", nullable: false), - Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - Value = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: false) + TenantId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false) }, constraints: table => { @@ -763,18 +729,17 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpTenants", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpUserClaims", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - UserId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - ClaimType = table.Column(type: "varchar(256)", maxLength: 256, nullable: false), - ClaimValue = table.Column(type: "varchar(1024)", maxLength: 1024, nullable: true) + Id = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ClaimType = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true) }, constraints: table => { @@ -785,18 +750,17 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpUserLogins", columns: table => new { - UserId = table.Column(type: "char(36)", nullable: false), - LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - ProviderKey = table.Column(type: "varchar(196)", maxLength: 196, nullable: false), - ProviderDisplayName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + ProviderKey = table.Column(type: "character varying(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "character varying(128)", maxLength: 128, nullable: true) }, constraints: table => { @@ -807,24 +771,23 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpUserOrganizationUnits", columns: table => new { - UserId = table.Column(type: "char(36)", nullable: false), - OrganizationUnitId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - CreationTime = table.Column(type: "datetime(6)", nullable: false), - CreatorId = table.Column(type: "char(36)", nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + OrganizationUnitId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + CreationTime = table.Column(type: "timestamp with time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); table.ForeignKey( - name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUn~", + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationU~", column: x => x.OrganizationUnitId, principalTable: "AbpOrganizationUnits", principalColumn: "Id", @@ -835,16 +798,15 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpUserRoles", columns: table => new { - UserId = table.Column(type: "char(36)", nullable: false), - RoleId = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + RoleId = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true) }, constraints: table => { @@ -861,18 +823,17 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpUserTokens", columns: table => new { - UserId = table.Column(type: "char(36)", nullable: false), - LoginProvider = table.Column(type: "varchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - Value = table.Column(type: "longtext", nullable: true) + UserId = table.Column(type: "uuid", nullable: false), + LoginProvider = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Value = table.Column(type: "text", nullable: true) }, constraints: table => { @@ -883,20 +844,19 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateTable( name: "AbpEntityPropertyChanges", columns: table => new { - Id = table.Column(type: "char(36)", nullable: false), - TenantId = table.Column(type: "char(36)", nullable: true), - EntityChangeId = table.Column(type: "char(36)", nullable: false), - NewValue = table.Column(type: "varchar(512)", maxLength: 512, nullable: true), - OriginalValue = table.Column(type: "varchar(512)", maxLength: 512, nullable: true), - PropertyName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false), - PropertyTypeFullName = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + EntityChangeId = table.Column(type: "uuid", nullable: false), + NewValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + OriginalValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + PropertyName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + PropertyTypeFullName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) }, constraints: table => { @@ -907,8 +867,7 @@ namespace Lion.AbpPro.Migrations principalTable: "AbpEntityChanges", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySQL:Charset", "utf8mb4"); + }); migrationBuilder.CreateIndex( name: "IX_AbpAuditLogActions_AuditLogId", @@ -916,7 +875,7 @@ namespace Lion.AbpPro.Migrations column: "AuditLogId"); migrationBuilder.CreateIndex( - name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Execution~", + name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~", table: "AbpAuditLogActions", columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); @@ -974,7 +933,7 @@ namespace Lion.AbpPro.Migrations unique: true); migrationBuilder.CreateIndex( - name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Target~", + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~", table: "AbpLinkUsers", columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, unique: true); 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 b9a177dc..e69de29b 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs @@ -1,2198 +0,0 @@ -// -using System; -using Lion.AbpPro.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Lion.AbpPro.Migrations -{ - [DbContext(typeof(AbpProDbContext))] - partial class AbpProDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.6") - .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() - .IsRequired() - .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") - .IsRequired() - .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("AbpProDataDictionaries", (string)null); - }); - - modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("Code") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - 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") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.Property("DisplayText") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - 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("AbpProDataDictionaryDetails", (string)null); - }); - - modelBuilder.Entity("Lion.AbpPro.FileManagement.Files.FileObject", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("文件名称"); - - 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") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("文件名称"); - - b.Property("FileSize") - .HasColumnType("bigint") - .HasComment("文件大小"); - - 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.HasIndex("FileName"); - - b.ToTable("AbpProFileObjects", (string)null); - }); - - modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .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") - .IsRequired() - .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("AbpProLanguageTexts", (string)null); - }); - - modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .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") - .IsRequired() - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("FlagIcon") - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .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("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UiCultureName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)") - .HasComment("Ui语言名称"); - - b.HasKey("Id"); - - b.HasIndex("CultureName"); - - b.ToTable("AbpProLanguages", (string)null); - }); - - modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .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") - .IsRequired() - .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("Read") - .HasColumnType("tinyint(1)"); - - b.Property("ReadTime") - .HasColumnType("datetime(6)"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("ReceiveUserName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SenderUserId") - .HasColumnType("char(36)"); - - b.Property("SenderUserName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.HasKey("Id"); - - b.ToTable("AbpProNotifications", (string)null); - }); - - modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .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") - .IsRequired() - .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("NotificationId") - .HasColumnType("char(36)"); - - b.Property("Read") - .HasColumnType("tinyint(1)"); - - b.Property("ReadTime") - .HasColumnType("datetime(6)"); - - b.Property("ReceiveUserId") - .HasColumnType("char(36)"); - - b.Property("ReceiveUserName") - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("NotificationId"); - - b.HasIndex("ReceiveUserId"); - - b.ToTable("AbpProNotificationSubscriptions", (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() - .IsRequired() - .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") - .IsRequired() - .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.AuditLogExcelFile", 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("FileName") - .HasMaxLength(256) - .HasColumnType("varchar(256)") - .HasColumnName("FileName"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpAuditLogExcelFiles", (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") - .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("ApplicationName") - .HasMaxLength(96) - .HasColumnType("varchar(96)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("ExtraProperties") - .IsRequired() - .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() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .IsRequired() - .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() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)") - .HasColumnName("CreationTime"); - - b.Property("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .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() - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime(6)"); - - b.Property("ExtraProperties") - .IsRequired() - .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.IdentitySession", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("Device") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("DeviceInfo") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IpAddresses") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("LastAccessed") - .HasColumnType("datetime(6)"); - - b.Property("SessionId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("SignedIn") - .HasColumnType("datetime(6)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.Property("UserId") - .HasColumnType("char(36)"); - - b.HasKey("Id"); - - b.HasIndex("Device"); - - b.HasIndex("SessionId"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("AbpSessions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0) - .HasColumnName("AccessFailedCount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .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("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .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("LastPasswordChangeTime") - .HasColumnType("datetime"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasDefaultValue(false) - .HasColumnName("LockoutEnabled"); - - b.Property("LockoutEnd") - .HasColumnType("datetime"); - - 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("ShouldChangePasswordOnNextLogin") - .HasColumnType("tinyint(1)"); - - 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.IdentityUserDelegation", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("EndTime") - .HasColumnType("datetime(6)"); - - b.Property("SourceUserId") - .HasColumnType("char(36)"); - - b.Property("StartTime") - .HasColumnType("datetime(6)"); - - b.Property("TargetUserId") - .HasColumnType("char(36)"); - - b.Property("TenantId") - .HasColumnType("char(36)") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("AbpUserDelegations", (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() - .IsRequired() - .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("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .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.SettingManagement.SettingDefinitionRecord", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("DefaultValue") - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); - - b.Property("Description") - .HasMaxLength(512) - .HasColumnType("varchar(512)"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("ExtraProperties") - .HasColumnType("longtext") - .HasColumnName("ExtraProperties"); - - b.Property("IsEncrypted") - .HasColumnType("tinyint(1)"); - - b.Property("IsInherited") - .HasColumnType("tinyint(1)"); - - b.Property("IsVisibleToClients") - .HasColumnType("tinyint(1)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("varchar(128)"); - - b.Property("Providers") - .HasMaxLength(1024) - .HasColumnType("varchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("AbpSettingDefinitions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .HasColumnType("char(36)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .IsRequired() - .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("EntityVersion") - .HasColumnType("int"); - - b.Property("ExtraProperties") - .IsRequired() - .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.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpTenants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("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() - .HasConstraintName("FK_DictDetail_DictId"); - }); - - 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("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.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj b/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj index 389fa987..6c792beb 100644 --- a/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj +++ b/aspnet-core/services/src/Lion.AbpPro.FreeSqlRepository/Lion.AbpPro.FreeSqlRepository.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable 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 b65d4e85..4fffeed1 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 @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro 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 b0615b97..901a4fe8 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 @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro diff --git a/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj index 7b5cdfe0..26947e96 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.Application.Tests/Lion.AbpPro.Application.Tests.csproj @@ -2,9 +2,10 @@ - net9.0 + net10.0 Lion.AbpPro false + NU1902;NU1903 diff --git a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj index 05b0e7e5..8d8051cf 100644 --- a/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.Domain.Tests/Lion.AbpPro.Domain.Tests.csproj @@ -3,9 +3,10 @@ - net9.0 + net10.0 Lion.AbpPro false + NU1902;NU1903 diff --git a/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj index f167fbf5..53f50e38 100644 --- a/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro false diff --git a/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj b/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj index 32af7b19..c2fbaf8e 100644 --- a/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.FreeSqlRepository.Tests/Lion.AbpPro.FreeSqlRepository.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 false diff --git a/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj b/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj index ac6f31ec..75551071 100644 --- a/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.HttpApi.Client.ConsoleTestApp/Lion.AbpPro.HttpApi.Client.ConsoleTestApp.csproj @@ -3,8 +3,9 @@ Exe - net9.0 + net10.0 false + NU1902;NU1903 diff --git a/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj b/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj index adbd8238..ee52a5cf 100644 --- a/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj +++ b/aspnet-core/services/test/Lion.AbpPro.TestBase/Lion.AbpPro.TestBase.csproj @@ -3,7 +3,7 @@ - net9.0 + net10.0 Lion.AbpPro false