package sharedpool

import (
	"context"

	"github.com/tidbcloud/cluster-service-ng/domain/entity"
	"github.com/tidbcloud/cluster-service-ng/pkg/storage/mysql/schema"
	repository "github.com/tidbcloud/cluster-service-ng/pkg/storage/repo"
)

func ConvertToSharedPoolEntity(
	ctx context.Context,
	repo repository.SharedPoolRepo,
	model *schema.SharedPool,
) (*entity.SharedPool, error) {
	r := repo.(*sharedPoolRepoImpl)
	return r.cvtSharedPoolToEn(ctx, model)
}
