- gRPC auth service for token validation - Value comparator system (string, numeric, boolean, datetime, collection) - Condition evaluator with strategy chain - Form definition and data improvements - Workflow instance/task endpoints updated - Seed data and EF design-time factory - Test coverage for comparators and handlers
559 lines
19 KiB
C#
559 lines
19 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using Workflow.Infrastructure.Persistence;
|
|
|
|
#nullable disable
|
|
|
|
namespace Workflow.Infrastructure.Migrations
|
|
{
|
|
[DbContext(typeof(WorkflowDbContext))]
|
|
partial class WorkflowDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.FormData", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("DataJson")
|
|
.IsRequired()
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<Guid>("FormDefinitionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("InstanceId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("InstanceId");
|
|
|
|
b.ToTable("wf_form_data", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.FormDefinition", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("OperatorIP")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("SchemaJson")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Version")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Code");
|
|
|
|
b.ToTable("wf_form_definitions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.FormDefinitionField", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Config")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("DefaultValue")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("FieldKey")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<int>("FieldType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<Guid>("FormDefinitionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Label")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<bool>("Required")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("FormDefinitionId");
|
|
|
|
b.ToTable("wf_form_definition_fields", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowDefinition", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("DefinitionJson")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("OperatorIP")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Version")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Code");
|
|
|
|
b.ToTable("wf_workflow_definitions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowEdge", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Condition")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("DefinitionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("EdgeType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Label")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<int>("Order")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<Guid>("SourceNodeId")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("TargetNodeId")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DefinitionId");
|
|
|
|
b.ToTable("wf_workflow_edges", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowInstance", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime?>("CompletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("DefinitionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("InitiatorId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("ParentInstanceId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("ParentTokenId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("StartedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Variables")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DefinitionId");
|
|
|
|
b.ToTable("wf_workflow_instances", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowNode", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Config")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("DefinitionId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<int>("NodeType")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("PositionX")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("PositionY")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DefinitionId");
|
|
|
|
b.ToTable("wf_workflow_nodes", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowTask", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("AssigneeId")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("AssigneeRole")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("CandidateRoles")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("CandidateUsers")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("Comment")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("character varying(2000)");
|
|
|
|
b.Property<DateTime?>("CompletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("DelegatedFromId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime?>("DueAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("InstanceId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid>("NodeId")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("OperatorIP")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<string>("Result")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("character varying(500)");
|
|
|
|
b.Property<Guid>("TokenId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("InstanceId");
|
|
|
|
b.ToTable("wf_workflow_tasks", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowToken", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTime>("ArrivedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime?>("CompletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("InstanceId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("NodeId")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("UpdatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("InstanceId");
|
|
|
|
b.ToTable("wf_workflow_tokens", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.FormDefinitionField", b =>
|
|
{
|
|
b.HasOne("Workflow.Domain.Entities.FormDefinition", null)
|
|
.WithMany("Fields")
|
|
.HasForeignKey("FormDefinitionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowEdge", b =>
|
|
{
|
|
b.HasOne("Workflow.Domain.Entities.WorkflowDefinition", null)
|
|
.WithMany("Edges")
|
|
.HasForeignKey("DefinitionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowNode", b =>
|
|
{
|
|
b.HasOne("Workflow.Domain.Entities.WorkflowDefinition", null)
|
|
.WithMany("Nodes")
|
|
.HasForeignKey("DefinitionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowTask", b =>
|
|
{
|
|
b.HasOne("Workflow.Domain.Entities.WorkflowInstance", null)
|
|
.WithMany("Tasks")
|
|
.HasForeignKey("InstanceId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowToken", b =>
|
|
{
|
|
b.HasOne("Workflow.Domain.Entities.WorkflowInstance", null)
|
|
.WithMany("Tokens")
|
|
.HasForeignKey("InstanceId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.FormDefinition", b =>
|
|
{
|
|
b.Navigation("Fields");
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowDefinition", b =>
|
|
{
|
|
b.Navigation("Edges");
|
|
|
|
b.Navigation("Nodes");
|
|
});
|
|
|
|
modelBuilder.Entity("Workflow.Domain.Entities.WorkflowInstance", b =>
|
|
{
|
|
b.Navigation("Tasks");
|
|
|
|
b.Navigation("Tokens");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|