mengstack-api/internal/modules/settings/domain/repository.go
MengStack Dev 0eb6a96057 feat(settings): M5 配置管理模块
DB-backed runtime settings with global/tenant scope, key-value store,
type support (string/number/bool/json), tenant-level overrides with
global fallback.
2026-10-03 01:02:53 +08:00

12 lines
376 B
Go

package domain
import "context"
type SettingRepository interface {
Upsert(ctx context.Context, setting *Setting) error
FindByKey(ctx context.Context, tenantID, key string) (*Setting, error)
FindByTenant(ctx context.Context, tenantID string) ([]Setting, error)
FindGlobal(ctx context.Context) ([]Setting, error)
Delete(ctx context.Context, tenantID, key string) error
}