diff --git a/base/res_relation.go b/base/res_relation.go index 2e7890b..fad0301 100644 --- a/base/res_relation.go +++ b/base/res_relation.go @@ -51,6 +51,7 @@ func GetJoinResDependencies(root string, items []ResRelation) (dependencies []st return dependencies } +// 获取关联路径, [A, C, B] => [A -> B -> C] func GetModelPrefixForRelations(model string, items []ResRelation) (result []any) { result = append([]any{model}, result...) for _, item := range items { @@ -64,6 +65,7 @@ func GetModelPrefixForRelations(model string, items []ResRelation) (result []any return result } +// 获取关联路径, [A, C, B] => [A -> B -> C] func GetModelJoinsForRelations(model string, items []ResRelation) (result []string) { result = append([]string{model}, result...) for _, item := range items {