contracts/base/res_condition.go
2024-05-07 10:15:55 +08:00

39 lines
1.3 KiB
Go

package base
type ResCondition struct {
Id int `db:"id"`
Pid int `db:"pid"`
Type string `db:"type"`
CategoryUuid string `db:"category_uuid"`
Column string `db:"column"`
ColumnResource string `db:"columnResource"`
Operator string `db:"operator"`
ColumnSqlFunc string `db:"columnSqlFunc"`
ColumnSqlFuncParam string `db:"columnSqlFuncParam"`
IgnoreEmptyParma bool `db:"ignoreEmptyParma"`
ValueType string `db:"valueType"`
Value string `db:"value"`
UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"`
}
type ResWhere struct {
Type string `json:"type"`
Exprs []ResWhereExpr `json:"exprs"`
Children *[]ResWhere `json:"children"`
}
type ResWhereExpr struct {
Column string `json:"column"`
ColumnResource string `json:"columnResource"`
Operator string `json:"operator"`
ColumnSqlFunc string `json:"columnSqlFunc"`
ColumnSqlFuncParam string `json:"columnSqlFuncParam"`
IgnoreEmptyParma int `json:"ignoreEmptyParma"`
Value string `json:"value"`
ValueType string `json:"valueType"`
Enabled bool `json:"enabled"`
}
type GetResConditions func(categoryUuid string) []ResCondition