Browse Source

feat: 添加快速curd操作

main-10.0.0
wangjunzzz 3 months ago
parent
commit
9f8e1eddcc
  1. 19
      aspnet-core/Lion.AbpPro.sln
  2. 8
      aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
  3. 13
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion.AbpPro.Ddd.Application.Contracts.csproj
  4. 10
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProDddApplicationContractsModule.cs
  5. 53
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/AbpProPagedInput.cs
  6. 48
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProCrudAppService.cs
  7. 20
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPageTimeInput.cs
  8. 11
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IAbpProPagedInput.cs
  9. 19
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion/AbpPro/Ddd/Application/Contracts/IDeletesAppService.cs
  10. 15
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion.AbpPro.Ddd.Application.csproj
  11. 221
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProCrudAppService.cs
  12. 24
      aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion/AbpPro/Ddd/Application/AbpProDddApplicationModule.cs
  13. 6
      aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs
  14. 18
      aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Settings/BasicManagementSettingDefinitionProvider.cs
  15. 5
      aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs
  16. 5
      aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs
  17. 5
      aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs
  18. 5
      aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
  19. 9
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs
  20. 2
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Development.json
  21. 4
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/AbpProApplicationContractsModule.cs
  22. 10
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoCreateInput.cs
  23. 10
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListInput.cs
  24. 12
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetListOutput.cs
  25. 14
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoGetOutput.cs
  26. 12
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/DemoUpdateInput.cs
  27. 8
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Demo/IDemoAppService.cs
  28. 1
      aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Lion.AbpPro.Application.Contracts.csproj
  29. 4
      aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationModule.cs
  30. 19
      aspnet-core/services/src/Lion.AbpPro.Application/Demo/DemoAppService.cs
  31. 1
      aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj
  32. 4
      aspnet-core/services/src/Lion.AbpPro.DbMigrator/AbpProDbMigratorModule.cs
  33. 1
      aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj
  34. 2
      aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json
  35. 15
      aspnet-core/services/src/Lion.AbpPro.Domain/Demo/DemoAggregate.cs
  36. 5
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContext.cs
  37. 7
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProDbContextModelCreatingExtensions.cs
  38. 1
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/AbpProMigrationsDbContextFactory.cs
  39. 4
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/IAbpProDbContext.cs
  40. 0
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.Designer.cs
  41. 0
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.cs
  42. 160
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.Designer.cs
  43. 122
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251227022220_1.0.0.cs
  44. 2265
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs
  45. 44
      aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/DemoController.cs
  46. 1
      templates/pro-nuget/service/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameMigrationsDbContextFactory.cs

19
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}

8
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<IOptions<AbpProAntiForgeryOptions>>().Value;
if (antiForgeryOptions.Enabled)
{
service.Configure<AbpAntiForgeryOptions>(options => { options.AutoValidate = antiForgeryOptions.Enabled; });
}
service.Configure<AbpAntiForgeryOptions>(options => { options.AutoValidate = antiForgeryOptions.Enabled; });
return service;
}

13
aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application.Contracts/Lion.AbpPro.Ddd.Application.Contracts.csproj

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace/>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts"/>
</ItemGroup>
</Project>

10
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
{
}

53
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
{
/// <summary>
/// 分页查询请求DTO,包含时间范围和自定义排序功能
/// </summary>
public class AbpProPagedInput : PagedAndSortedResultRequestDto, IAbpProPagedInput
{
/// <summary>
/// 当前页面.默认从1开始
/// </summary>
public int PageIndex { get; set; } = 1;
/// <summary>
/// 每页多少条.每页显示多少记录
/// </summary>
public int PageSize { get; set; } = 10;
public override int SkipCount => (PageIndex - 1) * PageSize;
public override int MaxResultCount => PageSize;
/// <summary>
/// 查询开始时间
/// </summary>
public DateTime? StartTime { get; set; }
/// <summary>
/// 查询结束时间
/// </summary>
public DateTime? EndTime { get; set; }
/// <summary>
/// 排序方向(ascending/descending)
/// </summary>
public string IsAsc { get; set; }
/// <summary>
/// 过滤
/// </summary>
public string Filter { get; set; }
/// <summary>
/// 是否为升序排序
/// </summary>
public bool IsAscending => string.Equals(IsAsc, "ASC", StringComparison.OrdinalIgnoreCase);
public override string Sorting { get; set; }
}
}

48
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
{
/// <summary>
/// CRUD服务基础接口
/// </summary>
/// <typeparam name="TEntityDto">实体DTO类型</typeparam>
/// <typeparam name="TKey">主键类型</typeparam>
public interface IAbpProCrudAppService<TEntityDto, in TKey> : ICrudAppService<TEntityDto, TKey>
{
}
/// <summary>
/// CRUD服务接口(带查询输入)
/// </summary>
/// <typeparam name="TEntityDto">实体DTO类型</typeparam>
/// <typeparam name="TKey">主键类型</typeparam>
/// <typeparam name="TGetListInput">查询输入类型</typeparam>
public interface IAbpProCrudAppService<TEntityDto, in TKey, in TGetListInput> : ICrudAppService<TEntityDto, TKey, TGetListInput>
{
}
/// <summary>
/// CRUD服务接口(带查询输入和创建输入)
/// </summary>
/// <typeparam name="TEntityDto">实体DTO类型</typeparam>
/// <typeparam name="TKey">主键类型</typeparam>
/// <typeparam name="TGetListInput">查询输入类型</typeparam>
/// <typeparam name="TCreateInput">创建输入类型</typeparam>
public interface IAbpProCrudAppService<TEntityDto, in TKey, in TGetListInput, in TCreateInput> : ICrudAppService<TEntityDto, TKey, TGetListInput, TCreateInput>
{
}
/// <summary>
/// CRUD服务接口(带查询、创建和更新输入)
/// </summary>
public interface IAbpProCrudAppService<TEntityDto, in TKey, in TGetListInput, in TCreateInput, in TUpdateInput> : ICrudAppService<TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
{
}
/// <summary>
/// 完整CRUD服务接口(包含所有操作和批量删除功能)
/// </summary>
public interface IAbpProCrudAppService<TGetOutputDto, TGetListOutputDto, in TKey, in TGetListInput, in TCreateInput, in TUpdateInput> : ICrudAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>, IDeletesAppService<TKey>
{
}
}

20
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
{
/// <summary>
/// 带时间范围的分页查询请求接口
/// </summary>
public interface IAbpProPageTimeInput: IPagedAndSortedResultRequest
{
/// <summary>
/// 查询开始时间
/// </summary>
DateTime? StartTime { get; set; }
/// <summary>
/// 查询结束时间
/// </summary>
DateTime? EndTime { get; set; }
}
}

11
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
{
/// <summary>
/// 分页查询请求接口,包含时间范围和排序功能
/// </summary>
public interface IAbpProPagedInput : IAbpProPageTimeInput, IPagedAndSortedResultRequest
{
}
}

19
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
{
/// <summary>
/// 批量删除服务接口
/// </summary>
/// <typeparam name="TKey">主键类型</typeparam>
public interface IDeletesAppService<in TKey> : IDeleteAppService<TKey>, IApplicationService, IRemoteService
{
/// <summary>
/// 批量删除实体
/// </summary>
/// <param name="ids">要删除的实体ID集合</param>
/// <returns>删除操作的异步任务</returns>
Task DeleteAsync(IEnumerable<TKey> ids);
}
}

15
aspnet-core/frameworks/src/Lion.AbpPro.Ddd.Application/Lion.AbpPro.Ddd.Application.csproj

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace/>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application"/>
<PackageReference Include="Mapster"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lion.AbpPro.Ddd.Application.Contracts\Lion.AbpPro.Ddd.Application.Contracts.csproj" />
</ItemGroup>
</Project>

221
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
{
/// <summary>
/// CRUD应用服务基类
/// </summary>
public abstract class AbpProCrudAppService<TEntity, TEntityDto, TKey>
: AbpProCrudAppService<TEntity, TEntityDto, TKey, PagedAndSortedResultRequestDto>
where TEntity : class, IEntity<TKey>
where TEntityDto : IEntityDto<TKey>
{
protected AbpProCrudAppService(IRepository<TEntity, TKey> repository)
: base(repository)
{
}
}
/// <summary>
/// CRUD应用服务基类
/// </summary>
public abstract class AbpProCrudAppService<TEntity, TEntityDto, TKey, TGetListInput>
: AbpProCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TEntityDto>
where TEntity : class, IEntity<TKey>
where TEntityDto : IEntityDto<TKey>
{
protected AbpProCrudAppService(IRepository<TEntity, TKey> repository)
: base(repository)
{
}
}
/// <summary>
/// CRUD应用服务基类
/// </summary>
public abstract class AbpProCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput>
: AbpProCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput, TCreateInput>
where TEntity : class, IEntity<TKey>
where TEntityDto : IEntityDto<TKey>
{
protected AbpProCrudAppService(IRepository<TEntity, TKey> repository)
: base(repository)
{
}
}
/// <summary>
/// CRUD应用服务基类
/// </summary>
public abstract class AbpProCrudAppService<TEntity, TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
: AbpProCrudAppService<TEntity, TEntityDto, TEntityDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
where TEntity : class, IEntity<TKey>
where TEntityDto : IEntityDto<TKey>
{
protected AbpProCrudAppService(IRepository<TEntity, TKey> repository)
: base(repository)
{
}
}
/// <summary>
/// CRUD应用服务基类
/// </summary>
public abstract class AbpProCrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
: CrudAppService<TEntity, TGetOutputDto, TGetListOutputDto, TKey, TGetListInput, TCreateInput, TUpdateInput>
where TEntity : class, IEntity<TKey>
where TGetOutputDto : IEntityDto<TKey>
where TGetListOutputDto : IEntityDto<TKey>
{
protected AbpProCrudAppService(IRepository<TEntity, TKey> repository)
: base(repository)
{
}
/// <summary>
/// 更新实体
/// </summary>
/// <param name="id">实体ID</param>
/// <param name="input">更新输入</param>
/// <returns>更新后的实体DTO</returns>
// [HttpPost("Update")]
public override async Task<TGetOutputDto> 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);
}
/// <summary>
/// 检查更新输入数据的有效性
/// </summary>
protected virtual Task CheckUpdateInputDtoAsync(TEntity entity, TUpdateInput input)
{
return Task.CompletedTask;
}
/// <summary>
/// 创建实体
/// </summary>
/// <param name="input">创建输入</param>
/// <returns>创建后的实体DTO</returns>
// [HttpPost("Create")]
public override async Task<TGetOutputDto> 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);
}
/// <summary>
/// 检查创建输入数据的有效性
/// </summary>
protected virtual Task CheckCreateInputDtoAsync(TCreateInput input)
{
return Task.CompletedTask;
}
/// <summary>
/// 获取实体列表
/// </summary>
/// <param name="input">查询输入</param>
/// <returns>分页结果</returns>
// [HttpPost("Page")]
public override async Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input)
{
List<TEntity> 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<TGetListOutputDto>(totalCount, dtos);
}
/// <summary>
/// 批量删除实体
/// </summary>
/// <param name="ids">实体ID集合</param>
// [HttpPost("BatchDelete")]
public virtual async Task DeleteAsync(IEnumerable<TKey> ids)
{
await Repository.DeleteManyAsync(ids);
}
/// <summary>
/// 单个删除实体
/// </summary>
// [HttpPost("Delete")]
public override Task DeleteAsync(TKey id)
{
return base.DeleteAsync(id);
}
protected override TEntity MapToEntity(TCreateInput createInput)
{
return createInput.Adapt<TEntity>();
}
protected override void MapToEntity(TUpdateInput updateInput, TEntity entity)
{
updateInput.Adapt(entity);
}
protected override TGetOutputDto MapToGetOutputDto(TEntity entity)
{
return entity.Adapt<TGetOutputDto>();
}
protected override TGetListOutputDto MapToGetListOutputDto(TEntity entity)
{
return entity.Adapt<TGetListOutputDto>();
}
}
}

24
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;
}
}

6
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

18
aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Settings/BasicManagementSettingDefinitionProvider.cs

@ -16,15 +16,15 @@ public class BasicManagementSettingDefinitionProvider : SettingDefinitionProvide
/// </summary>
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,

5
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

5
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

5
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

5
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

9
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<AbpAspNetCoreMvcOptions>(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)

2
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": {

4
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
{

10
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; }
}

10
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; }
}

12
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<Guid>
{
public string Name { get; set; }
public string Description { get; set; }
public DateTime CreationTime { get; set; }
}

14
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<Guid>
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public DateTime CreationTime { get; set; }
}

12
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; }
}

8
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<DemoGetOutput,DemoGetListOutput,Guid,DemoGetListInput,DemoCreateInput,DemoUpdateInput>
{
}

1
aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Lion.AbpPro.Application.Contracts.csproj

@ -6,6 +6,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\frameworks\src\Lion.AbpPro.Ddd.Application.Contracts\Lion.AbpPro.Ddd.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\frameworks\src\Lion.AbpPro.Hangfire\Lion.AbpPro.Hangfire.csproj" />
<ProjectReference Include="..\..\..\modules\BasicManagement\src\Lion.AbpPro.BasicManagement.Application.Contracts\Lion.AbpPro.BasicManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\modules\DataDictionaryManagement\src\Lion.AbpPro.DataDictionaryManagement.Application.Contracts\Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj" />

4
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
{

19
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<DemoAggregate, Guid> repository) : base(repository)
{
}
}

1
aspnet-core/services/src/Lion.AbpPro.Application/Lion.AbpPro.Application.csproj

@ -8,6 +8,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\frameworks\src\Lion.AbpPro.Ddd.Application\Lion.AbpPro.Ddd.Application.csproj" />
<ProjectReference Include="..\..\..\modules\BasicManagement\src\Lion.AbpPro.BasicManagement.Application\Lion.AbpPro.BasicManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\DataDictionaryManagement\src\Lion.AbpPro.DataDictionaryManagement.Application\Lion.AbpPro.DataDictionaryManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\FileManagement\src\Lion.AbpPro.FileManagement.Application\Lion.AbpPro.FileManagement.Application.csproj" />

4
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
{

1
aspnet-core/services/src/Lion.AbpPro.DbMigrator/Lion.AbpPro.DbMigrator.csproj

@ -17,6 +17,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lion.AbpPro.Application.Contracts\Lion.AbpPro.Application.Contracts.csproj" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore\Lion.AbpPro.EntityFrameworkCore.csproj" />
</ItemGroup>

2
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;"
}
}

15
aspnet-core/services/src/Lion.AbpPro.Domain/Demo/DemoAggregate.cs

@ -0,0 +1,15 @@
using Volo.Abp.Domain.Entities.Auditing;
namespace Lion.AbpPro.Demo;
/// <summary>
/// 演示聚合
/// </summary>
public class DemoAggregate : FullAuditedAggregateRoot<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}

5
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<Language> Languages { get; set; }
public DbSet<LanguageText> LanguageTexts { get; set; }
public DbSet<FileObject> FileObjects { get; set; }
public DbSet<DemoAggregate> Demos { get; set; }
public AbpProDbContext(DbContextOptions<AbpProDbContext> options)
: base(options)
{
@ -79,5 +80,7 @@ namespace Lion.AbpPro.EntityFrameworkCore
// 文件模块
builder.ConfigureFileManagement();
}
}
}

7
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<DemoAggregate>(b =>
{
b.ToTable(AbpProDbProperties.DbTablePrefix + "Demos", DataDictionaryManagementDbProperties.DbSchema);
b.ConfigureByConvention();
});
}
}

1
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();

4
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<DemoAggregate> Demos { get; set; }
}
}

0
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.Designer.cs

0
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.cs

160
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.Designer.cs → 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
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -45,7 +45,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -57,7 +57,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
@ -82,7 +82,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -108,7 +108,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("character varying(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -130,7 +130,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -147,6 +147,68 @@ namespace Lion.AbpPro.Migrations
b.ToTable("AbpProDataDictionaryDetails", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.Demo.DemoAggregate", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.ToTable("AbpProDemos", (string)null);
});
modelBuilder.Entity("Lion.AbpPro.FileManagement.Files.FileObject", b =>
{
b.Property<Guid>("Id")
@ -166,7 +228,7 @@ namespace Lion.AbpPro.Migrations
.HasComment("文件名称");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -178,7 +240,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
@ -203,7 +265,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -234,7 +296,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -252,7 +314,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
@ -267,7 +329,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -316,7 +378,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -334,7 +396,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("DisplayName")
@ -366,7 +428,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -408,7 +470,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("character varying(1024)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -420,7 +482,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
@ -435,7 +497,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -452,7 +514,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("boolean");
b.Property<DateTime?>("ReadTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<Guid?>("ReceiveUserId")
.HasColumnType("uuid");
@ -496,7 +558,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -508,7 +570,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
@ -523,7 +585,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -537,7 +599,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("boolean");
b.Property<DateTime>("ReadTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<Guid>("ReceiveUserId")
.HasColumnType("uuid");
@ -614,7 +676,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<string>("ExtraProperties")
.IsRequired()
@ -694,7 +756,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
@ -735,7 +797,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("uuid");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -766,7 +828,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
@ -862,7 +924,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<string>("ExtraProperties")
@ -886,10 +948,10 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("character varying(128)");
b.Property<DateTime?>("LastTryTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<DateTime>("NextTryTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
@ -1039,7 +1101,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<string>("Description")
@ -1116,7 +1178,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<int>("EntityVersion")
@ -1225,7 +1287,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("character varying(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<string>("ExtraProperties")
.IsRequired()
@ -1291,7 +1353,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("character varying(2048)");
b.Property<DateTime?>("LastAccessed")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<string>("SessionId")
.IsRequired()
@ -1299,7 +1361,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("character varying(128)");
b.Property<DateTime>("SignedIn")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
@ -1338,7 +1400,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -1350,7 +1412,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Email")
@ -1390,7 +1452,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsExternal");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -1519,13 +1581,13 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("uuid");
b.Property<DateTime>("EndTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<Guid>("SourceUserId")
.HasColumnType("uuid");
b.Property<DateTime>("StartTime")
.HasColumnType("timestamp with time zone");
.HasColumnType("timestamp without time zone");
b.Property<Guid>("TargetUserId")
.HasColumnType("uuid");
@ -1577,7 +1639,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("uuid");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -1658,7 +1720,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -1670,7 +1732,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<string>("DisplayName")
@ -1694,7 +1756,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
@ -1726,7 +1788,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnType("uuid");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -1947,7 +2009,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
@ -1959,7 +2021,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("DeletionTime");
b.Property<int>("EntityVersion")
@ -1977,7 +2039,7 @@ namespace Lion.AbpPro.Migrations
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnType("timestamp without time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")

122
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223140343_Init.cs → 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
{
/// <inheritdoc />
public partial class Init : Migration
public partial class _100 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
@ -18,7 +18,7 @@ namespace Lion.AbpPro.Migrations
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
FileName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
@ -40,7 +40,7 @@ namespace Lion.AbpPro.Migrations
ImpersonatorUserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
ImpersonatorTenantId = table.Column<Guid>(type: "uuid", nullable: true),
ImpersonatorTenantName = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ExecutionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ExecutionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
ExecutionDuration = table.Column<int>(type: "integer", nullable: false),
ClientIpAddress = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ClientName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
@ -69,9 +69,9 @@ namespace Lion.AbpPro.Migrations
JobName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
JobArgs = table.Column<string>(type: "character varying(1048576)", maxLength: 1048576, nullable: false),
TryCount = table.Column<short>(type: "smallint", nullable: false, defaultValue: (short)0),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
NextTryTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
LastTryTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
NextTryTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
LastTryTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
IsAbandoned = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
Priority = table.Column<byte>(type: "smallint", nullable: false, defaultValue: (byte)15),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
@ -94,7 +94,7 @@ namespace Lion.AbpPro.Migrations
RegexDescription = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Description = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
ValueType = table.Column<int>(type: "integer", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false)
},
@ -181,13 +181,13 @@ namespace Lion.AbpPro.Migrations
EntityVersion = table.Column<int>(type: "integer", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -259,19 +259,42 @@ namespace Lion.AbpPro.Migrations
Description = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(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<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Name = table.Column<string>(type: "text", nullable: true),
Description = table.Column<string>(type: "text", nullable: true),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(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<string>(type: "character varying(128)", maxLength: 128, nullable: false, comment: "文件名称"),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -310,13 +333,13 @@ namespace Lion.AbpPro.Migrations
IsDefault = table.Column<bool>(type: "boolean", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -335,13 +358,13 @@ namespace Lion.AbpPro.Migrations
Value = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false, comment: "值"),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -363,16 +386,16 @@ namespace Lion.AbpPro.Migrations
ReceiveUserId = table.Column<Guid>(type: "uuid", nullable: true),
ReceiveUserName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Read = table.Column<bool>(type: "boolean", nullable: false),
ReadTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
ReadTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -389,16 +412,16 @@ namespace Lion.AbpPro.Migrations
ReceiveUserId = table.Column<Guid>(type: "uuid", nullable: false),
ReceiveUserName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Read = table.Column<bool>(type: "boolean", nullable: false),
ReadTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ReadTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -417,7 +440,7 @@ namespace Lion.AbpPro.Migrations
IsStatic = table.Column<bool>(type: "boolean", nullable: false),
IsPublic = table.Column<bool>(type: "boolean", nullable: false),
EntityVersion = table.Column<int>(type: "integer", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false)
},
@ -442,7 +465,7 @@ namespace Lion.AbpPro.Migrations
CorrelationId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ClientIpAddress = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false)
},
@ -463,8 +486,8 @@ namespace Lion.AbpPro.Migrations
UserId = table.Column<Guid>(type: "uuid", nullable: false),
ClientId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
IpAddresses = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: true),
SignedIn = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
LastAccessed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
SignedIn = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
LastAccessed = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
ExtraProperties = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
@ -517,13 +540,13 @@ namespace Lion.AbpPro.Migrations
EntityVersion = table.Column<int>(type: "integer", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -538,8 +561,8 @@ namespace Lion.AbpPro.Migrations
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
SourceUserId = table.Column<Guid>(type: "uuid", nullable: false),
TargetUserId = table.Column<Guid>(type: "uuid", nullable: false),
StartTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
EndTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
StartTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
EndTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false)
},
constraints: table =>
{
@ -574,13 +597,13 @@ namespace Lion.AbpPro.Migrations
LastPasswordChangeTime = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
ExtraProperties = table.Column<string>(type: "text", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
DeletionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
},
constraints: table =>
{
@ -597,7 +620,7 @@ namespace Lion.AbpPro.Migrations
ServiceName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
MethodName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Parameters = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ExecutionTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
ExecutionDuration = table.Column<int>(type: "integer", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true)
},
@ -619,7 +642,7 @@ namespace Lion.AbpPro.Migrations
Id = table.Column<Guid>(type: "uuid", nullable: false),
AuditLogId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
ChangeTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ChangeTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
ChangeType = table.Column<byte>(type: "smallint", nullable: false),
EntityTenantId = table.Column<Guid>(type: "uuid", nullable: true),
EntityId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
@ -648,9 +671,9 @@ namespace Lion.AbpPro.Migrations
DisplayText = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
Description = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true),
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
@ -671,7 +694,7 @@ namespace Lion.AbpPro.Migrations
RoleId = table.Column<Guid>(type: "uuid", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
@ -780,7 +803,7 @@ namespace Lion.AbpPro.Migrations
UserId = table.Column<Guid>(type: "uuid", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(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");

2265
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs

File diff suppressed because it is too large

44
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<DemoGetOutput> GetAsync(Guid id)
{
return await _demoAppService.GetAsync(id);
}
public async Task<PagedResultDto<DemoGetListOutput>> GetListAsync(DemoGetListInput input)
{
return await _demoAppService.GetListAsync(input);
}
public async Task<DemoGetOutput> CreateAsync(DemoCreateInput input)
{
return await _demoAppService.CreateAsync(input);
}
public async Task<DemoGetOutput> 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<Guid> ids)
{
await _demoAppService.DeleteAsync(ids);
}
}

1
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();

Loading…
Cancel
Save