feat: establish Orbit models, migrations and development baseline
This commit is contained in:
26
weave/model/definition_version.go
Normal file
26
weave/model/definition_version.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
core "git.yuntuo.hk/k2safe/orbit/model"
|
||||
)
|
||||
|
||||
// DefinitionVersion 表示已发布的不可变流程定义版本。
|
||||
// 对应表 weave_definition_versions;这是服务端持久化模型,不直接作为 API 响应。
|
||||
type DefinitionVersion struct {
|
||||
// Record 包含命名空间、记录标识、并发版本和 UTC 时间。
|
||||
core.Record
|
||||
// DefinitionID 稳定流程定义标识。
|
||||
DefinitionID core.ID `db:"definition_id"`
|
||||
// Version 不可变发布版本;同版本不同内容必须拒绝。
|
||||
Version string `db:"version"`
|
||||
// SchemaVersion 流程定义文档的结构版本。
|
||||
SchemaVersion uint32 `db:"schema_version"`
|
||||
// Specification 版本化规则定义 JSON;发布后禁止原地修改。
|
||||
Specification core.JSON `db:"specification"`
|
||||
// ContentDigest 不可变定义内容的 SHA-256 摘要。
|
||||
ContentDigest core.Digest `db:"content_digest"`
|
||||
// PublishedBy 发布版本的认证主体,用于追溯发布来源。
|
||||
PublishedBy string `db:"published_by"`
|
||||
}
|
||||
|
||||
func (DefinitionVersion) TableName() string { return "weave_definition_versions" }
|
||||
Reference in New Issue
Block a user