♻️ Refactor av

This commit is contained in:
Daniel 2025-06-08 12:08:31 +08:00
parent d80bed7b85
commit 9fd0565a61
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 31 additions and 19 deletions

View file

@ -16,13 +16,17 @@
package av
// Calculable 接口定义了可计算的视图类型。
type Calculable interface {
CalcCols()
// Calc 根据视图中设置的计算规则进行计算。
Calc()
}
// ColumnCalc 描述了列(字段)计算操作和结果的结构。
type ColumnCalc struct {
Operator CalcOperator `json:"operator"`
Result *Value `json:"result"`
Operator CalcOperator `json:"operator"` // 计算操作符
Result *Value `json:"result"` // 计算结果
}
type CalcOperator string