package repository

import (
	"context"

	"github.com/tidbcloud/tidb-management-service/serverless-global-service/domain/entity"
)

type ClusterQueryParameter struct {
	TenantIds          []uint64
	ClusterIds         []string
	EngineTypes        []string
	Deleted            bool
	ProjectIds         []uint64
	CloudProviderNames []entity.CloudProviderName
	RegionNames        []entity.RegionName
	InCreatingStatus   bool
}

type ClusterRepo interface {
	Save(ctx context.Context, cluster *entity.Cluster) error
	Query(ctx context.Context, params *ClusterQueryParameter) ([]*entity.Cluster, error)
	Get(ctx context.Context, id string, needDeleted bool) (*entity.Cluster, error)
	Delete(ctx context.Context, id string) error
	Count(ctx context.Context, params *ClusterQueryParameter) (int64, error)
	UpdateRuVersion(ctx context.Context, id string, ruVersion int32) error
}
