Files
orbit/weave/model/pending_advance.go

27 lines
1017 B
Go
Raw 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 (
"time"
core "git.yuntuo.hk/k2safe/orbit/model"
)
// PendingAdvance 表示暂停或分批推进后的续接检查点,避免仅依赖内存唤醒。
// 对应表 weave_pending_advances;这是服务端持久化模型,不直接作为 API 响应。
type PendingAdvance struct {
// Record 包含命名空间、记录标识、并发版本和 UTC 时间。
core.Record
// WorkflowID 所属流程实例标识。
WorkflowID core.ID `db:"workflow_id"`
// StepID 所属逻辑步骤标识。
StepID core.ID `db:"step_id"`
// ExpectedStepRevision 恢复推进时要求的步骤版本,避免使用过期检查点。
ExpectedStepRevision uint64 `db:"expected_step_revision"`
// Checkpoint 分批或暂停后继续推进所需的持久化 JSON 检查点。
Checkpoint core.JSON `db:"checkpoint"`
// AvailableAt 最早可被领取或处理的时间,统一 UTC。
AvailableAt time.Time `db:"available_at"`
}
func (PendingAdvance) TableName() string { return "weave_pending_advances" }