From a9b5026b5a1fc3f042d82ed25c6769ebef15efc2 Mon Sep 17 00:00:00 2001 From: nasr Date: Mon, 1 Dec 2025 00:17:20 +0100 Subject: feature: DTO for API endpoints --- src/main/scala/main/domain/ResourceModels.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/scala/main/domain/ResourceModels.scala (limited to 'src/main') diff --git a/src/main/scala/main/domain/ResourceModels.scala b/src/main/scala/main/domain/ResourceModels.scala new file mode 100644 index 0000000..d473fd6 --- /dev/null +++ b/src/main/scala/main/domain/ResourceModels.scala @@ -0,0 +1,19 @@ +package main.domain + +/** + * + * Using case classes for immutable resource data + * These will store the averages for everything we've gathered + * and will be used for the API endpoints + * */ + +enum Status: + case PASS + case FAIL + +case class CpuInfo(load: Double, temperature: Double, cores: Int, physicalCores: Int, status: Status) + +case class RamInfo(usage: Double, total: Double, status: Status) + +case class PlatformInfo(currentPlatform: String) + -- cgit v1.2.3-70-g09d2