package com.devlab.app.data.model

import kotlinx.serialization.Serializable

@Serializable
data class Server(
    val id: Int = 0,
    val name: String = "",
    val ip_address: String = "",
    val ssh_port: Int = 22,
    val status: String = "unknown",
    val group_name: String? = null,
    val description: String? = null,
    val cpu_usage: Double? = null,
    val ram_usage: Double? = null,
    val disk_usage: Double? = null,
    val load_average: String? = null,
    val uptime: String? = null,
    val created_at: String? = null,
    val created_by_name: String? = null
)

@Serializable
data class ServerDetail(
    val server: Server? = null,
    val metrics: LatestMetrics? = null
)

@Serializable
data class LatestMetrics(
    val cpu_usage: Double? = null,
    val ram_usage: Double? = null,
    val disk_usage: Double? = null,
    val load_average: String? = null,
    val uptime: String? = null
)

@Serializable
data class ServiceInfo(
    val name: String = "",
    val load: String = "",
    val status: String = "",
    val description: String = ""
)

@Serializable
data class ConnectionResult(
    val connected: Boolean = false,
    val error: String? = null
)

@Serializable
data class ServiceActionRequest(
    val service: String,
    val action: String
)

@Serializable
data class ServiceActionResult(
    val message: String? = null,
    val output: String? = null
)
