Complete restructure to modules.

Using modules and imports makes it much more modular
and managable. There are no 600 row files now
This commit is contained in:
2026-03-02 21:46:51 +01:00
parent fcf3643ff8
commit 10e6ae2347
24 changed files with 930 additions and 29537 deletions

28
cont/models/sqlTable.py Normal file
View File

@@ -0,0 +1,28 @@
from sqlalchemy import Table, Column, MetaData, Integer, String, TIMESTAMP, BigInteger, Numeric, text
metadata = MetaData()
idracMeasurement = Table(
"IDRACmeasurement",
metadata,
Column("id", Integer, primary_key=True, autoincrement=True),
Column("time_stamp", TIMESTAMP, server_default=text("CURRENT_TIMESTAMP"), nullable=False),
Column("hostname", String(64), nullable=False),
Column("powerDrawPSU1", Numeric(7, 2)),
Column("powerDrawPSU2", Numeric(7, 2)),
Column("powerDrawBoard", Numeric(7, 2)),
Column("voltagePSU1", Numeric(7, 2)),
Column("voltagePSU2", Numeric(7, 2)),
Column("inletTemp", Numeric(5, 2)),
Column("exhaustTemp", Numeric(5, 2)),
Column("cpu1Temp", Numeric(5, 2)),
Column("cpu2Temp", Numeric(5, 2)),
Column("uptimeS", BigInteger),
Column("uptimeH", Numeric(8, 3)),
Column("uptimeD", Numeric(8, 3)),
)