[feat] 新增 GetOrmJoinsByResRelations 方法
This commit is contained in:
parent
9426da7d6b
commit
e095ca8bc0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user