diff --git a/helper/orm.go b/helper/orm.go index 3acce88..d00eb31 100644 --- a/helper/orm.go +++ b/helper/orm.go @@ -12,7 +12,7 @@ import ( // @param rResource 链接父模型 // @param rField 连接父模型字段, 如 xx_id // @param rForeignKey 关联外键, 如 id -type NewOrmRelationModel func(t contracts.RelationType, m contracts.Model, rResource, rField, rForeignKey string) contracts.Model +type NewOrmRelation func(t contracts.RelationType, m contracts.Model, rResource, rField, rForeignKey string) contracts.Model type NewOrmJoin func(t contracts.RelationType, res contracts.Resource, alias, rResource, rField, rForeignKey string) contracts.Join @@ -24,6 +24,8 @@ type NewOrmConditionFuncExpr func(rResource, rField, token string, operator cont type NewOrmConditionByRes func(items []base.ResCondition) contracts.Condition +type NewOrmQueryWithRecursive func(pField, cField string, root any, isWithoutCondition bool, depth int) contracts.QueryWithRecursive + type NewOrmQueryField func(rField base.ResField, t contracts.QueryDataType, alias string, options int) contracts.QueryField type NewOrmOrderBy func(sql string, direction contracts.OrderByDirection) contracts.OrderBy