namespace Admin.NET.Plugin.ApprovalFlow; /// /// 审批流程实例表 /// [SugarTable(null, "审批流程实例表")] [SugarIndex("idx_flowinstance_biztype_bizid", nameof(BizType), OrderByType.Asc, nameof(BizId), OrderByType.Asc)] [SugarIndex("idx_flowinstance_initiator", nameof(InitiatorId), OrderByType.Asc)] public class ApprovalFlowInstance : EntityBaseOrg { /// /// 关联流程定义 Id /// [SugarColumn(ColumnDescription = "流程定义Id")] public long FlowId { get; set; } /// /// 发起时的流程版本 /// [SugarColumn(ColumnDescription = "流程版本")] public int FlowVersion { get; set; } /// /// 业务类型编码 /// [SugarColumn(ColumnDescription = "业务类型编码", Length = 64)] [MaxLength(64)] public string BizType { get; set; } = ""; /// /// 关联业务单据 Id /// [SugarColumn(ColumnDescription = "业务单据Id")] public long BizId { get; set; } /// /// 业务单号(冗余) /// [SugarColumn(ColumnDescription = "业务单号", Length = 128, IsNullable = true)] [MaxLength(128)] public string? BizNo { get; set; } /// /// 流程标题 /// [SugarColumn(ColumnDescription = "流程标题", Length = 256)] [MaxLength(256)] public string Title { get; set; } = ""; /// /// 发起人 Id /// [SugarColumn(ColumnDescription = "发起人Id")] public long InitiatorId { get; set; } /// /// 发起人姓名(冗余) /// [SugarColumn(ColumnDescription = "发起人姓名", Length = 64, IsNullable = true)] [MaxLength(64)] public string? InitiatorName { get; set; } /// /// 流程状态 /// [SugarColumn(ColumnDescription = "流程状态")] public FlowInstanceStatusEnum Status { get; set; } /// /// 当前所在节点 Id /// [SugarColumn(ColumnDescription = "当前节点Id", Length = 64, IsNullable = true)] [MaxLength(64)] public string? CurrentNodeId { get; set; } /// /// 发起时的完整 FlowJson 快照(含节点属性) /// [SugarColumn(ColumnDescription = "FlowJson快照", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] public string? FlowJsonSnapshot { get; set; } /// /// 发起时间 /// [SugarColumn(ColumnDescription = "发起时间")] public DateTime StartTime { get; set; } /// /// 结束时间 /// [SugarColumn(ColumnDescription = "结束时间", IsNullable = true)] public DateTime? EndTime { get; set; } }