23 lines
574 B
Go
23 lines
574 B
Go
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
|
|
}
|