diff --git a/base/res_relation.go b/base/res_relation.go index b656ea1..71f0e4a 100644 --- a/base/res_relation.go +++ b/base/res_relation.go @@ -1,5 +1,9 @@ package base +import ( + "git.fsdpf.net/go/contracts" +) + type ResRelation struct { Uuid string `db:"uuid"` CategoryUuid string `db:"category_uuid"` // 所属 UUID @@ -16,9 +20,11 @@ type ResRelation struct { type GetResRelations func(categoryUuid string) []ResRelation +type GetOrmJoinsByResRelations func(root string, items []ResRelation) []contracts.Join + // 资源关联依赖 -func GetJoinResDependencies(code string, items []ResRelation) (dependencies []string) { - dependencies = []string{code} +func GetJoinResDependencies(root string, items []ResRelation) (dependencies []string) { + dependencies = []string{root} for { done := true