package entity

import (
	"time"

	globaldedicatedv1 "github.com/tidbcloud/tidb-management-service/api/spec/global/dedicated/v1"
)

// Entities.
type (
	ClusterOperation struct {
		ID          uint64
		OperatorID  uint64 // the userId of operator. 0 means no operator
		ClusterID   uint64
		Type        globaldedicatedv1.ClusterOperationType
		CreatedAt   time.Time // readonly and auto set in repo_imp.
		CompletedAt *time.Time
		State       globaldedicatedv1.ClusterOperationState

		Operation any
	}

	ScaleOperation struct {
		ComponentID    uint64
		ComponentType  globaldedicatedv1.ComponentType
		StorageType    globaldedicatedv1.Sku_DiskType
		StorageChanged bool // storage has been scaled out/in/up/down. NOTE: now, scale storage in/down may not be supported.
	}
)
