优化结构

This commit is contained in:
Yvan
2026-08-28 16:37:53 +08:00
parent 295ee5c49e
commit 6f9908d926
14 changed files with 56 additions and 58 deletions
+5
View File
@@ -4,6 +4,7 @@ import (
"database/sql"
"errors"
"kra/internal/biz/system"
datasystem "kra/internal/data/system"
"log/slog"
"reflect"
"strings"
@@ -13,6 +14,10 @@ import (
"gorm.io/gorm/schema"
)
// dataAccessLogPO is the infrastructure-side write model used by GORM
// callbacks. The system module owns the query repository for the same table.
type dataAccessLogPO = datasystem.DataAccessLogPO
// registerDataScopeCallbacks installs the global GORM data-scope engine.
// System tables are deliberately excluded: their access is controlled by
// Casbin, while ownership columns on business tables are row-level scope.