package dxf

import "time"

type TaskQueueStatus struct {
	ScheduledCount int `json:"scheduled_count"`
}

type Node struct {
	ID string `json:"id"`
}

type TiDBWorkerStatus struct {
	CPUCount      int    `json:"cpu_count"`
	RequiredCount int    `json:"required_count"`
	CurrentCount  int    `json:"current_count"`
	BusyNodes     []Node `json:"busy_nodes"`
}

type TiKVWorkerStatus struct {
	RequiredCount int `json:"required_count"`
}

type PauseScaleIn struct {
	Enabled    bool      `json:"enabled"`
	TTL        string    `json:"ttl"`
	ExpireTime time.Time `json:"expire_time"`
}

type Flags struct {
	PauseScaleIn PauseScaleIn `json:"pause_scale_in"`
}

type DXFScheduleStatus struct {
	Version    int              `json:"version"`
	TaskQueue  TaskQueueStatus  `json:"task_queue"`
	TiDBWorker TiDBWorkerStatus `json:"tidb_worker"`
	TiKVWorker TiKVWorkerStatus `json:"tikv_worker"`
	Flags      Flags            `json:"flags"`
}
