// 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("Id") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DataJson") .IsRequired() .HasColumnType("jsonb"); b.Property("FormDefinitionId") .HasColumnType("uuid"); b.Property("InstanceId") .HasColumnType("uuid"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("Description") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("OperatorIP") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("SchemaJson") .HasColumnType("jsonb"); b.Property("Status") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("UpdatedBy") .HasColumnType("uuid"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("Config") .HasColumnType("jsonb"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DefaultValue") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("FieldKey") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("FieldType") .HasColumnType("integer"); b.Property("FormDefinitionId") .HasColumnType("uuid"); b.Property("Label") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("Required") .HasColumnType("boolean"); b.Property("SortOrder") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("Code") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DefinitionJson") .HasColumnType("jsonb"); b.Property("Description") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("IsEnabled") .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("OperatorIP") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("Status") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("UpdatedBy") .HasColumnType("uuid"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("Condition") .HasColumnType("jsonb"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DefinitionId") .HasColumnType("uuid"); b.Property("EdgeType") .HasColumnType("integer"); b.Property("Label") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("Order") .HasColumnType("integer"); b.Property("SourceNodeId") .HasMaxLength(500) .HasColumnType("uuid"); b.Property("TargetNodeId") .HasMaxLength(500) .HasColumnType("uuid"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("CompletedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DefinitionId") .HasColumnType("uuid"); b.Property("InitiatorId") .HasColumnType("uuid"); b.Property("ParentInstanceId") .HasColumnType("uuid"); b.Property("ParentTokenId") .HasColumnType("uuid"); b.Property("StartedAt") .HasColumnType("timestamp with time zone"); b.Property("Status") .HasColumnType("integer"); b.Property("Title") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("UpdatedBy") .HasColumnType("uuid"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("Config") .HasColumnType("jsonb"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DefinitionId") .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("NodeType") .HasColumnType("integer"); b.Property("PositionX") .HasColumnType("integer"); b.Property("PositionY") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("AssigneeId") .HasMaxLength(500) .HasColumnType("uuid"); b.Property("AssigneeRole") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("CandidateRoles") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("CandidateUsers") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("Comment") .HasMaxLength(2000) .HasColumnType("character varying(2000)"); b.Property("CompletedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DelegatedFromId") .HasColumnType("uuid"); b.Property("DueAt") .HasColumnType("timestamp with time zone"); b.Property("InstanceId") .HasColumnType("uuid"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("NodeId") .HasMaxLength(500) .HasColumnType("uuid"); b.Property("OperatorIP") .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("Result") .HasColumnType("jsonb"); b.Property("Status") .HasColumnType("integer"); b.Property("Title") .IsRequired() .HasMaxLength(500) .HasColumnType("character varying(500)"); b.Property("TokenId") .HasColumnType("uuid"); b.Property("Type") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("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("Id") .HasColumnType("uuid"); b.Property("ArrivedAt") .HasColumnType("timestamp with time zone"); b.Property("CompletedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("InstanceId") .HasColumnType("uuid"); b.Property("NodeId") .HasMaxLength(500) .HasColumnType("uuid"); b.Property("Status") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("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 } } }