Browse Source
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
36 changed files with 4245 additions and 84 deletions
@ -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; |
|||
} |
|||
@ -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> |
|||
@ -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(); |
|||
} |
|||
@ -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; |
|||
} |
|||
} |
|||
@ -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 |
|||
{ |
|||
} |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Host=127.0.0.1;Database=abp;Username=postgres;Password=123456" |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
|||
<ConfigureAwait ContinueOnCapturedContext="false" /> |
|||
</Weavers> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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
|
|||
} |
|||
} |
|||
} |
|||
@ -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"); |
|||
} |
|||
} |
|||
} |
|||
@ -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
|
|||
} |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
} |
|||
} |
|||
@ -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
|
|||
} |
|||
} |
|||
} |
|||
@ -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) |
|||
{ |
|||
} |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
} |
|||
@ -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(); |
|||
}); |
|||
} |
|||
} |
|||
@ -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 |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
``` |
|||
Loading…
Reference in new issue