From 9f8e1eddcc6c04d07986a37866bafef4dbb30381 Mon Sep 17 00:00:00 2001 From: wangjunzzz <> Date: Sat, 27 Dec 2025 10:32:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BF=AB=E9=80=9Fcur?= =?UTF-8?q?d=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/Lion.AbpPro.sln | 19 +- .../ServiceCollectionExtensions.cs | 8 +- ...on.AbpPro.Ddd.Application.Contracts.csproj | 13 + .../AbpProDddApplicationContractsModule.cs | 10 + .../Application/Contracts/AbpProPagedInput.cs | 53 + .../Contracts/IAbpProCrudAppService.cs | 48 + .../Contracts/IAbpProPageTimeInput.cs | 20 + .../Contracts/IAbpProPagedInput.cs | 11 + .../Contracts/IDeletesAppService.cs | 19 + .../Lion.AbpPro.Ddd.Application.csproj | 15 + .../Ddd/Application/AbpProCrudAppService.cs | 221 ++ .../Application/AbpProDddApplicationModule.cs | 24 + .../BasicManagementHttpApiHostModule.cs | 6 + ...asicManagementSettingDefinitionProvider.cs | 18 +- ...taDictionaryManagementHttpApiHostModule.cs | 5 + .../FileManagementHttpApiHostModule.cs | 5 + .../LanguageManagementHttpApiHostModule.cs | 5 + ...NotificationManagementHttpApiHostModule.cs | 5 + .../AbpProHttpApiHostModule.cs | 9 + .../appsettings.Development.json | 2 +- .../AbpProApplicationContractsModule.cs | 4 +- .../Demo/DemoCreateInput.cs | 10 + .../Demo/DemoGetListInput.cs | 10 + .../Demo/DemoGetListOutput.cs | 12 + .../Demo/DemoGetOutput.cs | 14 + .../Demo/DemoUpdateInput.cs | 12 + .../Demo/IDemoAppService.cs | 8 + .../Lion.AbpPro.Application.Contracts.csproj | 1 + .../AbpProApplicationModule.cs | 4 +- .../Demo/DemoAppService.cs | 19 + .../Lion.AbpPro.Application.csproj | 1 + .../AbpProDbMigratorModule.cs | 4 +- .../Lion.AbpPro.DbMigrator.csproj | 1 + .../Lion.AbpPro.DbMigrator/appsettings.json | 2 +- .../Lion.AbpPro.Domain/Demo/DemoAggregate.cs | 15 + .../EntityFrameworkCore/AbpProDbContext.cs | 5 +- .../AbpProDbContextModelCreatingExtensions.cs | 7 + .../AbpProMigrationsDbContextFactory.cs | 1 + .../EntityFrameworkCore/IAbpProDbContext.cs | 4 +- .../20251223131937_Init.Designer.cs | 0 .../Migrations/20251223131937_Init.cs | 0 ...er.cs => 20251227022220_1.0.0.Designer.cs} | 160 +- ...140343_Init.cs => 20251227022220_1.0.0.cs} | 122 +- .../AbpProDbContextModelSnapshot.cs | 2265 +++++++++++++++++ .../Controllers/DemoController.cs | 44 + ...MyProjectNameMigrationsDbContextFactory.cs | 1 + 46 files changed, 3116 insertions(+), 126 deletions(-) create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion.AbpPro.Ddd.Application.Contracts.csproj create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProDddApplicationContractsModule.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProPagedInput.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProCrudAppService.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPageTimeInput.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPagedInput.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IDeletesAppService.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion.AbpPro.Ddd.Application.csproj create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProCrudAppService.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProDddApplicationModule.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoCreateInput.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListInput.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListOutput.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetOutput.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoUpdateInput.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/IDemoAppService.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application/Demo/DemoAppService.cs create mode 100644 aspnet-core/services/src/Lion.AbpPro.Domain/Demo/DemoAggregate.cs delete mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.Designer.cs delete mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.cs rename aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/{20251223140343_Init.Designer.cs => 20251227022220_1.0.0.Designer.cs} (93%) rename aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/{20251223140343_Init.cs => 20251227022220_1.0.0.cs} (94%) create mode 100644 aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/DemoController.cs diff --git a/aspnet-core/Lion.AbpPro.sln b/aspnet-core/Lion.AbpPro.sln index eb33a471..20bb3152 100644 --- a/aspnet-core/Lion.AbpPro.sln +++ b/aspnet-core/Lion.AbpPro.sln @@ -251,7 +251,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.Hangfire", "fra EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.SignalR", "frameworks\src\Lion.AbpPro.SignalR\Lion.AbpPro.SignalR.csproj", "{61F9FF69-B06B-4EE6-A34D-6BFA297D3097}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.FreeSqlRepository", "frameworks\src\Lion.AbpPro.FreeSqlRepository\Lion.AbpPro.FreeSqlRepository.csproj", "{929F258B-C222-48E5-9668-6FEDF858740F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.Ddd.Application", "frameworks\src\Lion.AbpPro.Ddd.Application\Lion.AbpPro.Ddd.Application.csproj", "{A365DF49-AFC1-4D01-BF4B-AF4070C82486}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.Ddd.Application.Contracts", "frameworks\src\Lion.AbpPro.Ddd.Application.Contracts\Lion.AbpPro.Ddd.Application.Contracts.csproj", "{96D333D4-D482-43BF-BDAE-B6A781C4DB60}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -619,10 +621,14 @@ Global {61F9FF69-B06B-4EE6-A34D-6BFA297D3097}.Debug|Any CPU.Build.0 = Debug|Any CPU {61F9FF69-B06B-4EE6-A34D-6BFA297D3097}.Release|Any CPU.ActiveCfg = Release|Any CPU {61F9FF69-B06B-4EE6-A34D-6BFA297D3097}.Release|Any CPU.Build.0 = Release|Any CPU - {929F258B-C222-48E5-9668-6FEDF858740F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {929F258B-C222-48E5-9668-6FEDF858740F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {929F258B-C222-48E5-9668-6FEDF858740F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {929F258B-C222-48E5-9668-6FEDF858740F}.Release|Any CPU.Build.0 = Release|Any CPU + {A365DF49-AFC1-4D01-BF4B-AF4070C82486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A365DF49-AFC1-4D01-BF4B-AF4070C82486}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A365DF49-AFC1-4D01-BF4B-AF4070C82486}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A365DF49-AFC1-4D01-BF4B-AF4070C82486}.Release|Any CPU.Build.0 = Release|Any CPU + {96D333D4-D482-43BF-BDAE-B6A781C4DB60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96D333D4-D482-43BF-BDAE-B6A781C4DB60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96D333D4-D482-43BF-BDAE-B6A781C4DB60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96D333D4-D482-43BF-BDAE-B6A781C4DB60}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -743,7 +749,8 @@ Global {89CCAEA6-8176-4E4B-8D84-A2ACE2715F88} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3} {6C2FDD3D-F711-46B0-A2F2-B94BC33F136B} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3} {61F9FF69-B06B-4EE6-A34D-6BFA297D3097} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3} - {929F258B-C222-48E5-9668-6FEDF858740F} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3} + {A365DF49-AFC1-4D01-BF4B-AF4070C82486} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3} + {96D333D4-D482-43BF-BDAE-B6A781C4DB60} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} 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 60a4a745..03d84a47 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 @@ -62,7 +62,7 @@ public static class ServiceCollectionExtensions // options.TenantResolvers.Add(new QueryStringTenantResolveContributor()); // options.TenantResolvers.Add(new RouteTenantResolveContributor()); options.TenantResolvers.Add(new HeaderTenantResolveContributor()); - options.TenantResolvers.Add(new CookieTenantResolveContributor()); + //options.TenantResolvers.Add(new CookieTenantResolveContributor()); }); return service; @@ -129,11 +129,7 @@ public static class ServiceCollectionExtensions public static IServiceCollection AddAbpProAntiForgery(this IServiceCollection service) { var antiForgeryOptions = service.BuildServiceProvider().GetRequiredService>().Value; - if (antiForgeryOptions.Enabled) - { - service.Configure(options => { options.AutoValidate = antiForgeryOptions.Enabled; }); - } - + service.Configure(options => { options.AutoValidate = antiForgeryOptions.Enabled; }); return service; } diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion.AbpPro.Ddd.Application.Contracts.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion.AbpPro.Ddd.Application.Contracts.csproj new file mode 100644 index 00000000..a3aa0bc4 --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion.AbpPro.Ddd.Application.Contracts.csproj @@ -0,0 +1,13 @@ + + + + net10.0 + enable + + + + + + + + diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProDddApplicationContractsModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProDddApplicationContractsModule.cs new file mode 100644 index 00000000..b15b0e28 --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProDddApplicationContractsModule.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Application; +using Volo.Abp.Modularity; + +namespace Lion.AbpPro.Ddd.Application.Contracts; + +[DependsOn(typeof(AbpDddApplicationContractsModule))] +public class AbpProDddApplicationContractsModule : AbpModule +{ + +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProPagedInput.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProPagedInput.cs new file mode 100644 index 00000000..a2856d93 --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProPagedInput.cs @@ -0,0 +1,53 @@ +using Volo.Abp.Application.Dtos; + +namespace Lion.AbpPro.Ddd.Application.Contracts +{ + /// + /// 分页查询请求DTO,包含时间范围和自定义排序功能 + /// + public class AbpProPagedInput : PagedAndSortedResultRequestDto, IAbpProPagedInput + { + /// + /// 当前页面.默认从1开始 + /// + public int PageIndex { get; set; } = 1; + + /// + /// 每页多少条.每页显示多少记录 + /// + public int PageSize { get; set; } = 10; + + public override int SkipCount => (PageIndex - 1) * PageSize; + + public override int MaxResultCount => PageSize; + + /// + /// 查询开始时间 + /// + public DateTime? StartTime { get; set; } + + /// + /// 查询结束时间 + /// + public DateTime? EndTime { get; set; } + + + /// + /// 排序方向(ascending/descending) + /// + public string IsAsc { get; set; } + + /// + /// 过滤 + /// + public string Filter { get; set; } + + /// + /// 是否为升序排序 + /// + public bool IsAscending => string.Equals(IsAsc, "ASC", StringComparison.OrdinalIgnoreCase); + + public override string Sorting { get; set; } + + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProCrudAppService.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProCrudAppService.cs new file mode 100644 index 00000000..9b02561b --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProCrudAppService.cs @@ -0,0 +1,48 @@ +using Volo.Abp.Application.Services; + +namespace Lion.AbpPro.Ddd.Application.Contracts +{ + /// + /// CRUD服务基础接口 + /// + /// 实体DTO类型 + /// 主键类型 + public interface IAbpProCrudAppService : ICrudAppService + { + } + + /// + /// CRUD服务接口(带查询输入) + /// + /// 实体DTO类型 + /// 主键类型 + /// 查询输入类型 + public interface IAbpProCrudAppService : ICrudAppService + { + } + + /// + /// CRUD服务接口(带查询输入和创建输入) + /// + /// 实体DTO类型 + /// 主键类型 + /// 查询输入类型 + /// 创建输入类型 + public interface IAbpProCrudAppService : ICrudAppService + { + } + + /// + /// CRUD服务接口(带查询、创建和更新输入) + /// + public interface IAbpProCrudAppService : ICrudAppService + { + } + + /// + /// 完整CRUD服务接口(包含所有操作和批量删除功能) + /// + public interface IAbpProCrudAppService : ICrudAppService, IDeletesAppService + { + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPageTimeInput.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPageTimeInput.cs new file mode 100644 index 00000000..46e53661 --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPageTimeInput.cs @@ -0,0 +1,20 @@ +using Volo.Abp.Application.Dtos; + +namespace Lion.AbpPro.Ddd.Application.Contracts +{ + /// + /// 带时间范围的分页查询请求接口 + /// + public interface IAbpProPageTimeInput: IPagedAndSortedResultRequest + { + /// + /// 查询开始时间 + /// + DateTime? StartTime { get; set; } + + /// + /// 查询结束时间 + /// + DateTime? EndTime { get; set; } + } +} diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPagedInput.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPagedInput.cs new file mode 100644 index 00000000..90aa5758 --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPagedInput.cs @@ -0,0 +1,11 @@ +using Volo.Abp.Application.Dtos; + +namespace Lion.AbpPro.Ddd.Application.Contracts +{ + /// + /// 分页查询请求接口,包含时间范围和排序功能 + /// + public interface IAbpProPagedInput : IAbpProPageTimeInput, IPagedAndSortedResultRequest + { + } +} diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IDeletesAppService.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IDeletesAppService.cs new file mode 100644 index 00000000..8d7de45a --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IDeletesAppService.cs @@ -0,0 +1,19 @@ +using Volo.Abp; +using Volo.Abp.Application.Services; + +namespace Lion.AbpPro.Ddd.Application.Contracts +{ + /// + /// 批量删除服务接口 + /// + /// 主键类型 + public interface IDeletesAppService : IDeleteAppService, IApplicationService, IRemoteService + { + /// + /// 批量删除实体 + /// + /// 要删除的实体ID集合 + /// 删除操作的异步任务 + Task DeleteAsync(IEnumerable ids); + } +} diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion.AbpPro.Ddd.Application.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion.AbpPro.Ddd.Application.csproj new file mode 100644 index 00000000..0f484e60 --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion.AbpPro.Ddd.Application.csproj @@ -0,0 +1,15 @@ + + + + net10.0 + enable + + + + + + + + + + diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProCrudAppService.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProCrudAppService.cs new file mode 100644 index 00000000..841f2ade --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProCrudAppService.cs @@ -0,0 +1,221 @@ +using Lion.AbpPro.Ddd.Application.Contracts; +using Mapster; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; + +namespace Lion.AbpPro.Ddd.Application +{ + /// + /// CRUD应用服务基类 + /// + public abstract class AbpProCrudAppService + : AbpProCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected AbpProCrudAppService(IRepository repository) + : base(repository) + { + } + } + + /// + /// CRUD应用服务基类 + /// + public abstract class AbpProCrudAppService + : AbpProCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected AbpProCrudAppService(IRepository repository) + : base(repository) + { + } + } + + /// + /// CRUD应用服务基类 + /// + public abstract class AbpProCrudAppService + : AbpProCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected AbpProCrudAppService(IRepository repository) + : base(repository) + { + } + } + + /// + /// CRUD应用服务基类 + /// + public abstract class AbpProCrudAppService + : AbpProCrudAppService + where TEntity : class, IEntity + where TEntityDto : IEntityDto + { + protected AbpProCrudAppService(IRepository repository) + : base(repository) + { + } + } + + /// + /// CRUD应用服务基类 + /// + public abstract class AbpProCrudAppService + : CrudAppService + where TEntity : class, IEntity + where TGetOutputDto : IEntityDto + where TGetListOutputDto : IEntityDto + { + protected AbpProCrudAppService(IRepository repository) + : base(repository) + { + } + + /// + /// 更新实体 + /// + /// 实体ID + /// 更新输入 + /// 更新后的实体DTO + // [HttpPost("Update")] + public override async Task UpdateAsync(TKey id, TUpdateInput input) + { + // 检查更新权限 + await CheckUpdatePolicyAsync(); + + // 获取并验证实体 + var entity = await GetEntityByIdAsync(id); + + // 检查更新输入 + await CheckUpdateInputDtoAsync(entity, input); + + // 映射并更新实体 + await MapToEntityAsync(input, entity); + await Repository.UpdateAsync(entity, autoSave: true); + + return await MapToGetOutputDtoAsync(entity); + } + + /// + /// 检查更新输入数据的有效性 + /// + protected virtual Task CheckUpdateInputDtoAsync(TEntity entity, TUpdateInput input) + { + return Task.CompletedTask; + } + + /// + /// 创建实体 + /// + /// 创建输入 + /// 创建后的实体DTO + // [HttpPost("Create")] + public override async Task CreateAsync(TCreateInput input) + { + // 检查创建权限 + await CheckCreatePolicyAsync(); + + // 检查创建输入 + await CheckCreateInputDtoAsync(input); + + // 映射到实体 + var entity = await MapToEntityAsync(input); + + // 设置租户ID + TryToSetTenantId(entity); + + // 插入实体 + await Repository.InsertAsync(entity, autoSave: true); + + return await MapToGetOutputDtoAsync(entity); + } + + /// + /// 检查创建输入数据的有效性 + /// + protected virtual Task CheckCreateInputDtoAsync(TCreateInput input) + { + return Task.CompletedTask; + } + + /// + /// 获取实体列表 + /// + /// 查询输入 + /// 分页结果 + // [HttpPost("Page")] + public override async Task> GetListAsync(TGetListInput input) + { + List entities; + + // 根据输入类型决定查询方式 + if (input is IAbpProPagedInput pagedInput) + { + // 分页查询 + entities = await Repository.GetPagedListAsync( + pagedInput.SkipCount, + pagedInput.MaxResultCount, + pagedInput.Sorting.IsNullOrWhiteSpace() ? string.Empty : pagedInput.Sorting + ); + } + else + { + // 查询全部 + entities = await Repository.GetListAsync(); + } + + // 获取总数并映射结果 + var totalCount = await Repository.GetCountAsync(); + var dtos = await MapToGetListOutputDtosAsync(entities); + + return new PagedResultDto(totalCount, dtos); + } + + /// + /// 批量删除实体 + /// + /// 实体ID集合 + // [HttpPost("BatchDelete")] + public virtual async Task DeleteAsync(IEnumerable ids) + { + await Repository.DeleteManyAsync(ids); + } + + /// + /// 单个删除实体 + /// + // [HttpPost("Delete")] + public override Task DeleteAsync(TKey id) + { + return base.DeleteAsync(id); + } + + protected override TEntity MapToEntity(TCreateInput createInput) + { + return createInput.Adapt(); + } + + + protected override void MapToEntity(TUpdateInput updateInput, TEntity entity) + { + updateInput.Adapt(entity); + } + + protected override TGetOutputDto MapToGetOutputDto(TEntity entity) + { + return entity.Adapt(); + } + + protected override TGetListOutputDto MapToGetListOutputDto(TEntity entity) + { + return entity.Adapt(); + } + + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProDddApplicationModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProDddApplicationModule.cs new file mode 100644 index 00000000..69a3b75e --- /dev/null +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProDddApplicationModule.cs @@ -0,0 +1,24 @@ +using Lion.AbpPro.Ddd.Application.Contracts; +using Volo.Abp; +using Volo.Abp.Application; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Modularity; + +namespace Lion.AbpPro.Ddd.Application; + +[DependsOn( + typeof(AbpDddApplicationModule), + typeof(AbpProDddApplicationContractsModule) +)] +public class AbpProDddApplicationModule : AbpModule +{ + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + // 设置默认每页显示记录数 + LimitedResultRequestDto.DefaultMaxResultCount = 10; + + // 设置最大允许的每页记录数 + LimitedResultRequestDto.MaxMaxResultCount = 10000; + + } +} \ 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 fd36fa55..d158c490 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 @@ -16,6 +16,12 @@ namespace Lion.AbpPro.BasicManagement; )] public class BasicManagementHttpApiHostModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + } + + public override void ConfigureServices(ServiceConfigurationContext context) { context.Services diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Settings/BasicManagementSettingDefinitionProvider.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Settings/BasicManagementSettingDefinitionProvider.cs index 3d4e704f..273baf9a 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Settings/BasicManagementSettingDefinitionProvider.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Settings/BasicManagementSettingDefinitionProvider.cs @@ -16,15 +16,15 @@ public class BasicManagementSettingDefinitionProvider : SettingDefinitionProvide /// private static void OverrideDefaultSettings(ISettingDefinitionContext context) { - // context.Add( - // new SettingDefinition(TimingSettingNames.TimeZone, - // "China Standard Time", - // L("DisplayName:Abp.Timing.Timezone"), - // L("Description:Abp.Timing.Timezone")) - // .WithProperty(BasicManagementSettings.Group.Default, - // BasicManagementSettings.Group.SystemManagement) - // .WithProperty(AbpProSettingConsts.ControlType.Default, - // AbpProSettingConsts.ControlType.TypeText)); + context.Add( + new SettingDefinition(TimingSettingNames.TimeZone, + "China Standard Time", + L("DisplayName:Abp.Timing.Timezone"), + L("Description:Abp.Timing.Timezone")) + .WithProperty(BasicManagementSettings.Group.Default, + BasicManagementSettings.Group.SystemManagement) + .WithProperty(AbpProSettingConsts.ControlType.Default, + AbpProSettingConsts.ControlType.TypeText)); context.GetOrNull(IdentitySettingNames.Password.RequiredLength) .WithProperty(BasicManagementSettings.Group.Default, 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 823da73f..d1b2dc94 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 @@ -22,6 +22,11 @@ namespace Lion.AbpPro.DataDictionaryManagement )] public class DataDictionaryManagementHttpApiHostModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + } + public override void ConfigureServices(ServiceConfigurationContext context) { context.Services 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 d818a764..bcae3d6e 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 @@ -16,6 +16,11 @@ namespace Lion.AbpPro.FileManagement; )] public class FileManagementHttpApiHostModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + } + public override void ConfigureServices(ServiceConfigurationContext context) { context.Services 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 57b67cae..ff2bd9f4 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 @@ -21,6 +21,11 @@ namespace Lion.AbpPro.LanguageManagement )] public class LanguageManagementHttpApiHostModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + } + public override void ConfigureServices(ServiceConfigurationContext context) { context.Services 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 cf2748ea..57c975f8 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 @@ -17,6 +17,11 @@ namespace Lion.AbpPro.NotificationManagement; )] public class NotificationManagementHttpApiHostModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + } + public override void ConfigureServices(ServiceConfigurationContext context) { context.Services diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs index c92bd3c9..84290bb4 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs @@ -21,6 +21,14 @@ namespace Lion.AbpPro; )] public partial class AbpProHttpApiHostModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + // 动态配置 + // PreConfigure(options => + // { + // options.ConventionalControllers.Create(typeof(AbpProApplicationModule).Assembly); + // }); + } public override void ConfigureServices(ServiceConfigurationContext context) { context.Services @@ -41,6 +49,7 @@ public partial class AbpProHttpApiHostModule : AbpModule .AddAbpProExceptions() .AddAbpProConsul() .AddAbpProSwagger("AbpPro"); + context.Services.AddAlwaysAllowAuthorization(); } public override void OnApplicationInitialization(ApplicationInitializationContext context) diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Development.json index cae2d1b0..c60f2025 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Development.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { //"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;" + "Default": "User ID=postgres;Password=1q2w3E*;Host=localhost;Port=5432;Database=LionAbpProDb;" }, "Hangfire": { "Redis": { diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs index 85fa9f49..7334bb1d 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs @@ -1,3 +1,4 @@ +using Lion.AbpPro.Ddd.Application.Contracts; using Lion.AbpPro.FileManagement; namespace Lion.AbpPro @@ -9,7 +10,8 @@ namespace Lion.AbpPro typeof(DataDictionaryManagementApplicationContractsModule), typeof(LanguageManagementApplicationContractsModule), typeof(NotificationManagementApplicationContractsModule), - typeof(FileManagementApplicationContractsModule) + typeof(FileManagementApplicationContractsModule), + typeof(AbpProDddApplicationContractsModule) )] public class AbpProApplicationContractsModule : AbpModule { diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoCreateInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoCreateInput.cs new file mode 100644 index 00000000..0294d01b --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoCreateInput.cs @@ -0,0 +1,10 @@ +namespace Lion.AbpPro.Demo; + +public class DemoCreateInput +{ + + public string Name { get; set; } + + public string Description { get; set; } + +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListInput.cs new file mode 100644 index 00000000..f1a74870 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListInput.cs @@ -0,0 +1,10 @@ +using Lion.AbpPro.Ddd.Application.Contracts; + +namespace Lion.AbpPro.Demo; + +public class DemoGetListInput : AbpProPagedInput +{ + public string Name { get; set; } + + public string Description { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListOutput.cs new file mode 100644 index 00000000..bf648032 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListOutput.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Application.Dtos; + +namespace Lion.AbpPro.Demo; + +public class DemoGetListOutput : EntityDto +{ + public string Name { get; set; } + + public string Description { get; set; } + + public DateTime CreationTime { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetOutput.cs new file mode 100644 index 00000000..caac6fca --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetOutput.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Application.Dtos; + +namespace Lion.AbpPro.Demo; + +public class DemoGetOutput : EntityDto +{ + public Guid Id { get; set; } + + public string Name { get; set; } + + public string Description { get; set; } + + public DateTime CreationTime { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoUpdateInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoUpdateInput.cs new file mode 100644 index 00000000..b7b2727a --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoUpdateInput.cs @@ -0,0 +1,12 @@ +namespace Lion.AbpPro.Demo; + +public class DemoUpdateInput +{ + + public Guid Id { get; set; } + + public string Name { get; set; } + + public string Description { get; set; } + +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/IDemoAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/IDemoAppService.cs new file mode 100644 index 00000000..fd15b223 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/IDemoAppService.cs @@ -0,0 +1,8 @@ +using Lion.AbpPro.Ddd.Application.Contracts; + +namespace Lion.AbpPro.Demo; + +public interface IDemoAppService: IAbpProCrudAppService +{ + +} \ No newline at end of file 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 760a399f..04ad145b 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 @@ -6,6 +6,7 @@ + diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs index 7540b97e..0bc0ff7d 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs @@ -1,3 +1,4 @@ +using Lion.AbpPro.Ddd.Application; using Lion.AbpPro.FileManagement; namespace Lion.AbpPro @@ -10,7 +11,8 @@ namespace Lion.AbpPro typeof(NotificationManagementApplicationModule), typeof(LanguageManagementApplicationModule), typeof(NotificationManagementApplicationModule), - typeof(FileManagementApplicationModule) + typeof(FileManagementApplicationModule), + typeof(AbpProDddApplicationModule) )] public class AbpProApplicationModule : AbpModule { diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/Demo/DemoAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/Demo/DemoAppService.cs new file mode 100644 index 00000000..489e4ef8 --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Application/Demo/DemoAppService.cs @@ -0,0 +1,19 @@ +using Lion.AbpPro.Ddd.Application; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Domain.Repositories; + +namespace Lion.AbpPro.Demo; +//[Route("Demo")] +public class DemoAppService : AbpProCrudAppService< + DemoAggregate, + DemoGetOutput, + DemoGetListOutput, + Guid, + DemoGetListInput, + DemoCreateInput, + DemoUpdateInput>, IDemoAppService +{ + public DemoAppService(IRepository repository) : base(repository) + { + } +} \ 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 2cfb13d2..d43113b1 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 @@ -8,6 +8,7 @@ + diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs index 2df3b245..6f5e1d57 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs @@ -1,11 +1,11 @@ using Volo.Abp.Localization; -using Volo.Abp.Settings; namespace Lion.AbpPro.DbMigrator { [DependsOn( typeof(AbpAutofacModule), - typeof(AbpProEntityFrameworkCoreModule) + typeof(AbpProEntityFrameworkCoreModule), + typeof(AbpProApplicationContractsModule) )] public class AbpProDbMigratorModule : AbpModule { 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 ddee3a80..5ae11a8d 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 @@ -17,6 +17,7 @@ + diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json index 8cd50196..ba4709fc 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { // "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=LionAbpProDemo1000;" + "Default": "User ID=postgres;Password=1q2w3E*;Host=localhost;Port=5432;Database=LionAbpProDb;" } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Demo/DemoAggregate.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Demo/DemoAggregate.cs new file mode 100644 index 00000000..e31ab94a --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Demo/DemoAggregate.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Domain.Entities.Auditing; + +namespace Lion.AbpPro.Demo; + +/// +/// 演示聚合 +/// +public class DemoAggregate : FullAuditedAggregateRoot, IMultiTenant +{ + public Guid? TenantId { get; set; } + + public string Name { get; set; } + + public string Description { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs index 602b6742..a15f3414 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs @@ -1,4 +1,5 @@ using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates; +using Lion.AbpPro.Demo; using Lion.AbpPro.FileManagement.EntityFrameworkCore; using Lion.AbpPro.FileManagement.Files; using Lion.AbpPro.LanguageManagement.EntityFrameworkCore; @@ -42,7 +43,7 @@ namespace Lion.AbpPro.EntityFrameworkCore public DbSet Languages { get; set; } public DbSet LanguageTexts { get; set; } public DbSet FileObjects { get; set; } - + public DbSet Demos { get; set; } public AbpProDbContext(DbContextOptions options) : base(options) { @@ -79,5 +80,7 @@ namespace Lion.AbpPro.EntityFrameworkCore // 文件模块 builder.ConfigureFileManagement(); } + + } } \ No newline at end of file diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContextModelCreatingExtensions.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContextModelCreatingExtensions.cs index 4a7f0862..26fd098a 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContextModelCreatingExtensions.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContextModelCreatingExtensions.cs @@ -1,3 +1,4 @@ +using Lion.AbpPro.Demo; using Volo.Abp.EntityFrameworkCore.Modeling; namespace Lion.AbpPro.EntityFrameworkCore; @@ -7,5 +8,11 @@ public static class AbpProDbContextModelCreatingExtensions public static void ConfigureAbpPro(this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); + + builder.Entity(b => + { + b.ToTable(AbpProDbProperties.DbTablePrefix + "Demos", DataDictionaryManagementDbProperties.DbSchema); + b.ConfigureByConvention(); + }); } } \ No newline at end of file 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 c9bf5901..6e16bce0 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs @@ -6,6 +6,7 @@ namespace Lion.AbpPro.EntityFrameworkCore { public AbpProDbContext CreateDbContext(string[] args) { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); AbpProEfCoreEntityExtensionMappings.Configure(); var configuration = BuildConfiguration(); diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/IAbpProDbContext.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/IAbpProDbContext.cs index c66cab84..09b78bad 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/IAbpProDbContext.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/IAbpProDbContext.cs @@ -1,8 +1,10 @@ +using Lion.AbpPro.Demo; + namespace Lion.AbpPro.EntityFrameworkCore { [ConnectionStringName("Default")] public interface IAbpProDbContext : IEfCoreDbContext { - + DbSet Demos { get; set; } } } 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 deleted file mode 100644 index e69de29b..00000000 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 deleted file mode 100644 index e69de29b..00000000 diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.Designer.cs similarity index 93% rename from aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.Designer.cs rename to aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.Designer.cs index 4ae7ff85..cbac5c0f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.Designer.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.Designer.cs @@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore; namespace Lion.AbpPro.Migrations { [DbContext(typeof(AbpProDbContext))] - [Migration("20251223140343_Init")] - partial class Init + [Migration("20251227022220_1.0.0")] + partial class _100 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -45,7 +45,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -57,7 +57,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("Description") @@ -82,7 +82,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -108,7 +108,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -130,7 +130,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -147,6 +147,68 @@ namespace Lion.AbpPro.Migrations b.ToTable("AbpProDataDictionaryDetails", (string)null); }); + modelBuilder.Entity("Lion.AbpPro.Demo.DemoAggregate", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpProDemos", (string)null); + }); + modelBuilder.Entity("Lion.AbpPro.FileManagement.Files.FileObject", b => { b.Property("Id") @@ -166,7 +228,7 @@ namespace Lion.AbpPro.Migrations .HasComment("文件名称"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -178,7 +240,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") @@ -203,7 +265,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -234,7 +296,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -252,7 +314,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") @@ -267,7 +329,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -316,7 +378,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -334,7 +396,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") @@ -366,7 +428,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("boolean"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -408,7 +470,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("character varying(1024)"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -420,7 +482,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") @@ -435,7 +497,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -452,7 +514,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("ReceiveUserId") .HasColumnType("uuid"); @@ -496,7 +558,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -508,7 +570,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("ExtraProperties") @@ -523,7 +585,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -537,7 +599,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("boolean"); b.Property("ReadTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("ReceiveUserId") .HasColumnType("uuid"); @@ -614,7 +676,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("ExtraProperties") .IsRequired() @@ -694,7 +756,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ExecutionDuration"); b.Property("ExecutionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("ExecutionTime"); b.Property("ExtraProperties") @@ -735,7 +797,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -766,7 +828,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("AuditLogId"); b.Property("ChangeTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("ChangeTime"); b.Property("ChangeType") @@ -862,7 +924,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("ExtraProperties") @@ -886,10 +948,10 @@ namespace Lion.AbpPro.Migrations .HasColumnType("character varying(128)"); b.Property("LastTryTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("NextTryTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("Priority") .ValueGeneratedOnAdd() @@ -1039,7 +1101,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("Description") @@ -1116,7 +1178,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("EntityVersion") @@ -1225,7 +1287,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("character varying(64)"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("ExtraProperties") .IsRequired() @@ -1291,7 +1353,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("character varying(2048)"); b.Property("LastAccessed") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("SessionId") .IsRequired() @@ -1299,7 +1361,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("character varying(128)"); b.Property("SignedIn") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("TenantId") .HasColumnType("uuid") @@ -1338,7 +1400,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -1350,7 +1412,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("Email") @@ -1390,7 +1452,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsExternal"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -1519,13 +1581,13 @@ namespace Lion.AbpPro.Migrations .HasColumnType("uuid"); b.Property("EndTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("SourceUserId") .HasColumnType("uuid"); b.Property("StartTime") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("TargetUserId") .HasColumnType("uuid"); @@ -1577,7 +1639,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -1658,7 +1720,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -1670,7 +1732,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("DisplayName") @@ -1694,7 +1756,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") @@ -1726,7 +1788,7 @@ namespace Lion.AbpPro.Migrations .HasColumnType("uuid"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -1947,7 +2009,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("CreationTime"); b.Property("CreatorId") @@ -1959,7 +2021,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("DeleterId"); b.Property("DeletionTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("DeletionTime"); b.Property("EntityVersion") @@ -1977,7 +2039,7 @@ namespace Lion.AbpPro.Migrations .HasColumnName("IsDeleted"); b.Property("LastModificationTime") - .HasColumnType("timestamp with time zone") + .HasColumnType("timestamp without time zone") .HasColumnName("LastModificationTime"); b.Property("LastModifierId") diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.cs similarity index 94% rename from aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.cs rename to aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.cs index a968d5d9..ad33a91f 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace Lion.AbpPro.Migrations { /// - public partial class Init : Migration + public partial class _100 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -18,7 +18,7 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => @@ -40,7 +40,7 @@ namespace Lion.AbpPro.Migrations 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), + ExecutionTime = table.Column(type: "timestamp without 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), @@ -69,9 +69,9 @@ namespace Lion.AbpPro.Migrations 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: "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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), + NextTryTime = table.Column(type: "timestamp without time zone", nullable: false), + LastTryTime = table.Column(type: "timestamp without 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), @@ -94,7 +94,7 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), ExtraProperties = table.Column(type: "text", nullable: false), ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, @@ -181,13 +181,13 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -259,19 +259,42 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpProDataDictionaries", x => x.Id); }); + migrationBuilder.CreateTable( + name: "AbpProDemos", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + TenantId = table.Column(type: "uuid", nullable: true), + Name = table.Column(type: "text", nullable: true), + Description = table.Column(type: "text", 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 without time zone", nullable: false), + CreatorId = table.Column(type: "uuid", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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 without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpProDemos", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AbpProFileObjects", columns: table => new @@ -283,13 +306,13 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -310,13 +333,13 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -335,13 +358,13 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -363,16 +386,16 @@ namespace Lion.AbpPro.Migrations 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), + ReadTime = table.Column(type: "timestamp without 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -389,16 +412,16 @@ namespace Lion.AbpPro.Migrations 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), + ReadTime = table.Column(type: "timestamp without 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -417,7 +440,7 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), ExtraProperties = table.Column(type: "text", nullable: false), ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, @@ -442,7 +465,7 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), ExtraProperties = table.Column(type: "text", nullable: false), ConcurrencyStamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: false) }, @@ -463,8 +486,8 @@ namespace Lion.AbpPro.Migrations 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), + SignedIn = table.Column(type: "timestamp without time zone", nullable: false), + LastAccessed = table.Column(type: "timestamp without time zone", nullable: true), ExtraProperties = table.Column(type: "text", nullable: true) }, constraints: table => @@ -517,13 +540,13 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -538,8 +561,8 @@ namespace Lion.AbpPro.Migrations 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) + StartTime = table.Column(type: "timestamp without time zone", nullable: false), + EndTime = table.Column(type: "timestamp without time zone", nullable: false) }, constraints: table => { @@ -574,13 +597,13 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without 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) + DeletionTime = table.Column(type: "timestamp without time zone", nullable: true) }, constraints: table => { @@ -597,7 +620,7 @@ namespace Lion.AbpPro.Migrations 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), + ExecutionTime = table.Column(type: "timestamp without time zone", nullable: false), ExecutionDuration = table.Column(type: "integer", nullable: false), ExtraProperties = table.Column(type: "text", nullable: true) }, @@ -619,7 +642,7 @@ namespace Lion.AbpPro.Migrations 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), + ChangeTime = table.Column(type: "timestamp without 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), @@ -648,9 +671,9 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true), - LastModificationTime = table.Column(type: "timestamp with time zone", nullable: true), + LastModificationTime = table.Column(type: "timestamp without time zone", nullable: true), LastModifierId = table.Column(type: "uuid", nullable: true) }, constraints: table => @@ -671,7 +694,7 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => @@ -780,7 +803,7 @@ namespace Lion.AbpPro.Migrations 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), + CreationTime = table.Column(type: "timestamp without time zone", nullable: false), CreatorId = table.Column(type: "uuid", nullable: true) }, constraints: table => @@ -1159,6 +1182,9 @@ namespace Lion.AbpPro.Migrations migrationBuilder.DropTable( name: "AbpProDataDictionaryDetails"); + migrationBuilder.DropTable( + name: "AbpProDemos"); + migrationBuilder.DropTable( name: "AbpProFileObjects"); 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 e69de29b..e6aea520 100644 --- a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs +++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs @@ -0,0 +1,2265 @@ +// +using System; +using Lion.AbpPro.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Volo.Abp.EntityFrameworkCore; + +#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("_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("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpProDataDictionaries", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DataDictionaryId") + .HasColumnType("uuid"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("DisplayText") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Order") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("DataDictionaryId"); + + b.ToTable("AbpProDataDictionaryDetails", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.Demo.DemoAggregate", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpProDemos", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.FileManagement.Files.FileObject", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContentType") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("文件名称"); + + b.Property("FileSize") + .HasColumnType("bigint") + .HasComment("文件大小"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasComment("名称"); + + b.Property("ResourceName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("资源名称"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(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("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("语言名称"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("显示名称"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("FlagIcon") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasComment("图标"); + + b.Property("IsDefault") + .HasColumnType("boolean"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UiCultureName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(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("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MessageLevel") + .HasColumnType("integer"); + + b.Property("MessageType") + .HasColumnType("integer"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SenderUserId") + .HasColumnType("uuid"); + + b.Property("SenderUserName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.ToTable("AbpProNotifications", (string)null); + }); + + modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NotificationId") + .HasColumnType("uuid"); + + b.Property("Read") + .HasColumnType("boolean"); + + b.Property("ReadTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ReceiveUserId") + .HasColumnType("uuid"); + + b.Property("ReceiveUserName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(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("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FileName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("FileName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpAuditLogExcelFiles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .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("uuid"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("character varying(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("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(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("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + 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("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(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("uuid"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("LastAccessed") + .HasColumnType("timestamp without time zone"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("SignedIn") + .HasColumnType("timestamp without time zone"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + 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("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("timestamp with time zone"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("boolean"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(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("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EndTime") + .HasColumnType("timestamp without time zone"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("StartTime") + .HasColumnType("timestamp without time zone"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("IsEnabled") + .HasColumnType("boolean"); + + b.Property("MultiTenancySide") + .HasColumnType("smallint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("character varying(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("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .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("uuid"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(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("uuid"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("boolean"); + + b.Property("IsInherited") + .HasColumnType("boolean"); + + b.Property("IsVisibleToClients") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("EntityVersion") + .HasColumnType("integer"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(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("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(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.HttpApi/Controllers/DemoController.cs b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/DemoController.cs new file mode 100644 index 00000000..b55d14cc --- /dev/null +++ b/aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/DemoController.cs @@ -0,0 +1,44 @@ +using Lion.AbpPro.Demo; +using Volo.Abp.Application.Dtos; + +namespace Lion.AbpPro.Controllers; + +public class DemoController : AbpProController,IDemoAppService +{ + private readonly IDemoAppService _demoAppService; + + public DemoController(IDemoAppService demoAppService) + { + _demoAppService = demoAppService; + } + + public async Task GetAsync(Guid id) + { + return await _demoAppService.GetAsync(id); + } + + public async Task> GetListAsync(DemoGetListInput input) + { + return await _demoAppService.GetListAsync(input); + } + + public async Task CreateAsync(DemoCreateInput input) + { + return await _demoAppService.CreateAsync(input); + } + + public async Task UpdateAsync(Guid id, DemoUpdateInput input) + { + return await _demoAppService.UpdateAsync(id,input); + } + + public async Task DeleteAsync(Guid id) + { + await _demoAppService.DeleteAsync(id); + } + + public async Task DeleteAsync(IEnumerable ids) + { + await _demoAppService.DeleteAsync(ids); + } +} \ No newline at end of file diff --git a/templates/pro-nuget/service/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameMigrationsDbContextFactory.cs b/templates/pro-nuget/service/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameMigrationsDbContextFactory.cs index 318e80fc..9d07edfa 100644 --- a/templates/pro-nuget/service/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameMigrationsDbContextFactory.cs +++ b/templates/pro-nuget/service/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameMigrationsDbContextFactory.cs @@ -6,6 +6,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore { public MyProjectNameDbContext CreateDbContext(string[] args) { + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); MyProjectNameEfCoreEntityExtensionMappings.Configure(); var configuration = BuildConfiguration();