Add ability to reflectively determine asset information
Build / build (push) Failing after 1m41s

This commit is contained in:
2025-06-05 21:17:17 +02:00
parent 20bd00f67b
commit ca47f8f8ab
16 changed files with 416 additions and 52 deletions
@@ -1,8 +1,8 @@
package be.seeseepuff.pcinv.models;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import be.seeseepuff.pcinv.meta.AssetInfo;
import be.seeseepuff.pcinv.meta.Property;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
@@ -12,18 +12,26 @@ import lombok.Setter;
@Getter
@Setter
@Entity
public class RamAsset
@AssetInfo(
displayName = "Random Access Memory",
type = "RAM"
)
@Table(name = "ram_assets")
public class RamAsset implements Asset
{
@Id
@GeneratedValue
private Long id;
private long id;
/// The ID of the associated asset, linking it to the generic Asset model.
private Long assetId;
/// The generic asset associated with this RAM.
@OneToOne(orphanRemoval = true)
private GenericAsset asset;
/// The capacity of the RAM in bytes.
private Long capacity;
@Property("Capacity")
private long capacity;
/// The type of memory. E.g.: DDR2, SDRAM, ISA-8, etc...
@Property("Type")
private String type;
}