@@ -0,0 +1,16 @@
|
||||
from sqlalchemy import Boolean, Column, Float, Integer
|
||||
|
||||
from app import db
|
||||
from .base import TimestampMixin
|
||||
|
||||
|
||||
class HardwareSetting(db.Model, TimestampMixin):
|
||||
"""Persistent runtime settings for scale calibration and simulation."""
|
||||
|
||||
__tablename__ = "hardware_settings"
|
||||
|
||||
id = Column(Integer, primary_key=True, default=1)
|
||||
counts_per_kg = Column(Float, nullable=False, default=1.0)
|
||||
tare_raw = Column(Float, nullable=False, default=0.0)
|
||||
simulation_mode = Column(Boolean, nullable=False, default=False, server_default="0")
|
||||
simulation_weight_kg = Column(Float, nullable=False, default=0.0, server_default="0")
|
||||
Reference in New Issue
Block a user