feat(workflow): 添加工作流实例配置的版本和代码字段

- 添加 DefinitionVersion 属性用于存储启动时绑定的流程定义版本号
- 添加 DefinitionCode 属性用于存储启动时快照的流程定义Code
- 为新字段添加相应的数据库注释和长度限制
This commit is contained in:
xiangning 2026-07-03 13:32:18 +08:00
parent 8f85a2d3c8
commit f04863fb64

View File

@ -16,6 +16,8 @@ public class WorkflowInstanceConfiguration : IEntityTypeConfiguration<WorkflowIn
builder.HasKey(e => e.Id);
builder.Property(e => e.Id).ValueGeneratedNever().HasComment("主键ID");
builder.Property(e => e.DefinitionId).HasComment("关联的工作流定义ID");
builder.Property(e => e.DefinitionVersion).HasComment("启动时绑定的流程定义版本号(版本隔离)");
builder.Property(e => e.DefinitionCode).HasMaxLength(200).HasComment("启动时快照的流程定义Code(审计追溯)");
builder.Property(e => e.Title).HasMaxLength(500).HasComment("流程实例标题");
builder.Property(e => e.Status).HasComment("实例状态(Running/Suspended/Completed/Terminated)");
builder.Property(e => e.Variables).HasColumnType("jsonb").HasComment("流程变量JSON");