diff --git a/base/res_query_extend.go b/base/res_query_extend.go index e671301..167ba4d 100644 --- a/base/res_query_extend.go +++ b/base/res_query_extend.go @@ -1,9 +1,5 @@ package base -import ( - "git.fsdpf.net/go/contracts" -) - type ResQueryExtend struct { Uuid string `db:"uuid"` Category int64 `db:"category"` // 类型, 0=排序,1=分组 @@ -17,5 +13,3 @@ type ResQueryExtend struct { } type GetResQueryExtends func(categoryUuid string, category int64) []ResQueryExtend -type GetOrderByResQueryExtends func(items ...ResQueryExtend) contracts.OrderBy -type GetGroupByResQueryExtends func(items ...ResQueryExtend) contracts.GroupBy diff --git a/orm.go b/orm.go index d43cd9c..b3c9c1c 100644 --- a/orm.go +++ b/orm.go @@ -140,3 +140,7 @@ type NewOrmModel func(res req.Resource, code, name string) Model type NewOrm func(res req.Resource, tx *db.Transaction) Orm type GetOrmConditions func(categoryUuid string, opts ...condition.Option) *condition.Condition + +type GetOrmOrderBy func(categoryUuid string) []OrderBy + +type GetOrmGroupBy func(categoryUuid string) []GroupBy