feat: establish Orbit models, migrations and development baseline
This commit is contained in:
20
pulse/model/execution_gate.go
Normal file
20
pulse/model/execution_gate.go
Normal 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" }
|
||||
Reference in New Issue
Block a user