feat: establish Orbit models, migrations and development baseline

This commit is contained in:
2026-09-17 07:04:21 +08:00
commit 4f2935e36f
84 changed files with 4915 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package model
import (
core "git.yuntuo.hk/k2safe/orbit/model"
)
// ExecutionGate 表示通用执行门控,协调暂停与新执行授权的竞争。
// 对应表 pulse_execution_gates;这是服务端持久化模型,不直接作为 API 响应。
type ExecutionGate struct {
// Record 包含命名空间、记录标识、并发版本和 UTC 时间。
core.Record
// Paused 暂停标记;停止新的受控工作,不表示在途请求已停止。
Paused bool `db:"paused"`
// ControlRevision 暂停、继续等控制操作的版本,避免旧操作覆盖新决定。
ControlRevision uint64 `db:"control_revision"`
// Reason 操作原因或处理说明,需要保留审计信息;可为空,表示尚未设置该关联或值。
Reason *string `db:"reason"`
}
func (ExecutionGate) TableName() string { return "pulse_execution_gates" }