[feat] 统一 ORM 扩展条件入口
This commit is contained in:
parent
ba0d080e14
commit
57904565f3
@ -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
|
||||
|
4
orm.go
4
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
|
||||
|
Loading…
Reference in New Issue
Block a user