Browse Source

feat(elsa): migrate workflow runtime to Elsa 3

Upgrade the workflow hosts and ElsaNext modules to Elsa 3, add the WorkflowService EF Core/DbMigrator projects, and align studio, localization and runtime configuration.
pull/1568/head
colin 4 weeks ago
parent
commit
70befbe803
  1. 9
      Directory.Packages.props
  2. 15
      aspnet-core/LINGYUN.MicroService.Aspire.slnx
  3. 22
      aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/AppHost.cs
  4. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/LINGYUN.Abp.MicroService.AppHost.csproj
  5. 9
      aspnet-core/aspire/LINGYUN.Abp.MicroService.AuthServer/wwwroot/css/global-styles.css
  6. 42
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator.csproj
  7. 42
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/Program.cs
  8. 49
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/WorkflowServiceDbMigratorHostedService.cs
  9. 12
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/WorkflowServiceDbMigratorModule.cs
  10. 5
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/appsettings.json
  11. 3
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/FodyWeavers.xml
  12. 30
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/FodyWeavers.xsd
  13. 30
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore.csproj
  14. 945
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261021033203_Initial.Designer.cs
  15. 462
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261021033203_Initial.cs
  16. 945
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261022114808_MergeOrganizationUnitsIntoApprovalFlow.Designer.cs
  17. 474
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261022114808_MergeOrganizationUnitsIntoApprovalFlow.cs
  18. 942
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/WorkflowServiceMigrationsDbContextModelSnapshot.cs
  19. 27
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceDbMigrationService.cs
  20. 52
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceMigrationsDbContext.cs
  21. 28
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceMigrationsDbContextFactory.cs
  22. 37
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceMigrationsEntityFrameworkCoreModule.cs
  23. 5
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/ElsaShellPermissionPolicyProvider.cs
  24. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Extensions/ElsaStudioServiceCollectionExtensions.cs
  25. 15
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/LINGYUN.Abp.MicroService.WorkflowService.csproj
  26. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Navigation/UserMenuContributor.cs
  27. 4
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Program.cs
  28. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Swashbuckle/AspNetCore/SwaggerGen/EnumDescriptionSchemaFilter.cs
  29. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Swashbuckle/AspNetCore/SwaggerGen/TenantHeaderParamter.cs
  30. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.Configure.cs
  31. 31
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.cs
  32. 12
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/appsettings.Development.json
  33. 56
      aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities/README.md
  34. 2
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor/Widgets/ExecutionTrendWidget.razor
  35. 2
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor/Widgets/RecentActivityWidget.razor
  36. 11
      aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.UserTasks.EntityFrameworkCore.PostgreSql/LINGYUN/Abp/ElsaNext/UserTasks/EntityFrameworkCore/PostgreSql/AbpElsaNextUserTasksEntityFrameworkCorePostgreSqlModule.cs

9
Directory.Packages.props

@ -1,4 +1,4 @@
<Project>
<Project>
<PropertyGroup>
<DotNetCoreCAPPackageVersion>10.0.0</DotNetCoreCAPPackageVersion>
<ElsaPackageVersion>2.17.0</ElsaPackageVersion>
@ -267,14 +267,17 @@
<PackageVersion Include="Elsa.Diagnostics.OpenTelemetry" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Diagnostics.StructuredLogs" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Diagnostics.StructuredLogs.Dashboard" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Expressions" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Expressions.CSharp" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Expressions.JavaScript" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Expressions.Liquid" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.ExternalAuthentication.OpenIdConnect" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.ExternalAuthentication.Persistence.EFCore.Sqlite" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Features" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Http" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Identity" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Labels" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Mediator" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.OpenTelemetry" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Scheduling" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Scheduling.Quartz" Version="$(ElsaNextPackageVersion)" />
@ -339,6 +342,8 @@
<PackageVersion Include="Elsa.UserTasks.Persistence.EFCore.PostgreSql" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.UserTasks.Persistence.EFCore.Sqlite" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.UserTasks.Persistence.EFCore.SqlServer" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Workflows.Core" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Workflows.Management" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Workflows.Runtime" Version="$(ElsaNextPackageVersion)" />
<PackageVersion Include="Elsa.Workflows.Runtime.Dashboard" Version="$(ElsaNextPackageVersion)" />
</ItemGroup>
@ -483,7 +488,7 @@
<PackageVersion Include="OpenIddict.Validation.DataProtection" Version="7.7.0" />
<PackageVersion Include="Polly" Version="8.6.3" />
<PackageVersion Include="QRCoder" Version="1.8.0" />
<PackageVersion Include="Quartz.Serialization.Json" Version="3.15.0" />
<PackageVersion Include="Quartz.Serialization.Json" Version="3.15.1" />
<PackageVersion Include="RulesEngine" Version="6.0.0" />
<PackageVersion Include="Scriban" Version="7.2.5" />
<PackageVersion Include="Senparc.Weixin.MP" Version="16.18.9" />

15
aspnet-core/LINGYUN.MicroService.Aspire.slnx

@ -73,6 +73,8 @@
<Project Path="aspire/LINGYUN.Abp.MicroService.WeChatService/LINGYUN.Abp.MicroService.WeChatService.csproj" />
</Folder>
<Folder Name="/aspire/workflow-service/">
<Project Path="aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator.csproj" />
<Project Path="aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore.csproj" />
<Project Path="aspire/LINGYUN.Abp.MicroService.WorkflowService/LINGYUN.Abp.MicroService.WorkflowService.csproj" />
</Folder>
<Folder Name="/framework/" />
@ -573,6 +575,19 @@
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Alterations/LINGYUN.Abp.ElsaNext.Alterations.csproj" Id="1e5e1733-8c5c-4ede-9ee8-7f6ae1e85bb6" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor/LINGYUN.Abp.ElsaNext.Studio.Alterations.Blazor.csproj" Id="eb1220d6-31cf-4f73-a9fc-494d30de61df" />
</Folder>
<Folder Name="/modules/workflow/elsa3/approval-flow/">
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.Activities/LINGYUN.Abp.ElsaNext.ApprovalFlow.Activities.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.Application.Contracts/LINGYUN.Abp.ElsaNext.ApprovalFlow.Application.Contracts.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.Application/LINGYUN.Abp.ElsaNext.ApprovalFlow.Application.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.Shared/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.Shared.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.AntFlowDesign/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.AntFlowDesign.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.Identity/LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.Identity.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore/LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore.csproj" />
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.ApprovalFlow.HttpApi/LINGYUN.Abp.ElsaNext.ApprovalFlow.HttpApi.csproj" />
</Folder>
<Folder Name="/modules/workflow/elsa3/form-definitions/">
</Folder>
<Folder Name="/modules/workflow/elsa3/blob-storing/">
<Project Path="modules/elsa/LINGYUN.Abp.ElsaNext.BlobStoring/LINGYUN.Abp.ElsaNext.BlobStoring.csproj" Id="ab3ed7c4-918e-40ae-84d6-f98d9ff9c6b1" />
</Folder>

22
aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/AppHost.cs

@ -232,18 +232,16 @@ builder.AddProject<Projects.LINGYUN_Abp_MicroService_WeChatService>("WeChatServi
.WaitFor(localizationService);
// WorkflowService
builder.AddProject<Projects.LINGYUN_Abp_MicroService_WorkflowService>("WorkflowService")
.WithHttpEndpoint(port: 30050, name: "workflow")
.WithExternalHttpEndpoints()
.WithReference(abpDb, "Default")
.WithReference(redis, "Redis")
.WithReference(rabbitmq, "Rabbitmq")
.WithReference(elasticsearch, "Elasticsearch")
.WaitFor(elasticsearch)
.WaitFor(redis)
.WaitFor(abpDb)
.WaitFor(rabbitmq)
.WaitFor(taskService);
AddDotNetProject<
Projects.LINGYUN_Abp_MicroService_WorkflowService_DbMigrator,
Projects.LINGYUN_Abp_MicroService_WorkflowService>(
builder: builder,
servicePrefix: "Workflow",
serviceSuffix: "Service",
migratorSuffix: "Migrator",
port: 30050,
portName: "workflow",
waitProjects: taskService);
// AIService
AddDotNetProject<

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.AppHost/LINGYUN.Abp.MicroService.AppHost.csproj

@ -35,6 +35,7 @@
<ProjectReference Include="..\LINGYUN.Abp.MicroService.WebhookService.DbMigrator\LINGYUN.Abp.MicroService.WebhookService.DbMigrator.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.MicroService.WebhookService\LINGYUN.Abp.MicroService.WebhookService.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.MicroService.WeChatService\LINGYUN.Abp.MicroService.WeChatService.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.MicroService.WorkflowService.DbMigrator\LINGYUN.Abp.MicroService.WorkflowService.DbMigrator.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.MicroService.WorkflowService\LINGYUN.Abp.MicroService.WorkflowService.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.MicroService.ApiGateway\LINGYUN.Abp.MicroService.ApiGateway.csproj" />
</ItemGroup>

9
aspnet-core/aspire/LINGYUN.Abp.MicroService.AuthServer/wwwroot/css/global-styles.css

@ -1,9 +0,0 @@
.account-module-form {
padding: 24px;
border: 0;
background: #fff;
color: #000;
box-shadow: 0 0 30px rgba(8, 20, 73, .1);
border-radius: 4px;
margin-top: 0.75rem !important;
}

42
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator.csproj

@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.secrets.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<RootNamespace>LINGYUN.Abp.MicroService.WorkflowService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.Async" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Serilog.Settings.Configuration" />
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Volo.Abp.Autofac" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore\LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

42
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/Program.cs

@ -0,0 +1,42 @@
using LINGYUN.Abp.MicroService.WorkflowService;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Events;
var defaultOutputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}";
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
#if DEBUG
.MinimumLevel.Override("LINGYUN.Abp.MicroService.WorkflowService", LogEventLevel.Debug)
#else
.MinimumLevel.Override("LINGYUN.Abp.MicroService.WorkflowService", LogEventLevel.Information)
#endif
.Enrich.FromLogContext()
.WriteTo.Async(x => x.Console(outputTemplate: defaultOutputTemplate))
.WriteTo.Async(x => x.File("Logs/migrations.txt", outputTemplate: defaultOutputTemplate))
.CreateLogger();
try
{
var builder = Host.CreateDefaultBuilder(args)
.AddAppSettingsSecretsJson()
.ConfigureLogging((context, logging) => logging.ClearProviders())
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<WorkflowServiceDbMigratorHostedService>();
});
await builder.RunConsoleAsync();
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
}
finally
{
await Log.CloseAndFlushAsync();
}

49
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/WorkflowServiceDbMigratorHostedService.cs

@ -0,0 +1,49 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Volo.Abp;
using Volo.Abp.Data;
namespace LINGYUN.Abp.MicroService.WorkflowService;
public class WorkflowServiceDbMigratorHostedService : IHostedService
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IConfiguration _configuration;
public WorkflowServiceDbMigratorHostedService(
IHostApplicationLifetime hostApplicationLifetime,
IConfiguration configuration)
{
_hostApplicationLifetime = hostApplicationLifetime;
_configuration = configuration;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
using var application = await AbpApplicationFactory
.CreateAsync<WorkflowServiceDbMigratorModule>(options =>
{
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
options.AddDataMigrationEnvironment();
});
await application.InitializeAsync();
await application
.ServiceProvider
.GetRequiredService<WorkflowServiceDbMigrationService>()
.CheckAndApplyDatabaseMigrationsAsync();
await application.ShutdownAsync();
_hostApplicationLifetime.StopApplication();
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

12
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/WorkflowServiceDbMigratorModule.cs

@ -0,0 +1,12 @@
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.MicroService.WorkflowService;
[DependsOn(
typeof(AbpAutofacModule),
typeof(WorkflowServiceMigrationsEntityFrameworkCoreModule)
)]
public class WorkflowServiceDbMigratorModule : AbpModule
{
}

5
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.DbMigrator/appsettings.json

@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"Default": "Host=127.0.0.1;Database=abp;Username=postgres;Password=123456"
}
}

3
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

30
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore.csproj

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>LINGYUN.Abp.MicroService.WorkflowService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore\LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.PostgreSql\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.PostgreSql.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.UserTasks.EntityFrameworkCore.PostgreSql\LINGYUN.Abp.ElsaNext.UserTasks.EntityFrameworkCore.PostgreSql.csproj" />
</ItemGroup>
</Project>

945
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261021033203_Initial.Designer.cs

@ -0,0 +1,945 @@
// <auto-generated />
using System;
using LINGYUN.Abp.MicroService.WorkflowService;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LINGYUN.Abp.MicroService.WorkflowService.Migrations
{
[DbContext(typeof(WorkflowServiceMigrationsDbContext))]
[Migration("20261021033203_Initial")]
partial class Initial
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "10.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.CarbonCopies.ApprovalCc", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.HasColumnType("text");
b.Property<Guid?>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("InstanceReference")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<bool>("IsRead")
.HasColumnType("boolean");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<DateTimeOffset>("NotifiedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("ReadAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("RecipientDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("RecipientId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("RecipientProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("RecipientType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("SenderDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("SenderId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("SenderProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("SenderType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Summary")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("TenantId", "RecipientId", "IsRead");
b.ToTable("EX_ApprovalFlowCarbonCopies", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Delegations.ApprovalDelegation", 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 with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DelegateDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("DelegateId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegateProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegateType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("DelegatorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("DelegatorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegatorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegatorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<DateTimeOffset>("EffectiveFrom")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("EffectiveTo")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Remark")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "DelegateId", "IsEnabled");
b.HasIndex("TenantId", "DelegatorId", "IsEnabled");
b.ToTable("EX_ApprovalFlowDelegations", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Instances.ApprovalInstance", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("BusinessKey")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("CurrentNodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("CurrentNodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ElsaWorkflowInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<DateTimeOffset?>("FinishedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("FormDataJson")
.HasColumnType("text");
b.Property<string>("InitiatorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("InitiatorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("InitiatorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("InitiatorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Outcome")
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<DateTime>("StartedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("TemplateCategory")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid>("TemplateId")
.HasColumnType("uuid");
b.Property<string>("TemplateName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.HasKey("Id");
b.HasIndex("ElsaWorkflowInstanceId");
b.HasIndex("TenantId", "InitiatorId");
b.HasIndex("TenantId", "Status");
b.HasIndex("TenantId", "TemplateId");
b.ToTable("EX_ApprovalFlowInstances", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Nodes.ApprovalNodeTask", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ApproverDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ApproverId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ApproverProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ApproverType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<Guid>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("Origin")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("SignMode")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("TaskId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("TaskId")
.IsUnique();
b.HasIndex("NodeInstanceId", "Status");
b.ToTable("EX_ApprovalFlowNodeTasks", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Records.ApprovalRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ActionKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("ActionLabel")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ActorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ActorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ActorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ActorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Comment")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.HasColumnType("text");
b.Property<string>("Effect")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<Guid>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<DateTimeOffset>("OccurredAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("TaskId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("InstanceId", "OccurredAt");
b.ToTable("EX_ApprovalFlowRecords", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Templates.ApprovalTemplate", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("BusinessKeyHint")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("Category")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ElsaDefinitionId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ElsaDefinitionKey")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<int?>("ElsaDefinitionVersion")
.HasColumnType("integer");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("FlowDefinitionJson")
.HasColumnType("text");
b.Property<Guid?>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<string>("Icon")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "Name")
.IsUnique();
b.HasIndex("TenantId", "IsPublished", "IsEnabled");
b.ToTable("EX_ApprovalFlowTemplates", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDatas.FormData", 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 with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("FormCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<Guid>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<int>("FormVersion")
.HasColumnType("integer");
b.Property<string>("InstanceId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("FormDefinitionId", "InstanceId")
.IsUnique();
b.HasIndex("TenantId", "FormCode");
b.ToTable("EX_FormDefinitionData", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<DateTime?>("PublishedTime")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<int>("Version")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("TenantId", "IsPublished");
b.HasIndex("TenantId", "Code", "Version")
.IsUnique();
b.ToTable("EX_FormDefinitionDefinitions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormFieldDefinition", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<Guid>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<string>("Hint")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<bool>("IsRequired")
.HasColumnType("boolean");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("Label")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("OptionsJson")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<string>("Permission")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("character varying(1)");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.HasKey("Id");
b.HasIndex("FormDefinitionId", "Key")
.IsUnique();
b.ToTable("EX_FormDefinitionDefinitionFields", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.OrganizationUnits.OrganizationUnitManagers.OrganizationUnitManagerAssignment", 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 with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsPrimary")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<Guid>("OrganizationUnitId")
.HasColumnType("uuid");
b.Property<string>("Remark")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<Guid>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("TenantId", "UserId");
b.HasIndex("TenantId", "OrganizationUnitId", "UserId")
.IsUnique();
b.HasIndex("TenantId", "OrganizationUnitId", "IsPrimary", "Order")
.HasDatabaseName("IX_EX_OrganizationUnitManagerAssignments_TenantId_Organizatio~1");
b.ToTable("EX_OrganizationUnitManagerAssignments", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormFieldDefinition", b =>
{
b.HasOne("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", null)
.WithMany("Fields")
.HasForeignKey("FormDefinitionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", b =>
{
b.Navigation("Fields");
});
#pragma warning restore 612, 618
}
}
}

462
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261021033203_Initial.cs

@ -0,0 +1,462 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LINGYUN.Abp.MicroService.WorkflowService.Migrations
{
/// <inheritdoc />
public partial class Initial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "EX_ApprovalFlowCarbonCopies",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
InstanceId = table.Column<Guid>(type: "uuid", nullable: true),
InstanceReference = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
NodeId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
NodeInstanceId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Title = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: false),
Summary = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
RecipientProvider = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
RecipientType = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
RecipientId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
RecipientDisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
SenderProvider = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
SenderType = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
SenderId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
SenderDisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
DataJson = table.Column<string>(type: "text", nullable: true),
NotifiedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
IsRead = table.Column<bool>(type: "boolean", nullable: false),
ReadAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_ApprovalFlowCarbonCopies", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_ApprovalFlowDelegations",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
DelegatorProvider = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
DelegatorType = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
DelegatorId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
DelegatorDisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
DelegateProvider = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
DelegateType = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
DelegateId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
DelegateDisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
EffectiveFrom = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
EffectiveTo = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
Remark = table.Column<string>(type: "character varying(1024)", maxLength: 1024, 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),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with 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)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_ApprovalFlowDelegations", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_ApprovalFlowInstances",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
TemplateId = table.Column<Guid>(type: "uuid", nullable: false),
TemplateName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
TemplateCategory = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
BusinessKey = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
Title = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: false),
InitiatorProvider = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
InitiatorType = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
InitiatorId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
InitiatorDisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
ElsaWorkflowInstanceId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Status = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
CurrentNodeId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
CurrentNodeName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
FormDataJson = table.Column<string>(type: "text", nullable: true),
StartedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
FinishedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
Outcome = table.Column<string>(type: "character varying(64)", maxLength: 64, 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),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with 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)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_ApprovalFlowInstances", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_ApprovalFlowNodeTasks",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
InstanceId = table.Column<Guid>(type: "uuid", nullable: false),
NodeInstanceId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
NodeId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
NodeName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
TaskId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
ApproverProvider = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
ApproverType = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
ApproverId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
ApproverDisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
SignMode = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
Status = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
Origin = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_ApprovalFlowNodeTasks", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_ApprovalFlowRecords",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
InstanceId = table.Column<Guid>(type: "uuid", nullable: false),
NodeId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
NodeName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
NodeInstanceId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
TaskId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
ActorProvider = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
ActorType = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: true),
ActorId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
ActorDisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
ActionKey = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
ActionLabel = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
Effect = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
Comment = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
DataJson = table.Column<string>(type: "text", nullable: true),
OccurredAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_ApprovalFlowRecords", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_ApprovalFlowTemplates",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
DisplayName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true),
Category = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Icon = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
IsPublished = table.Column<bool>(type: "boolean", nullable: false),
IsEnabled = table.Column<bool>(type: "boolean", nullable: false),
ElsaDefinitionId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
ElsaDefinitionKey = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
ElsaDefinitionVersion = table.Column<int>(type: "integer", nullable: true),
FormDefinitionId = table.Column<Guid>(type: "uuid", nullable: true),
BusinessKeyHint = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
FlowDefinitionJson = 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 with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with 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)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_ApprovalFlowTemplates", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_FormDefinitionData",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
FormDefinitionId = table.Column<Guid>(type: "uuid", nullable: false),
FormCode = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
FormVersion = table.Column<int>(type: "integer", nullable: false),
InstanceId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
DataJson = table.Column<string>(type: "text", 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),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with 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)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_FormDefinitionData", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_FormDefinitionDefinitions",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
Code = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
Version = table.Column<int>(type: "integer", nullable: false),
Description = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
IsPublished = table.Column<bool>(type: "boolean", nullable: false),
PublishedTime = table.Column<DateTime>(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),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with 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)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_FormDefinitionDefinitions", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_OrganizationUnitManagerAssignments",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
OrganizationUnitId = table.Column<Guid>(type: "uuid", nullable: false),
UserId = table.Column<Guid>(type: "uuid", nullable: false),
IsPrimary = table.Column<bool>(type: "boolean", nullable: false),
Order = table.Column<int>(type: "integer", nullable: false),
Remark = table.Column<string>(type: "character varying(512)", maxLength: 512, 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),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with 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)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_OrganizationUnitManagerAssignments", x => x.Id);
});
migrationBuilder.CreateTable(
name: "EX_FormDefinitionDefinitionFields",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
FormDefinitionId = table.Column<Guid>(type: "uuid", nullable: false),
Key = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
Label = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
Type = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
Permission = table.Column<string>(type: "character varying(1)", maxLength: 1, nullable: false),
Order = table.Column<int>(type: "integer", nullable: false),
IsRequired = table.Column<bool>(type: "boolean", nullable: false),
Hint = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
OptionsJson = table.Column<string>(type: "character varying(4096)", maxLength: 4096, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EX_FormDefinitionDefinitionFields", x => x.Id);
table.ForeignKey(
name: "FK_EX_FormDefinitionDefinitionFields_EX_FormDefinitionDefiniti~",
column: x => x.FormDefinitionId,
principalTable: "EX_FormDefinitionDefinitions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowCarbonCopies_InstanceId",
table: "EX_ApprovalFlowCarbonCopies",
column: "InstanceId");
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowCarbonCopies_TenantId_RecipientId_IsRead",
table: "EX_ApprovalFlowCarbonCopies",
columns: new[] { "TenantId", "RecipientId", "IsRead" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowDelegations_TenantId_DelegateId_IsEnabled",
table: "EX_ApprovalFlowDelegations",
columns: new[] { "TenantId", "DelegateId", "IsEnabled" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowDelegations_TenantId_DelegatorId_IsEnabled",
table: "EX_ApprovalFlowDelegations",
columns: new[] { "TenantId", "DelegatorId", "IsEnabled" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowInstances_ElsaWorkflowInstanceId",
table: "EX_ApprovalFlowInstances",
column: "ElsaWorkflowInstanceId");
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowInstances_TenantId_InitiatorId",
table: "EX_ApprovalFlowInstances",
columns: new[] { "TenantId", "InitiatorId" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowInstances_TenantId_Status",
table: "EX_ApprovalFlowInstances",
columns: new[] { "TenantId", "Status" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowInstances_TenantId_TemplateId",
table: "EX_ApprovalFlowInstances",
columns: new[] { "TenantId", "TemplateId" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowNodeTasks_InstanceId",
table: "EX_ApprovalFlowNodeTasks",
column: "InstanceId");
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowNodeTasks_NodeInstanceId_Status",
table: "EX_ApprovalFlowNodeTasks",
columns: new[] { "NodeInstanceId", "Status" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowNodeTasks_TaskId",
table: "EX_ApprovalFlowNodeTasks",
column: "TaskId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowRecords_InstanceId_OccurredAt",
table: "EX_ApprovalFlowRecords",
columns: new[] { "InstanceId", "OccurredAt" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowTemplates_TenantId_IsPublished_IsEnabled",
table: "EX_ApprovalFlowTemplates",
columns: new[] { "TenantId", "IsPublished", "IsEnabled" });
migrationBuilder.CreateIndex(
name: "IX_EX_ApprovalFlowTemplates_TenantId_Name",
table: "EX_ApprovalFlowTemplates",
columns: new[] { "TenantId", "Name" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_EX_FormDefinitionData_FormDefinitionId_InstanceId",
table: "EX_FormDefinitionData",
columns: new[] { "FormDefinitionId", "InstanceId" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_EX_FormDefinitionData_TenantId_FormCode",
table: "EX_FormDefinitionData",
columns: new[] { "TenantId", "FormCode" });
migrationBuilder.CreateIndex(
name: "IX_EX_FormDefinitionDefinitionFields_FormDefinitionId_Key",
table: "EX_FormDefinitionDefinitionFields",
columns: new[] { "FormDefinitionId", "Key" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_EX_FormDefinitionDefinitions_TenantId_Code_Version",
table: "EX_FormDefinitionDefinitions",
columns: new[] { "TenantId", "Code", "Version" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_EX_FormDefinitionDefinitions_TenantId_IsPublished",
table: "EX_FormDefinitionDefinitions",
columns: new[] { "TenantId", "IsPublished" });
migrationBuilder.CreateIndex(
name: "IX_EX_OrganizationUnitManagerAssignments_TenantId_Organizatio~1",
table: "EX_OrganizationUnitManagerAssignments",
columns: new[] { "TenantId", "OrganizationUnitId", "IsPrimary", "Order" });
migrationBuilder.CreateIndex(
name: "IX_EX_OrganizationUnitManagerAssignments_TenantId_Organization~",
table: "EX_OrganizationUnitManagerAssignments",
columns: new[] { "TenantId", "OrganizationUnitId", "UserId" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_EX_OrganizationUnitManagerAssignments_TenantId_UserId",
table: "EX_OrganizationUnitManagerAssignments",
columns: new[] { "TenantId", "UserId" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "EX_ApprovalFlowCarbonCopies");
migrationBuilder.DropTable(
name: "EX_ApprovalFlowDelegations");
migrationBuilder.DropTable(
name: "EX_ApprovalFlowInstances");
migrationBuilder.DropTable(
name: "EX_ApprovalFlowNodeTasks");
migrationBuilder.DropTable(
name: "EX_ApprovalFlowRecords");
migrationBuilder.DropTable(
name: "EX_ApprovalFlowTemplates");
migrationBuilder.DropTable(
name: "EX_FormDefinitionData");
migrationBuilder.DropTable(
name: "EX_FormDefinitionDefinitionFields");
migrationBuilder.DropTable(
name: "EX_OrganizationUnitManagerAssignments");
migrationBuilder.DropTable(
name: "EX_FormDefinitionDefinitions");
}
}
}

945
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261022114808_MergeOrganizationUnitsIntoApprovalFlow.Designer.cs

@ -0,0 +1,945 @@
// <auto-generated />
using System;
using LINGYUN.Abp.MicroService.WorkflowService;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LINGYUN.Abp.MicroService.WorkflowService.Migrations
{
[DbContext(typeof(WorkflowServiceMigrationsDbContext))]
[Migration("20261022114808_MergeOrganizationUnitsIntoApprovalFlow")]
partial class MergeOrganizationUnitsIntoApprovalFlow
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "10.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.CarbonCopies.ApprovalCc", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.HasColumnType("text");
b.Property<Guid?>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("InstanceReference")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<bool>("IsRead")
.HasColumnType("boolean");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<DateTimeOffset>("NotifiedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("ReadAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("RecipientDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("RecipientId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("RecipientProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("RecipientType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("SenderDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("SenderId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("SenderProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("SenderType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Summary")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("TenantId", "RecipientId", "IsRead");
b.ToTable("EX_ApprovalCcs", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Delegations.ApprovalDelegation", 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 with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DelegateDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("DelegateId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegateProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegateType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("DelegatorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("DelegatorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegatorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegatorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<DateTimeOffset>("EffectiveFrom")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("EffectiveTo")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Remark")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "DelegateId", "IsEnabled");
b.HasIndex("TenantId", "DelegatorId", "IsEnabled");
b.ToTable("EX_ApprovalDelegations", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDatas.FormData", 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 with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("FormCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<Guid>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<int>("FormVersion")
.HasColumnType("integer");
b.Property<string>("InstanceId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("FormDefinitionId", "InstanceId")
.IsUnique();
b.HasIndex("TenantId", "FormCode");
b.ToTable("EX_FormDatas", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<DateTime?>("PublishedTime")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<int>("Version")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("TenantId", "IsPublished");
b.HasIndex("TenantId", "Code", "Version")
.IsUnique();
b.ToTable("EX_FormDefinitions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormFieldDefinition", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<Guid>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<string>("Hint")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<bool>("IsRequired")
.HasColumnType("boolean");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("Label")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("OptionsJson")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<string>("Permission")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("character varying(1)");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.HasKey("Id");
b.HasIndex("FormDefinitionId", "Key")
.IsUnique();
b.ToTable("EX_FormFieldDefinitions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Instances.ApprovalInstance", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("BusinessKey")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("CurrentNodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("CurrentNodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ElsaWorkflowInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<DateTimeOffset?>("FinishedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("FormDataJson")
.HasColumnType("text");
b.Property<string>("InitiatorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("InitiatorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("InitiatorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("InitiatorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Outcome")
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<DateTime>("StartedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("TemplateCategory")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid>("TemplateId")
.HasColumnType("uuid");
b.Property<string>("TemplateName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.HasKey("Id");
b.HasIndex("ElsaWorkflowInstanceId");
b.HasIndex("TenantId", "InitiatorId");
b.HasIndex("TenantId", "Status");
b.HasIndex("TenantId", "TemplateId");
b.ToTable("EX_ApprovalInstances", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Nodes.ApprovalNodeTask", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ApproverDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ApproverId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ApproverProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ApproverType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<Guid>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("Origin")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("SignMode")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("TaskId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("TaskId")
.IsUnique();
b.HasIndex("NodeInstanceId", "Status");
b.ToTable("EX_ApprovalNodeTasks", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.OrganizationUnitManagers.OrganizationUnitManagerAssignment", 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 with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsPrimary")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<Guid>("OrganizationUnitId")
.HasColumnType("uuid");
b.Property<string>("Remark")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<Guid>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("TenantId", "UserId");
b.HasIndex("TenantId", "OrganizationUnitId", "UserId")
.IsUnique();
b.HasIndex("TenantId", "OrganizationUnitId", "IsPrimary", "Order")
.HasDatabaseName("IX_EX_OrganizationUnitManagerAssignments_TenantId_Organizatio~1");
b.ToTable("EX_OrganizationUnitManagerAssignments", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Records.ApprovalRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ActionKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("ActionLabel")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ActorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ActorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ActorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ActorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Comment")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.HasColumnType("text");
b.Property<string>("Effect")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<Guid>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<DateTimeOffset>("OccurredAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("TaskId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("InstanceId", "OccurredAt");
b.ToTable("EX_ApprovalRecords", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Templates.ApprovalTemplate", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("BusinessKeyHint")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("Category")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ElsaDefinitionId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ElsaDefinitionKey")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<int?>("ElsaDefinitionVersion")
.HasColumnType("integer");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("FlowDefinitionJson")
.HasColumnType("text");
b.Property<Guid?>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<string>("Icon")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "Name")
.IsUnique();
b.HasIndex("TenantId", "IsPublished", "IsEnabled");
b.ToTable("EX_ApprovalTemplates", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormFieldDefinition", b =>
{
b.HasOne("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", null)
.WithMany("Fields")
.HasForeignKey("FormDefinitionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", b =>
{
b.Navigation("Fields");
});
#pragma warning restore 612, 618
}
}
}

474
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/20261022114808_MergeOrganizationUnitsIntoApprovalFlow.cs

@ -0,0 +1,474 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LINGYUN.Abp.MicroService.WorkflowService.Migrations
{
/// <inheritdoc />
/// <summary>
/// 将独立的 OrganizationUnits 模块合并到审批流模块,并让本迁移项目的模型快照与审批流模块保持一致。
/// </summary>
/// <remarks>
/// 本迁移项目此前未同步表单定义合并带来的表重命名(EX_FormDefinition* → EX_Form* / EX_Approval*),
/// 因此这里包含这些重命名;OrganizationUnitManagerAssignment 实体合并后表名仍为
/// EX_OrganizationUnitManagerAssignments,列与索引均未变化,不产生额外架构变更。
/// </remarks>
public partial class MergeOrganizationUnitsIntoApprovalFlow : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EX_FormDefinitionDefinitionFields_EX_FormDefinitionDefiniti~",
table: "EX_FormDefinitionDefinitionFields");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_FormDefinitionDefinitions",
table: "EX_FormDefinitionDefinitions");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_FormDefinitionDefinitionFields",
table: "EX_FormDefinitionDefinitionFields");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_FormDefinitionData",
table: "EX_FormDefinitionData");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalFlowTemplates",
table: "EX_ApprovalFlowTemplates");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalFlowRecords",
table: "EX_ApprovalFlowRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalFlowNodeTasks",
table: "EX_ApprovalFlowNodeTasks");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalFlowInstances",
table: "EX_ApprovalFlowInstances");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalFlowDelegations",
table: "EX_ApprovalFlowDelegations");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalFlowCarbonCopies",
table: "EX_ApprovalFlowCarbonCopies");
migrationBuilder.RenameTable(
name: "EX_FormDefinitionDefinitions",
newName: "EX_FormDefinitions");
migrationBuilder.RenameTable(
name: "EX_FormDefinitionDefinitionFields",
newName: "EX_FormFieldDefinitions");
migrationBuilder.RenameTable(
name: "EX_FormDefinitionData",
newName: "EX_FormDatas");
migrationBuilder.RenameTable(
name: "EX_ApprovalFlowTemplates",
newName: "EX_ApprovalTemplates");
migrationBuilder.RenameTable(
name: "EX_ApprovalFlowRecords",
newName: "EX_ApprovalRecords");
migrationBuilder.RenameTable(
name: "EX_ApprovalFlowNodeTasks",
newName: "EX_ApprovalNodeTasks");
migrationBuilder.RenameTable(
name: "EX_ApprovalFlowInstances",
newName: "EX_ApprovalInstances");
migrationBuilder.RenameTable(
name: "EX_ApprovalFlowDelegations",
newName: "EX_ApprovalDelegations");
migrationBuilder.RenameTable(
name: "EX_ApprovalFlowCarbonCopies",
newName: "EX_ApprovalCcs");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDefinitionDefinitions_TenantId_IsPublished",
table: "EX_FormDefinitions",
newName: "IX_EX_FormDefinitions_TenantId_IsPublished");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDefinitionDefinitions_TenantId_Code_Version",
table: "EX_FormDefinitions",
newName: "IX_EX_FormDefinitions_TenantId_Code_Version");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDefinitionDefinitionFields_FormDefinitionId_Key",
table: "EX_FormFieldDefinitions",
newName: "IX_EX_FormFieldDefinitions_FormDefinitionId_Key");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDefinitionData_TenantId_FormCode",
table: "EX_FormDatas",
newName: "IX_EX_FormDatas_TenantId_FormCode");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDefinitionData_FormDefinitionId_InstanceId",
table: "EX_FormDatas",
newName: "IX_EX_FormDatas_FormDefinitionId_InstanceId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowTemplates_TenantId_Name",
table: "EX_ApprovalTemplates",
newName: "IX_EX_ApprovalTemplates_TenantId_Name");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowTemplates_TenantId_IsPublished_IsEnabled",
table: "EX_ApprovalTemplates",
newName: "IX_EX_ApprovalTemplates_TenantId_IsPublished_IsEnabled");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowRecords_InstanceId_OccurredAt",
table: "EX_ApprovalRecords",
newName: "IX_EX_ApprovalRecords_InstanceId_OccurredAt");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowNodeTasks_TaskId",
table: "EX_ApprovalNodeTasks",
newName: "IX_EX_ApprovalNodeTasks_TaskId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowNodeTasks_NodeInstanceId_Status",
table: "EX_ApprovalNodeTasks",
newName: "IX_EX_ApprovalNodeTasks_NodeInstanceId_Status");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowNodeTasks_InstanceId",
table: "EX_ApprovalNodeTasks",
newName: "IX_EX_ApprovalNodeTasks_InstanceId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowInstances_TenantId_TemplateId",
table: "EX_ApprovalInstances",
newName: "IX_EX_ApprovalInstances_TenantId_TemplateId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowInstances_TenantId_Status",
table: "EX_ApprovalInstances",
newName: "IX_EX_ApprovalInstances_TenantId_Status");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowInstances_TenantId_InitiatorId",
table: "EX_ApprovalInstances",
newName: "IX_EX_ApprovalInstances_TenantId_InitiatorId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowInstances_ElsaWorkflowInstanceId",
table: "EX_ApprovalInstances",
newName: "IX_EX_ApprovalInstances_ElsaWorkflowInstanceId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowDelegations_TenantId_DelegatorId_IsEnabled",
table: "EX_ApprovalDelegations",
newName: "IX_EX_ApprovalDelegations_TenantId_DelegatorId_IsEnabled");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowDelegations_TenantId_DelegateId_IsEnabled",
table: "EX_ApprovalDelegations",
newName: "IX_EX_ApprovalDelegations_TenantId_DelegateId_IsEnabled");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowCarbonCopies_TenantId_RecipientId_IsRead",
table: "EX_ApprovalCcs",
newName: "IX_EX_ApprovalCcs_TenantId_RecipientId_IsRead");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalFlowCarbonCopies_InstanceId",
table: "EX_ApprovalCcs",
newName: "IX_EX_ApprovalCcs_InstanceId");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_FormDefinitions",
table: "EX_FormDefinitions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_FormFieldDefinitions",
table: "EX_FormFieldDefinitions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_FormDatas",
table: "EX_FormDatas",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalTemplates",
table: "EX_ApprovalTemplates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalRecords",
table: "EX_ApprovalRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalNodeTasks",
table: "EX_ApprovalNodeTasks",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalInstances",
table: "EX_ApprovalInstances",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalDelegations",
table: "EX_ApprovalDelegations",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalCcs",
table: "EX_ApprovalCcs",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EX_FormFieldDefinitions_EX_FormDefinitions_FormDefinitionId",
table: "EX_FormFieldDefinitions",
column: "FormDefinitionId",
principalTable: "EX_FormDefinitions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EX_FormFieldDefinitions_EX_FormDefinitions_FormDefinitionId",
table: "EX_FormFieldDefinitions");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_FormFieldDefinitions",
table: "EX_FormFieldDefinitions");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_FormDefinitions",
table: "EX_FormDefinitions");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_FormDatas",
table: "EX_FormDatas");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalTemplates",
table: "EX_ApprovalTemplates");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalRecords",
table: "EX_ApprovalRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalNodeTasks",
table: "EX_ApprovalNodeTasks");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalInstances",
table: "EX_ApprovalInstances");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalDelegations",
table: "EX_ApprovalDelegations");
migrationBuilder.DropPrimaryKey(
name: "PK_EX_ApprovalCcs",
table: "EX_ApprovalCcs");
migrationBuilder.RenameTable(
name: "EX_FormFieldDefinitions",
newName: "EX_FormDefinitionDefinitionFields");
migrationBuilder.RenameTable(
name: "EX_FormDefinitions",
newName: "EX_FormDefinitionDefinitions");
migrationBuilder.RenameTable(
name: "EX_FormDatas",
newName: "EX_FormDefinitionData");
migrationBuilder.RenameTable(
name: "EX_ApprovalTemplates",
newName: "EX_ApprovalFlowTemplates");
migrationBuilder.RenameTable(
name: "EX_ApprovalRecords",
newName: "EX_ApprovalFlowRecords");
migrationBuilder.RenameTable(
name: "EX_ApprovalNodeTasks",
newName: "EX_ApprovalFlowNodeTasks");
migrationBuilder.RenameTable(
name: "EX_ApprovalInstances",
newName: "EX_ApprovalFlowInstances");
migrationBuilder.RenameTable(
name: "EX_ApprovalDelegations",
newName: "EX_ApprovalFlowDelegations");
migrationBuilder.RenameTable(
name: "EX_ApprovalCcs",
newName: "EX_ApprovalFlowCarbonCopies");
migrationBuilder.RenameIndex(
name: "IX_EX_FormFieldDefinitions_FormDefinitionId_Key",
table: "EX_FormDefinitionDefinitionFields",
newName: "IX_EX_FormDefinitionDefinitionFields_FormDefinitionId_Key");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDefinitions_TenantId_IsPublished",
table: "EX_FormDefinitionDefinitions",
newName: "IX_EX_FormDefinitionDefinitions_TenantId_IsPublished");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDefinitions_TenantId_Code_Version",
table: "EX_FormDefinitionDefinitions",
newName: "IX_EX_FormDefinitionDefinitions_TenantId_Code_Version");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDatas_TenantId_FormCode",
table: "EX_FormDefinitionData",
newName: "IX_EX_FormDefinitionData_TenantId_FormCode");
migrationBuilder.RenameIndex(
name: "IX_EX_FormDatas_FormDefinitionId_InstanceId",
table: "EX_FormDefinitionData",
newName: "IX_EX_FormDefinitionData_FormDefinitionId_InstanceId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalTemplates_TenantId_Name",
table: "EX_ApprovalFlowTemplates",
newName: "IX_EX_ApprovalFlowTemplates_TenantId_Name");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalTemplates_TenantId_IsPublished_IsEnabled",
table: "EX_ApprovalFlowTemplates",
newName: "IX_EX_ApprovalFlowTemplates_TenantId_IsPublished_IsEnabled");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalRecords_InstanceId_OccurredAt",
table: "EX_ApprovalFlowRecords",
newName: "IX_EX_ApprovalFlowRecords_InstanceId_OccurredAt");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalNodeTasks_TaskId",
table: "EX_ApprovalFlowNodeTasks",
newName: "IX_EX_ApprovalFlowNodeTasks_TaskId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalNodeTasks_NodeInstanceId_Status",
table: "EX_ApprovalFlowNodeTasks",
newName: "IX_EX_ApprovalFlowNodeTasks_NodeInstanceId_Status");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalNodeTasks_InstanceId",
table: "EX_ApprovalFlowNodeTasks",
newName: "IX_EX_ApprovalFlowNodeTasks_InstanceId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalInstances_TenantId_TemplateId",
table: "EX_ApprovalFlowInstances",
newName: "IX_EX_ApprovalFlowInstances_TenantId_TemplateId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalInstances_TenantId_Status",
table: "EX_ApprovalFlowInstances",
newName: "IX_EX_ApprovalFlowInstances_TenantId_Status");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalInstances_TenantId_InitiatorId",
table: "EX_ApprovalFlowInstances",
newName: "IX_EX_ApprovalFlowInstances_TenantId_InitiatorId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalInstances_ElsaWorkflowInstanceId",
table: "EX_ApprovalFlowInstances",
newName: "IX_EX_ApprovalFlowInstances_ElsaWorkflowInstanceId");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalDelegations_TenantId_DelegatorId_IsEnabled",
table: "EX_ApprovalFlowDelegations",
newName: "IX_EX_ApprovalFlowDelegations_TenantId_DelegatorId_IsEnabled");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalDelegations_TenantId_DelegateId_IsEnabled",
table: "EX_ApprovalFlowDelegations",
newName: "IX_EX_ApprovalFlowDelegations_TenantId_DelegateId_IsEnabled");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalCcs_TenantId_RecipientId_IsRead",
table: "EX_ApprovalFlowCarbonCopies",
newName: "IX_EX_ApprovalFlowCarbonCopies_TenantId_RecipientId_IsRead");
migrationBuilder.RenameIndex(
name: "IX_EX_ApprovalCcs_InstanceId",
table: "EX_ApprovalFlowCarbonCopies",
newName: "IX_EX_ApprovalFlowCarbonCopies_InstanceId");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_FormDefinitionDefinitionFields",
table: "EX_FormDefinitionDefinitionFields",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_FormDefinitionDefinitions",
table: "EX_FormDefinitionDefinitions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_FormDefinitionData",
table: "EX_FormDefinitionData",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalFlowTemplates",
table: "EX_ApprovalFlowTemplates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalFlowRecords",
table: "EX_ApprovalFlowRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalFlowNodeTasks",
table: "EX_ApprovalFlowNodeTasks",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalFlowInstances",
table: "EX_ApprovalFlowInstances",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalFlowDelegations",
table: "EX_ApprovalFlowDelegations",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EX_ApprovalFlowCarbonCopies",
table: "EX_ApprovalFlowCarbonCopies",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EX_FormDefinitionDefinitionFields_EX_FormDefinitionDefiniti~",
table: "EX_FormDefinitionDefinitionFields",
column: "FormDefinitionId",
principalTable: "EX_FormDefinitionDefinitions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

942
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/Migrations/WorkflowServiceMigrationsDbContextModelSnapshot.cs

@ -0,0 +1,942 @@
// <auto-generated />
using System;
using LINGYUN.Abp.MicroService.WorkflowService;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LINGYUN.Abp.MicroService.WorkflowService.Migrations
{
[DbContext(typeof(WorkflowServiceMigrationsDbContext))]
partial class WorkflowServiceMigrationsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "10.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.CarbonCopies.ApprovalCc", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.HasColumnType("text");
b.Property<Guid?>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("InstanceReference")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<bool>("IsRead")
.HasColumnType("boolean");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<DateTimeOffset>("NotifiedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("ReadAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("RecipientDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("RecipientId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("RecipientProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("RecipientType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("SenderDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("SenderId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("SenderProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("SenderType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Summary")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("TenantId", "RecipientId", "IsRead");
b.ToTable("EX_ApprovalCcs", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Delegations.ApprovalDelegation", 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 with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DelegateDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("DelegateId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegateProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegateType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("DelegatorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("DelegatorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegatorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("DelegatorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<DateTimeOffset>("EffectiveFrom")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("EffectiveTo")
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Remark")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "DelegateId", "IsEnabled");
b.HasIndex("TenantId", "DelegatorId", "IsEnabled");
b.ToTable("EX_ApprovalDelegations", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDatas.FormData", 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 with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("FormCode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<Guid>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<int>("FormVersion")
.HasColumnType("integer");
b.Property<string>("InstanceId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("FormDefinitionId", "InstanceId")
.IsUnique();
b.HasIndex("TenantId", "FormCode");
b.ToTable("EX_FormDatas", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<DateTime?>("PublishedTime")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<int>("Version")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("TenantId", "IsPublished");
b.HasIndex("TenantId", "Code", "Version")
.IsUnique();
b.ToTable("EX_FormDefinitions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormFieldDefinition", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<Guid>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<string>("Hint")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<bool>("IsRequired")
.HasColumnType("boolean");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("Label")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("OptionsJson")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<string>("Permission")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("character varying(1)");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.HasKey("Id");
b.HasIndex("FormDefinitionId", "Key")
.IsUnique();
b.ToTable("EX_FormFieldDefinitions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Instances.ApprovalInstance", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("BusinessKey")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("CurrentNodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("CurrentNodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uuid")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ElsaWorkflowInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<DateTimeOffset?>("FinishedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("FormDataJson")
.HasColumnType("text");
b.Property<string>("InitiatorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("InitiatorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("InitiatorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("InitiatorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Outcome")
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<DateTime>("StartedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("TemplateCategory")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid>("TemplateId")
.HasColumnType("uuid");
b.Property<string>("TemplateName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.HasKey("Id");
b.HasIndex("ElsaWorkflowInstanceId");
b.HasIndex("TenantId", "InitiatorId");
b.HasIndex("TenantId", "Status");
b.HasIndex("TenantId", "TemplateId");
b.ToTable("EX_ApprovalInstances", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Nodes.ApprovalNodeTask", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ApproverDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ApproverId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ApproverProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ApproverType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<Guid>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("Origin")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("SignMode")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("TaskId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("InstanceId");
b.HasIndex("TaskId")
.IsUnique();
b.HasIndex("NodeInstanceId", "Status");
b.ToTable("EX_ApprovalNodeTasks", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.OrganizationUnitManagers.OrganizationUnitManagerAssignment", 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 with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsPrimary")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<int>("Order")
.HasColumnType("integer");
b.Property<Guid>("OrganizationUnitId")
.HasColumnType("uuid");
b.Property<string>("Remark")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<Guid>("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("TenantId", "UserId");
b.HasIndex("TenantId", "OrganizationUnitId", "UserId")
.IsUnique();
b.HasIndex("TenantId", "OrganizationUnitId", "IsPrimary", "Order")
.HasDatabaseName("IX_EX_OrganizationUnitManagerAssignments_TenantId_Organizatio~1");
b.ToTable("EX_OrganizationUnitManagerAssignments", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Records.ApprovalRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ActionKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("ActionLabel")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ActorDisplayName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ActorId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ActorProvider")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ActorType")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Comment")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("DataJson")
.HasColumnType("text");
b.Property<string>("Effect")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<Guid>("InstanceId")
.HasColumnType("uuid");
b.Property<string>("NodeId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeInstanceId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("NodeName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<DateTimeOffset>("OccurredAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("TaskId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("InstanceId", "OccurredAt");
b.ToTable("EX_ApprovalRecords", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.Templates.ApprovalTemplate", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("BusinessKeyHint")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("Category")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp with 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 with time zone")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("ElsaDefinitionId")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("ElsaDefinitionKey")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<int?>("ElsaDefinitionVersion")
.HasColumnType("integer");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("FlowDefinitionJson")
.HasColumnType("text");
b.Property<Guid?>("FormDefinitionId")
.HasColumnType("uuid");
b.Property<string>("Icon")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("timestamp with time zone")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uuid")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "Name")
.IsUnique();
b.HasIndex("TenantId", "IsPublished", "IsEnabled");
b.ToTable("EX_ApprovalTemplates", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormFieldDefinition", b =>
{
b.HasOne("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", null)
.WithMany("Fields")
.HasForeignKey("FormDefinitionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions.FormDefinition", b =>
{
b.Navigation("Fields");
});
#pragma warning restore 612, 618
}
}
}

27
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceDbMigrationService.cs

@ -0,0 +1,27 @@
using LINGYUN.Abp.Data.DbMigrator;
using Microsoft.Extensions.Logging;
using System;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DistributedLocking;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
namespace LINGYUN.Abp.MicroService.WorkflowService;
public class WorkflowServiceDbMigrationService : EfCoreRuntimeDbMigratorBase<WorkflowServiceMigrationsDbContext>, ITransientDependency
{
public WorkflowServiceDbMigrationService(
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
IServiceProvider serviceProvider,
IAbpDistributedLock abpDistributedLock,
IDistributedEventBus distributedEventBus,
ILoggerFactory loggerFactory)
: base(
ConnectionStringNameAttribute.GetConnStringName<WorkflowServiceMigrationsDbContext>(),
unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory)
{
}
}

52
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceMigrationsDbContext.cs

@ -0,0 +1,52 @@
using LINGYUN.Abp.ElsaNext.ApprovalFlow.CarbonCopies;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.Delegations;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.Instances;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.Nodes;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.Records;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.Templates;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDatas;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.OrganizationUnitManagers;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.Abp.MicroService.WorkflowService;
/// <summary>
/// 承载服务审批流相关模块的迁移 DbContext。
/// </summary>
/// <remarks>
/// 这里<b>只</b>配置本服务新增模块的表。Elsa 自身的表由 Elsa 的启动迁移器写入 Elsa schema,
/// 已被迁移过的其他模块若在此重复配置,会生成针对既有表的 CreateTable 而直接失败。
/// </remarks>
[ConnectionStringName("Default")]
public class WorkflowServiceMigrationsDbContext :
AbpDbContext<WorkflowServiceMigrationsDbContext>,
IElsaNextApprovalFlowDbContext
{
public DbSet<OrganizationUnitManagerAssignment> OrganizationUnitManagerAssignments { get; set; }
public DbSet<ApprovalTemplate> ApprovalTemplates { get; set; }
public DbSet<ApprovalInstance> ApprovalInstances { get; set; }
public DbSet<ApprovalRecord> ApprovalRecords { get; set; }
public DbSet<ApprovalCc> ApprovalCcs { get; set; }
public DbSet<ApprovalNodeTask> ApprovalNodeTasks { get; set; }
public DbSet<ApprovalDelegation> ApprovalDelegations { get; set; }
public DbSet<FormDefinition> FormDefinitions { get; set; }
public DbSet<FormData> FormDatas { get; set; }
public WorkflowServiceMigrationsDbContext(DbContextOptions<WorkflowServiceMigrationsDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureElsaNextApprovalFlow();
}
}

28
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceMigrationsDbContextFactory.cs

@ -0,0 +1,28 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace LINGYUN.Abp.MicroService.WorkflowService;
/// <summary>
/// EF 设计时上下文工厂。
/// </summary>
/// <remarks>
/// 连接串优先取环境变量 <c>ConnectionStrings__Default</c>,以便 CI / 本地执行 <c>dotnet ef</c> 时覆盖;
/// 未设置时使用与宿主开发环境一致的默认连接串。
/// </remarks>
public class WorkflowServiceMigrationsDbContextFactory : IDesignTimeDbContextFactory<WorkflowServiceMigrationsDbContext>
{
private const string DefaultConnectionString = "Host=127.0.0.1;Database=abp;Username=postgres;Password=123456";
public WorkflowServiceMigrationsDbContext CreateDbContext(string[] args)
{
var connectionString = Environment.GetEnvironmentVariable("ConnectionStrings__Default")
?? DefaultConnectionString;
var builder = new DbContextOptionsBuilder<WorkflowServiceMigrationsDbContext>()
.UseNpgsql(connectionString);
return new WorkflowServiceMigrationsDbContext(builder.Options);
}
}

37
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore/WorkflowServiceMigrationsEntityFrameworkCoreModule.cs

@ -0,0 +1,37 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore;
using LINGYUN.Abp.ElsaNext.EntityFrameworkCore.PostgreSql;
using LINGYUN.Abp.ElsaNext.UserTasks.EntityFrameworkCore.PostgreSql;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.MicroService.WorkflowService;
[DependsOn(
typeof(AbpElsaNextApprovalFlowEntityFrameworkCoreModule),
typeof(AbpElsaNextUserTasksEntityFrameworkCorePostgreSqlModule),
typeof(AbpElsaNextEntityFrameworkCorePostgreSqlModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpDataDbMigratorModule))]
public class WorkflowServiceMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<WorkflowServiceMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseNpgsql();
});
}
}

5
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/ElsaShellPermissionPolicyProvider.cs

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Authorization;
#nullable enable
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Options;
using System;
using System.Threading.Tasks;
@ -35,7 +36,7 @@ public sealed class ElsaShellPermissionPolicyProvider : IAuthorizationPolicyProv
}
/// <inheritdoc />
public Task<AuthorizationPolicy?> GetDefaultPolicyAsync() => Task.FromResult<AuthorizationPolicy?>(AllowAll);
public Task<AuthorizationPolicy> GetDefaultPolicyAsync() => Task.FromResult(AllowAll);
/// <inheritdoc />
public Task<AuthorizationPolicy?> GetFallbackPolicyAsync() => Task.FromResult<AuthorizationPolicy?>(AllowAll);

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Extensions/ElsaStudioServiceCollectionExtensions.cs

@ -1,4 +1,4 @@
using Consul;
using Consul;
using Elsa.Studio.Authentication.Abstractions.ComponentProviders;
using Elsa.Studio.Authentication.Abstractions.Contracts;
using Elsa.Studio.Authentication.Abstractions.Models;

15
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/LINGYUN.Abp.MicroService.WorkflowService.csproj

@ -44,11 +44,9 @@
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Volo.Abp.Autofac" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" />
<PackageReference Include="Volo.Abp.Json" />
<PackageReference Include="Volo.Abp.Swashbuckle" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" />
@ -73,10 +71,9 @@
<ItemGroup>
<ProjectReference Include="..\..\modules\blob-management\LINGYUN.Abp.BlobStoring.BlobManagement\LINGYUN.Abp.BlobStoring.BlobManagement.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj" />
<ProjectReference Include="..\..\modules\realtime-notifications\LINGYUN.Abp.Notifications.EntityFrameworkCore\LINGYUN.Abp.Notifications.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.Session.AspNetCore\LINGYUN.Abp.Identity.Session.AspNetCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\localization-management\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\platform\LINGYUN.Abp.Emailing.Platform\LINGYUN.Abp.Emailing.Platform.csproj" />
<ProjectReference Include="..\..\modules\platform\LINGYUN.Abp.Sms.Platform\LINGYUN.Abp.Sms.Platform.csproj" />
@ -90,12 +87,13 @@
<ItemGroup>
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Agents.Blazor\LINGYUN.Abp.ElsaNext.Agents.Blazor.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.ApprovalFlow.Activities\LINGYUN.Abp.ElsaNext.ApprovalFlow.Activities.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.AntFlowDesign\LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.AntFlowDesign.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore\LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.ApprovalFlow.HttpApi\LINGYUN.Abp.ElsaNext.ApprovalFlow.HttpApi.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.Identity\LINGYUN.Abp.ElsaNext.ApprovalFlow.Domain.Identity.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.BlobStoring\LINGYUN.Abp.ElsaNext.BlobStoring.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Email\LINGYUN.Abp.ElsaNext.Email.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.MySQL\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.MySQL.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.PostgreSql\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.PostgreSql.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.Sqlite\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.Sqlite.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.SqlServer\LINGYUN.Abp.ElsaNext.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Labels\LINGYUN.Abp.ElsaNext.Labels.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Notifications\LINGYUN.Abp.ElsaNext.Notifications.csproj" />
<ProjectReference Include="..\..\modules\elsa\LINGYUN.Abp.ElsaNext.Secrets.Blazor\LINGYUN.Abp.ElsaNext.Secrets.Blazor.csproj" />
@ -116,6 +114,7 @@
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.MicroService.ServiceDefaults\LINGYUN.Abp.MicroService.ServiceDefaults.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore\LINGYUN.Abp.MicroService.WorkflowService.EntityFrameworkCore.csproj" />
</ItemGroup>

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Navigation/UserMenuContributor.cs

@ -1,4 +1,4 @@
using Localization.Resources.AbpUi;
using Localization.Resources.AbpUi;
using System.Threading.Tasks;
using Volo.Abp.UI.Navigation;

4
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Program.cs

@ -1,4 +1,6 @@
using LINGYUN.Abp.MicroService.WorkflowService;
using Elsa.Extensions;
using Elsa.Http;
using LINGYUN.Abp.MicroService.WorkflowService;
using LINGYUN.Abp.MicroService.WorkflowService.Components;
using LINGYUN.Abp.Serilog.Enrichers.Application;
using Microsoft.AspNetCore.Builder;

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Swashbuckle/AspNetCore/SwaggerGen/EnumDescriptionSchemaFilter.cs

@ -1,4 +1,4 @@
using Microsoft.OpenApi;
using Microsoft.OpenApi;
using System;
using System.ComponentModel;
using System.Reflection;

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/Swashbuckle/AspNetCore/SwaggerGen/TenantHeaderParamter.cs

@ -1,4 +1,4 @@
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi;
using System.Collections.Generic;
using Volo.Abp.AspNetCore.MultiTenancy;

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.Configure.cs

@ -1,4 +1,4 @@
using DotNetCore.CAP;
using DotNetCore.CAP;
using Elsa.Extensions;
using Elsa.Persistence.EFCore.Extensions;
using Elsa.Studio.Authentication.OpenIdConnect.HttpMessageHandlers;

31
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.cs

@ -1,21 +1,20 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Authentication;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AspNetCore.Session;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.AuditLogging.IP.Location;
using LINGYUN.Abp.Authorization.OrganizationUnits;
using LINGYUN.Abp.BlobStoring.BlobManagement;
using LINGYUN.Abp.AspNetCore.Authentication;
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Dynamic.Definitions;
using LINGYUN.Abp.ElsaNext.Agents.Blazor;
using LINGYUN.Abp.ElsaNext.ApprovalFlow;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.Activities;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.EntityFrameworkCore;
using LINGYUN.Abp.ElsaNext.BlobStoring;
using LINGYUN.Abp.ElsaNext.Email;
using LINGYUN.Abp.ElsaNext.EntityFrameworkCore;
using LINGYUN.Abp.ElsaNext.EntityFrameworkCore.MySQL;
using LINGYUN.Abp.ElsaNext.EntityFrameworkCore.PostgreSql;
using LINGYUN.Abp.ElsaNext.EntityFrameworkCore.Sqlite;
using LINGYUN.Abp.ElsaNext.EntityFrameworkCore.SqlServer;
using LINGYUN.Abp.ElsaNext.ApprovalFlow.FormDefinitions;
using LINGYUN.Abp.ElsaNext.Labels;
using LINGYUN.Abp.ElsaNext.Notifications;
using LINGYUN.Abp.ElsaNext.Secrets.Blazor;
@ -31,11 +30,14 @@ using LINGYUN.Abp.ElsaNext.Studio.Labels.Blazor;
using LINGYUN.Abp.ElsaNext.Studio.Notifications.Blazor;
using LINGYUN.Abp.ElsaNext.Studio.Saas.Blazor;
using LINGYUN.Abp.ElsaNext.Studio.Webhooks.Blazor;
using LINGYUN.Abp.ElsaNext.UserTasks;
using LINGYUN.Abp.ElsaNext.UserTasks.EntityFrameworkCore;
using LINGYUN.Abp.ElsaNext.Webhooks;
using LINGYUN.Abp.Emailing.Platform;
using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Http.Client.Wrapper;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.IP2Region;
using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
@ -59,7 +61,6 @@ using Volo.Abp.Autofac;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Http.Client.IdentityModel.Web;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
@ -78,10 +79,19 @@ namespace LINGYUN.Abp.MicroService.WorkflowService;
typeof(AbpBlobStoringBlobManagementModule),
typeof(AbpElsaNextBlobStoringModule),
typeof(AbpElsaNextApprovalFlowActivitiesModule),
typeof(AbpElsaNextApprovalFlowEntityFrameworkCoreModule),
typeof(WorkflowServiceMigrationsEntityFrameworkCoreModule),
typeof(AbpElsaNextApprovalFlowHttpApiModule),
typeof(AbpElsaNextEmailModule),
typeof(AbpElsaNextLabelsModule),
typeof(AbpElsaNextNotificationsModule),
typeof(AbpElsaNextWebhooksModule),
typeof(AbpElsaNextApprovalFlowDomainIdentityModule),
typeof(AbpElsaNextUserTasksModule),
typeof(AbpElsaNextUserTasksEntityFrameworkCoreModule),
typeof(AbpElsaNextServerModule),
typeof(AbpElsaNextStudioBlazorModule),
typeof(AbpElsaNextAgentsBlazorModule),
@ -96,10 +106,6 @@ namespace LINGYUN.Abp.MicroService.WorkflowService;
typeof(AbpElsaNextStudioNotificationsBlazorModule),
typeof(AbpElsaNextStudioSaasBlazorModule),
typeof(AbpElsaNextStudioWebhooksBlazorModule),
typeof(AbpElsaNextEntityFrameworkCoreMySQLModule),
typeof(AbpElsaNextEntityFrameworkCorePostgreSqlModule),
typeof(AbpElsaNextEntityFrameworkCoreSqliteModule),
typeof(AbpElsaNextEntityFrameworkCoreSqlServerModule),
typeof(AbpEmailingExceptionHandlingModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
@ -132,7 +138,6 @@ namespace LINGYUN.Abp.MicroService.WorkflowService;
typeof(AbpEmailingPlatformModule),
typeof(AbpAspNetCoreAuthenticationModule),
typeof(AbpAspNetCoreSessionModule),
typeof(AbpAspNetCoreMvcNewtonsoftModule),
typeof(AbpAspNetCoreHttpOverridesModule),
typeof(AbpDynamicDefinitionsModule),
typeof(AbpAutofacModule)

12
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/appsettings.Development.json

@ -1,4 +1,9 @@
{
{
"WorkflowService": {
"EfCore": {
"AutoMigrate": true
}
},
"IPLocation": {
"RemoveCountry": [ "中国" ]
},
@ -129,6 +134,11 @@
}
}
},
"ApprovalFlow": {
"MaxApproversPerNode": 200,
"RequireCommentOnReject": true,
"DiscloseApprovers": true
},
"Server": {
"EnableRealTimeWorkflows": true
},

56
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities/README.md

@ -1,30 +1,30 @@
# LINGYUN.Abp.Elsa.Activities
常用Activity集成
## 配置使用
```csharp
[DependsOn(
typeof(AbpElsaActivitiesModule)
)]
public class YouProjectModule : AbpModule
{
}
```
## appsettings.json
```json
{
"Elsa": {
"BlobStoring": true,
"Emailing": true,
"Notification": true,
"Sms": true,
"IM": true,
"PublishWebhook": true
# LINGYUN.Abp.Elsa.Activities
常用Activity集成
## 配置使用
```csharp
[DependsOn(
typeof(AbpElsaActivitiesModule)
)]
public class YouProjectModule : AbpModule
{
}
```
## appsettings.json
```json
{
"Elsa": {
"BlobStoring": true,
"Emailing": true,
"Notification": true,
"Sms": true,
"IM": true,
"PublishWebhook": true
}
}
}
```

2
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor/Widgets/ExecutionTrendWidget.razor

@ -4,7 +4,7 @@
@if (Context.Snapshot != null)
{
var response = Context.Snapshot.Trend;
var response = Context.Snapshot.Trend!;
<MudPaper Outlined="true" Elevation="0" Class="dashboard-panel dashboard-section dashboard-chart-panel" Style="@DashboardStyles.ChartPanel">
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="dashboard-section-header" Style="@DashboardStyles.SectionHeader">

2
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.Studio.Dashboard.Blazor/Widgets/RecentActivityWidget.razor

@ -4,7 +4,7 @@
@if (Context.Snapshot != null)
{
var items = Context.Snapshot.RecentActivity.Items;
var items = Context.Snapshot.RecentActivity!.Items;
<MudPaper Outlined="true" Elevation="0" Class="dashboard-panel dashboard-section" Style="@DashboardStyles.Panel">
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="dashboard-section-header" Style="@DashboardStyles.SectionHeader">

11
aspnet-core/modules/elsa/LINGYUN.Abp.ElsaNext.UserTasks.EntityFrameworkCore.PostgreSql/LINGYUN/Abp/ElsaNext/UserTasks/EntityFrameworkCore/PostgreSql/AbpElsaNextUserTasksEntityFrameworkCorePostgreSqlModule.cs

@ -1,4 +1,5 @@
using Elsa.UserTasks.Persistence.EFCore.Features;
using Elsa.Persistence.EFCore;
using Elsa.UserTasks.Persistence.EFCore.Features;
using Elsa.UserTasks.Persistence.EFCore.PostgreSql.Extensions;
using LINGYUN.Abp.ElsaNext.EntityFrameworkCore.Extensions;
using Microsoft.Extensions.Configuration;
@ -28,4 +29,12 @@ public class AbpElsaNextUserTasksEntityFrameworkCorePostgreSqlModule : AbpModule
});
}
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
if (context.IsElsaFeatureEnabled("UserTasks:EfCore:PostgreSql"))
{
context.Services.AddScoped<IEntityModelCreatingHandler, UserTaskPostgreSqlModelConfigurator>();
}
}
}

Loading…
Cancel
Save