chore(dao): gf gen dao 刷新健康度两张表的生成注释
迁移 000017 执行后重跑 gf gen dao,把修正后的列注释同步进 entity/do/dao。 纯注释变更,无字段与类型改动——entity 中 success_rate / latency_ms / health_score 仍为 float64(非金额小数,符合 float64/decimal 分类规范)。 此前 entity 里 health_score 的注释写着已废止的四因子加权公式,是全链路唯一会 主动误导后来人的地方,至此与实现对齐。
This commit is contained in:
1 parent
1f3489c37d
commit
d12ea0566d
6 files changed
+36
-36
No files matched your search
@@ -23,12 +23,12 @@ type ChnHealthScoresDao struct {
|
||||
type ChnHealthScoresColumns struct {
|
||||
Id string // 主键ID
|
||||
ChannelId string // 关联渠道ID
|
||||
SuccessRate string // 请求成功率(0-100)
|
||||
LatencyMs string // 平均延迟(毫秒)
|
||||
StabilityScore string // 稳定性评分(0-100,基于延迟波动计算)
|
||||
ConsecutiveFailures string // 连续失败次数(成功后归零)
|
||||
HealthScore string // 综合健康度(0-100)= 成功率×0.40 + 延迟分×0.25 + 稳定性×0.20 + 连续失败分×0.15
|
||||
CalculatedAt string // 最近一次计算时间
|
||||
SuccessRate string // 成功率(0-100)= 该渠道各模型 succ_ewma 均值×100,仅统计有真实上报的模型
|
||||
LatencyMs string // 平均延迟(毫秒)= 该渠道各模型 lat_ewma 均值,仅统计有真实上报的模型;仅展示用,不参与健康分计算
|
||||
StabilityScore string // 【已废弃】稳定性评分,健康体系重写后不再写入,保留列仅为兼容历史数据
|
||||
ConsecutiveFailures string // 【已废弃】连续失败次数,已由 Redis 熔断器的滑动窗口计数取代(dispatch:v1:breaker:*),保留列仅为兼容历史数据
|
||||
HealthScore string // 综合健康度(0-100)= avg(succ_ewma)^α × 100,α 取路由策略 health.alpha(默认 2),与调度 healthFactor 同源;每 5 分钟由维护任务聚合落盘,另可由渠道测试/重置健康度即时触发;Redis 读失败或全部模型无真实上报时保留旧值不覆盖。调度决策不读此表,仅供管理后台展示
|
||||
CalculatedAt string // 最近一次聚合落盘时间
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ type ChnHealthSnapshotsDao struct {
|
||||
type ChnHealthSnapshotsColumns struct {
|
||||
Id string // 主键ID
|
||||
ChannelId string // 关联渠道ID
|
||||
HealthScore string // 综合健康度(0-100)
|
||||
HealthScore string // 综合健康度(0-100)快照,取自 chn_health_scores.health_score
|
||||
SuccessRate string // 请求成功率(0-100)
|
||||
LatencyMs string // 平均延迟(毫秒)
|
||||
StabilityScore string // 稳定性评分(0-100)
|
||||
ConsecutiveFailures string // 连续失败次数
|
||||
StabilityScore string // 【已废弃】稳定性评分,不再写入,新快照为 0
|
||||
ConsecutiveFailures string // 【已废弃】连续失败次数,不再写入,新快照为 0
|
||||
SnapshotAt string // 快照时间
|
||||
}
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ type ChnHealthScores struct {
|
||||
g.Meta `orm:"table:chn_health_scores, do:true"`
|
||||
Id any // 主键ID
|
||||
ChannelId any // 关联渠道ID
|
||||
SuccessRate any // 请求成功率(0-100)
|
||||
LatencyMs any // 平均延迟(毫秒)
|
||||
StabilityScore any // 稳定性评分(0-100,基于延迟波动计算)
|
||||
ConsecutiveFailures any // 连续失败次数(成功后归零)
|
||||
HealthScore any // 综合健康度(0-100)= 成功率×0.40 + 延迟分×0.25 + 稳定性×0.20 + 连续失败分×0.15
|
||||
CalculatedAt *gtime.Time // 最近一次计算时间
|
||||
SuccessRate any // 成功率(0-100)= 该渠道各模型 succ_ewma 均值×100,仅统计有真实上报的模型
|
||||
LatencyMs any // 平均延迟(毫秒)= 该渠道各模型 lat_ewma 均值,仅统计有真实上报的模型;仅展示用,不参与健康分计算
|
||||
StabilityScore any // 【已废弃】稳定性评分,健康体系重写后不再写入,保留列仅为兼容历史数据
|
||||
ConsecutiveFailures any // 【已废弃】连续失败次数,已由 Redis 熔断器的滑动窗口计数取代(dispatch:v1:breaker:*),保留列仅为兼容历史数据
|
||||
HealthScore any // 综合健康度(0-100)= avg(succ_ewma)^α × 100,α 取路由策略 health.alpha(默认 2),与调度 healthFactor 同源;每 5 分钟由维护任务聚合落盘,另可由渠道测试/重置健康度即时触发;Redis 读失败或全部模型无真实上报时保留旧值不覆盖。调度决策不读此表,仅供管理后台展示
|
||||
CalculatedAt *gtime.Time // 最近一次聚合落盘时间
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
@@ -14,10 +14,10 @@ type ChnHealthSnapshots struct {
|
||||
g.Meta `orm:"table:chn_health_snapshots, do:true"`
|
||||
Id any // 主键ID
|
||||
ChannelId any // 关联渠道ID
|
||||
HealthScore any // 综合健康度(0-100)
|
||||
HealthScore any // 综合健康度(0-100)快照,取自 chn_health_scores.health_score
|
||||
SuccessRate any // 请求成功率(0-100)
|
||||
LatencyMs any // 平均延迟(毫秒)
|
||||
StabilityScore any // 稳定性评分(0-100)
|
||||
ConsecutiveFailures any // 连续失败次数
|
||||
StabilityScore any // 【已废弃】稳定性评分,不再写入,新快照为 0
|
||||
ConsecutiveFailures any // 【已废弃】连续失败次数,不再写入,新快照为 0
|
||||
SnapshotAt *gtime.Time // 快照时间
|
||||
}
|
||||
@@ -10,14 +10,14 @@ import (
|
||||
|
||||
// ChnHealthScores is the golang structure for table chn_health_scores.
|
||||
type ChnHealthScores struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
|
||||
ChannelId int64 `json:"channel_id" orm:"channel_id" description:"关联渠道ID"` // 关联渠道ID
|
||||
SuccessRate float64 `json:"success_rate" orm:"success_rate" description:"请求成功率(0-100)"` // 请求成功率(0-100)
|
||||
LatencyMs float64 `json:"latency_ms" orm:"latency_ms" description:"平均延迟(毫秒)"` // 平均延迟(毫秒)
|
||||
StabilityScore float64 `json:"stability_score" orm:"stability_score" description:"稳定性评分(0-100,基于延迟波动计算)"` // 稳定性评分(0-100,基于延迟波动计算)
|
||||
ConsecutiveFailures int `json:"consecutive_failures" orm:"consecutive_failures" description:"连续失败次数(成功后归零)"` // 连续失败次数(成功后归零)
|
||||
HealthScore float64 `json:"health_score" orm:"health_score" description:"综合健康度(0-100)= 成功率×0.40 + 延迟分×0.25 + 稳定性×0.20 + 连续失败分×0.15"` // 综合健康度(0-100)= 成功率×0.40 + 延迟分×0.25 + 稳定性×0.20 + 连续失败分×0.15
|
||||
CalculatedAt *gtime.Time `json:"calculated_at" orm:"calculated_at" description:"最近一次计算时间"` // 最近一次计算时间
|
||||
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
|
||||
ChannelId int64 `json:"channel_id" orm:"channel_id" description:"关联渠道ID"` // 关联渠道ID
|
||||
SuccessRate float64 `json:"success_rate" orm:"success_rate" description:"成功率(0-100)= 该渠道各模型 succ_ewma 均值×100,仅统计有真实上报的模型"` // 成功率(0-100)= 该渠道各模型 succ_ewma 均值×100,仅统计有真实上报的模型
|
||||
LatencyMs float64 `json:"latency_ms" orm:"latency_ms" description:"平均延迟(毫秒)= 该渠道各模型 lat_ewma 均值,仅统计有真实上报的模型;仅展示用,不参与健康分计算"` // 平均延迟(毫秒)= 该渠道各模型 lat_ewma 均值,仅统计有真实上报的模型;仅展示用,不参与健康分计算
|
||||
StabilityScore float64 `json:"stability_score" orm:"stability_score" description:"【已废弃】稳定性评分,健康体系重写后不再写入,保留列仅为兼容历史数据"` // 【已废弃】稳定性评分,健康体系重写后不再写入,保留列仅为兼容历史数据
|
||||
ConsecutiveFailures int `json:"consecutive_failures" orm:"consecutive_failures" description:"【已废弃】连续失败次数,已由 Redis 熔断器的滑动窗口计数取代(dispatch:v1:breaker:*),保留列仅为兼容历史数据"` // 【已废弃】连续失败次数,已由 Redis 熔断器的滑动窗口计数取代(dispatch:v1:breaker:*),保留列仅为兼容历史数据
|
||||
HealthScore float64 `json:"health_score" orm:"health_score" description:"综合健康度(0-100)= avg(succ_ewma)^α × 100,α 取路由策略 health.alpha(默认 2),与调度 healthFactor 同源;每 5 分钟由维护任务聚合落盘,另可由渠道测试/重置健康度即时触发;Redis 读失败或全部模型无真实上报时保留旧值不覆盖。调度决策不读此表,仅供管理后台展示"` // 综合健康度(0-100)= avg(succ_ewma)^α × 100,α 取路由策略 health.alpha(默认 2),与调度 healthFactor 同源;每 5 分钟由维护任务聚合落盘,另可由渠道测试/重置健康度即时触发;Redis 读失败或全部模型无真实上报时保留旧值不覆盖。调度决策不读此表,仅供管理后台展示
|
||||
CalculatedAt *gtime.Time `json:"calculated_at" orm:"calculated_at" description:"最近一次聚合落盘时间"` // 最近一次聚合落盘时间
|
||||
CreatedAt *gtime.Time `json:"created_at" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updated_at" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
}
|
||||
@@ -10,12 +10,12 @@ import (
|
||||
|
||||
// ChnHealthSnapshots is the golang structure for table chn_health_snapshots.
|
||||
type ChnHealthSnapshots struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
|
||||
ChannelId int64 `json:"channel_id" orm:"channel_id" description:"关联渠道ID"` // 关联渠道ID
|
||||
HealthScore float64 `json:"health_score" orm:"health_score" description:"综合健康度(0-100)"` // 综合健康度(0-100)
|
||||
SuccessRate float64 `json:"success_rate" orm:"success_rate" description:"请求成功率(0-100)"` // 请求成功率(0-100)
|
||||
LatencyMs float64 `json:"latency_ms" orm:"latency_ms" description:"平均延迟(毫秒)"` // 平均延迟(毫秒)
|
||||
StabilityScore float64 `json:"stability_score" orm:"stability_score" description:"稳定性评分(0-100)"` // 稳定性评分(0-100)
|
||||
ConsecutiveFailures int `json:"consecutive_failures" orm:"consecutive_failures" description:"连续失败次数"` // 连续失败次数
|
||||
SnapshotAt *gtime.Time `json:"snapshot_at" orm:"snapshot_at" description:"快照时间"` // 快照时间
|
||||
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
|
||||
ChannelId int64 `json:"channel_id" orm:"channel_id" description:"关联渠道ID"` // 关联渠道ID
|
||||
HealthScore float64 `json:"health_score" orm:"health_score" description:"综合健康度(0-100)快照,取自 chn_health_scores.health_score"` // 综合健康度(0-100)快照,取自 chn_health_scores.health_score
|
||||
SuccessRate float64 `json:"success_rate" orm:"success_rate" description:"请求成功率(0-100)"` // 请求成功率(0-100)
|
||||
LatencyMs float64 `json:"latency_ms" orm:"latency_ms" description:"平均延迟(毫秒)"` // 平均延迟(毫秒)
|
||||
StabilityScore float64 `json:"stability_score" orm:"stability_score" description:"【已废弃】稳定性评分,不再写入,新快照为 0"` // 【已废弃】稳定性评分,不再写入,新快照为 0
|
||||
ConsecutiveFailures int `json:"consecutive_failures" orm:"consecutive_failures" description:"【已废弃】连续失败次数,不再写入,新快照为 0"` // 【已废弃】连续失败次数,不再写入,新快照为 0
|
||||
SnapshotAt *gtime.Time `json:"snapshot_at" orm:"snapshot_at" description:"快照时间"` // 快照时间
|
||||
}
|
||||
Reference in new issue
Block a user