haixunMaster/haixun-backend/internal/model/setting/domain/usecase/setting.go

23 lines
574 B
Go
Raw Permalink Normal View History

2026-06-23 09:54:27 +00:00
package usecase
import (
"context"
"haixun-backend/internal/model/setting/domain/entity"
)
type UpsertRequest struct {
Scope string
ScopeID string
Key string
Value map[string]any
Version int
}
type UseCase interface {
List(ctx context.Context, scope, scopeID string, page, pageSize int64) ([]*entity.Setting, int64, int64, int64, error)
Get(ctx context.Context, scope, scopeID, key string) (*entity.Setting, error)
Upsert(ctx context.Context, req UpsertRequest) (*entity.Setting, error)
Delete(ctx context.Context, scope, scopeID, key string) error
}