feat: establish Orbit models, migrations and development baseline
This commit is contained in:
26
weave/model/pending_advance.go
Normal file
26
weave/model/pending_advance.go
Normal file
@@ -0,0 +1,26 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user