[doc] 注释

This commit is contained in:
what 2024-07-04 15:50:15 +08:00
parent 57904565f3
commit 692e59e54e

View File

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