[feat] add NewOrm helper

This commit is contained in:
what 2023-04-20 20:34:20 +08:00
parent 1ce61a8377
commit ca259233c1

View File

@ -3,6 +3,7 @@ package helper
import ( import (
"git.fsdpf.net/go/contracts" "git.fsdpf.net/go/contracts"
"git.fsdpf.net/go/contracts/base" "git.fsdpf.net/go/contracts/base"
"git.fsdpf.net/go/db"
) )
// @title 创建关联模型 // @title 创建关联模型
@ -28,3 +29,5 @@ type NewOrmQueryField func(rField base.ResField, t contracts.QueryDataType, alia
type NewOrderBy func(sql string, direction contracts.OrderByDirection) contracts.OrderBy type NewOrderBy func(sql string, direction contracts.OrderByDirection) contracts.OrderBy
type NewGroupBy func(sql string) contracts.GroupBy type NewGroupBy func(sql string) contracts.GroupBy
type NewOrm func(res contracts.Resource, tx *db.Transaction) contracts.Orm