feat(09-04): compile switch, date-range, and scope filters
- Filters keep typed values and only registered scope names - Raw conditions and arbitrary methods fail activation - Request localization copies labels and leaves identifiers unchanged
This commit is contained in:
@@ -217,8 +217,11 @@ type RelationBeforeLink interface {
|
||||
RelationBeforeLink(ctx context.Context, relation string, parent, related any, pivot map[string]any) error
|
||||
}
|
||||
|
||||
// FilterScope is a model method referenced by a config_filter scope name.
|
||||
// FilterScope is the model capability a config_filter scope name may call.
|
||||
// FilterScopes is the exact, case-sensitive set of names; request text never
|
||||
// selects a method outside that set.
|
||||
type FilterScope interface {
|
||||
FilterScopes() []string
|
||||
FilterScope(name string, db *gorm.DB, value any) *gorm.DB
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user