|
@@ -10,7 +10,7 @@ Base = declarative_base()
|
|
|
|
|
|
|
|
|
class BmsLastDataDay(Base):
|
|
|
- __tablename__ = "bms_last_data_day"
|
|
|
+ __tablename__ = "signal_monitor_bms_last_day"
|
|
|
__table_args__ = ({'comment': '电池信号监控---每天最后一条bms数据'}) # 添加索引和表注释
|
|
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True, comment="主键")
|
|
@@ -31,7 +31,7 @@ class BmsLastDataDay(Base):
|
|
|
# self.line_state = line_state
|
|
|
|
|
|
class GpsLastDataDay(Base):
|
|
|
- __tablename__ = "gps_last_data_day"
|
|
|
+ __tablename__ = "signal_monitor_gps_last_day"
|
|
|
__table_args__ = ({'comment': '电池信号监控---每天最后一条gps数据'}) # 添加索引和表注释
|
|
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True, comment="主键")
|
|
@@ -41,8 +41,8 @@ class GpsLastDataDay(Base):
|
|
|
time_stamp = Column(DateTime, comment="时间戳")
|
|
|
pack_state = Column(Integer, comment="电池状态")
|
|
|
line_state = Column(Integer, comment="信号状态")
|
|
|
- latitude = Column(Integer, comment="纬度")
|
|
|
- longtitude = Column(Integer, comment="经度")
|
|
|
+ latitude = Column(FLOAT, comment="纬度")
|
|
|
+ longtitude = Column(FLOAT, comment="经度")
|
|
|
|
|
|
|
|
|
# def __init__(self, sn, time_stamp, pack_state, line_state, ):
|
|
@@ -52,7 +52,7 @@ class GpsLastDataDay(Base):
|
|
|
# self.line_state = line_state
|
|
|
|
|
|
class GpsSignalMonitor(Base):
|
|
|
- __tablename__ = "gps_signal_monitor"
|
|
|
+ __tablename__ = "signal_monitor_gps"
|
|
|
__table_args__ = ({'comment': 'gps信号监控'}) # 添加索引和表注释
|
|
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True, comment="主键")
|
|
@@ -64,8 +64,8 @@ class GpsSignalMonitor(Base):
|
|
|
offline_time = Column(Integer, comment="离线时间")
|
|
|
pack_state = Column(Integer, comment="电池状态")
|
|
|
line_state = Column(Integer, comment="信号状态")
|
|
|
- latitude = Column(Integer, comment="纬度")
|
|
|
- longtitude = Column(Integer, comment="经度")
|
|
|
+ latitude = Column(FLOAT, comment="纬度")
|
|
|
+ longtitude = Column(FLOAT, comment="经度")
|
|
|
|
|
|
|
|
|
# def __init__(self, sn, start_time, end_time, off_line_time, pack_state, line_state):
|
|
@@ -77,7 +77,7 @@ class GpsSignalMonitor(Base):
|
|
|
# self.line_state = line_state
|
|
|
|
|
|
class BmsSignalMonitor(Base):
|
|
|
- __tablename__ = "bms_signal_monitor"
|
|
|
+ __tablename__ = "signal_monitor_bms"
|
|
|
__table_args__ = ({'comment': 'bms信号监控'}) # 添加索引和表注释
|
|
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True, comment="主键")
|