重构: 接口层同步 ResFlags 重命名,Model.SetAuthDB 改名 SetPermission

HttpController.AuthDB()、OrmController.AuthDB() 类型从 req.ResScope 同步成 req.ResFlags。Model.SetAuthDB 改名 SetPermission(req.ResFlags),跟 req-v2 新的位标志权限体系对齐;OrmController.AuthDB() 暂不改名,范围只限 orm 这块。
This commit is contained in:
2026-07-22 14:04:49 +08:00
parent 8b122816a1
commit c3618adb02
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -62,5 +62,5 @@ type HttpController interface {
Call(code string, params map[string]any, category ...req.RouteMatchOption) (req.HttpResponse, error) Call(code string, params map[string]any, category ...req.RouteMatchOption) (req.HttpResponse, error)
// AuthDB 返回当前控制器的数据库权限模式。 // AuthDB 返回当前控制器的数据库权限模式。
AuthDB() req.ResScope AuthDB() req.ResFlags
} }
+2 -2
View File
@@ -83,7 +83,7 @@ type Model interface {
SetQueryField(...req.QueryField) SetQueryField(...req.QueryField)
// SetRelationResult(code string, items []reflux.R) // SetRelationResult(code string, items []reflux.R)
GetJoinsCode() []string GetJoinsCode() []string
SetAuthDB(req.ResScope) SetPermission(req.ResFlags)
SetOrderBy(params ...OrderBy) Model SetOrderBy(params ...OrderBy) Model
SetGroupBy(params ...GroupBy) Model SetGroupBy(params ...GroupBy) Model
SetJoin(Join) Model SetJoin(Join) Model
@@ -103,7 +103,7 @@ type Model interface {
} }
type OrmController interface { type OrmController interface {
AuthDB() req.ResScope AuthDB() req.ResFlags
} }
type OrderBy interface { type OrderBy interface {