//
//  MetricSample.swift
//  iKeyMon
//
//  Created by tracer on 21.04.26.
//

import Foundation
import SwiftData

@Model
final class MetricSample {
    var serverID: UUID
    var timestamp: Date
    var cpuPercent: Double
    var memoryPercent: Double
    var swapPercent: Double
    var diskPercent: Double

    init(
        serverID: UUID,
        timestamp: Date = .now,
        cpuPercent: Double,
        memoryPercent: Double,
        swapPercent: Double,
        diskPercent: Double
    ) {
        self.serverID = serverID
        self.timestamp = timestamp
        self.cpuPercent = cpuPercent
        self.memoryPercent = memoryPercent
        self.swapPercent = swapPercent
        self.diskPercent = diskPercent
    }
}
