1.自动更新今日需要抓取数据
2.工况接口返回
This commit is contained in:
@@ -13,4 +13,13 @@ class Account(Base):
|
||||
project_name = Column(String(1000), comment="项目名称")
|
||||
created_at = Column(DateTime, server_default=func.now(), comment="创建时间")
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now(), comment="更新时间")
|
||||
update_time = Column(String(1000), nullable=False, comment="更新时间跨度")
|
||||
update_time = Column(String(1000), nullable=False, comment="更新时间跨度")
|
||||
|
||||
|
||||
# 模型转字典
|
||||
def to_dict(self):
|
||||
"""将模型实例转换为字典,支持 Pydantic 序列化"""
|
||||
return {
|
||||
column.name: getattr(self, column.name)
|
||||
for column in self.__table__.columns
|
||||
}
|
||||
Reference in New Issue
Block a user