Files
orbit/weave/model/step.go

25 lines
980 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
import (
core "git.yuntuo.hk/k2safe/orbit/model"
)
// Step 表示实例中的逻辑步骤,指向该步骤当前的激活记录。
// 对应表 weave_steps;这是服务端持久化模型,不直接作为 API 响应。
type Step struct {
// Record 包含命名空间、记录标识、并发版本和 UTC 时间。
core.Record
// WorkflowID 所属流程实例标识。
WorkflowID core.ID `db:"workflow_id"`
// Key 定义中的稳定步骤键,在同一流程实例内唯一。
Key string `db:"key"`
// Kind 节点或等待类型,决定由哪类推进规则处理。
Kind NodeKind `db:"kind"`
// State 当前状态;只允许定义的状态转换并配合事务校验。
State StepState `db:"state"`
// CurrentActivationID 当前激活记录,必须属于本实例的本步骤;可为空,表示尚未设置该关联或值。
CurrentActivationID *core.ID `db:"current_activation_id"`
}
func (Step) TableName() string { return "weave_steps" }