This commit is contained in:
2025-12-20 03:47:10 +01:00
parent 8428bf9c82
commit dcba044cd6
179 changed files with 10345 additions and 786 deletions

View File

@@ -23,6 +23,8 @@ class Benchmark(Base):
# Scores
global_score = Column(Float, nullable=False)
cpu_score = Column(Float, nullable=True)
cpu_score_single = Column(Float, nullable=True) # Monocore CPU score
cpu_score_multi = Column(Float, nullable=True) # Multicore CPU score
memory_score = Column(Float, nullable=True)
disk_score = Column(Float, nullable=True)
network_score = Column(Float, nullable=True)

View File

@@ -2,7 +2,7 @@
Linux BenchTools - Device Model
"""
from sqlalchemy import Column, Integer, String, DateTime, Text
from sqlalchemy import Column, Integer, String, DateTime, Text, Float
from sqlalchemy.orm import relationship
from datetime import datetime
from app.db.base import Base
@@ -22,6 +22,9 @@ class Device(Base):
location = Column(String(255), nullable=True)
owner = Column(String(100), nullable=True)
tags = Column(Text, nullable=True) # JSON or comma-separated
purchase_store = Column(String(255), nullable=True)
purchase_date = Column(String(50), nullable=True)
purchase_price = Column(Float, nullable=True)
created_at = Column(DateTime, nullable=False, default=datetime.utcnow)
updated_at = Column(DateTime, nullable=False, default=datetime.utcnow, onupdate=datetime.utcnow)

View File

@@ -58,6 +58,7 @@ class HardwareSnapshot(Base):
# Network
network_interfaces_json = Column(Text, nullable=True) # JSON array
network_shares_json = Column(Text, nullable=True) # JSON array
# OS / Motherboard
os_name = Column(String(100), nullable=True)
@@ -65,11 +66,25 @@ class HardwareSnapshot(Base):
kernel_version = Column(String(100), nullable=True)
architecture = Column(String(50), nullable=True)
virtualization_type = Column(String(50), nullable=True)
screen_resolution = Column(String(50), nullable=True)
display_server = Column(String(50), nullable=True)
session_type = Column(String(50), nullable=True)
last_boot_time = Column(String(50), nullable=True)
uptime_seconds = Column(Integer, nullable=True)
battery_percentage = Column(Float, nullable=True)
battery_status = Column(String(50), nullable=True)
battery_health = Column(String(50), nullable=True)
motherboard_vendor = Column(String(100), nullable=True)
motherboard_model = Column(String(255), nullable=True)
bios_vendor = Column(String(100), nullable=True)
bios_version = Column(String(100), nullable=True)
bios_date = Column(String(50), nullable=True)
hostname = Column(String(255), nullable=True)
desktop_environment = Column(String(100), nullable=True)
# PCI and USB Devices
pci_devices_json = Column(Text, nullable=True) # JSON array
usb_devices_json = Column(Text, nullable=True) # JSON array
# Misc
sensors_json = Column(Text, nullable=True) # JSON object