From 65744e28ddc26c8d8de23d75f6753118a9995e3b Mon Sep 17 00:00:00 2001 From: lhx Date: Mon, 16 Mar 2026 10:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AF=B9=E8=B1=A1=E5=86=B2?= =?UTF-8?q?=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/level_data.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/app/models/level_data.py b/app/models/level_data.py index e82e927..17d4e92 100644 --- a/app/models/level_data.py +++ b/app/models/level_data.py @@ -20,26 +20,6 @@ class LevelData(Base): temperature = Column(String(100), comment="温度") weather = Column(String(100), comment="天气") - # 模型转字典 - def to_dict(self): - """将模型实例转换为字典,支持 Pydantic 序列化""" - return { - column.name: getattr(self, column.name) - for column in self.__table__.columns - } - -class LoseData(Base): - __tablename__ = "lose_data" - - id = Column(Integer, primary_key=True, index=True, autoincrement=True) - account_id = Column(String(100), nullable=False, comment="水准线路编码", index=True) - NYID = Column(String(100), nullable=False, comment="期数id", index=True) - linecode = Column(String(100), nullable=False, comment="水准线路编码", index=True) - benchmarkids = Column(String(100), comment="工作基点名称序列") - point_id = Column(String(100), nullable=False, comment="观测点id", index=True) - section_id = Column(String(100), nullable=False, comment="所属断面id") - lose_data = Column(String(100), comment="水准观测类型") - # 模型转字典 def to_dict(self): """将模型实例转换为字典,支持 Pydantic 序列化"""