diff --git a/base/res_condition.go b/base/res_condition.go index 9232cd8..191714f 100644 --- a/base/res_condition.go +++ b/base/res_condition.go @@ -19,6 +19,24 @@ type ResCondition struct { 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 type GetOrmConditionByRes func(categoryUuid string, describe string) contracts.Condition