Files
railway_cloud/app/models/lose_data.py
2026-03-15 12:30:53 +08:00

22 lines
990 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from sqlalchemy import Column, Integer, String
from ..core.database import Base
class LoseData(Base):
"""缺失数据记录表:记录各水准线路(期数)的原始/沉降数据缺失情况"""
__tablename__ = "lose_data"
id = Column(Integer, primary_key=True, index=True, autoincrement=True, comment="ID")
account_id = Column(Integer, nullable=False, comment="账户id", index=True)
NYID = Column(String(100), nullable=False, comment="期数ID", index=True)
linecode = Column(String(255), nullable=False, default="0", comment="水准线路编码", index=True)
lose_data = Column(Integer, nullable=False, default=0, comment="缺失的数据默认是0")
section_id = Column(String(255), nullable=True, comment="所属断面id")
point_id = Column(String(100), nullable=False, comment="测点ID")
def to_dict(self):
return {
column.name: getattr(self, column.name)
for column in self.__table__.columns
}