fix 查询某时间之后的转移历史

This commit is contained in:
thsrite
2024-04-26 14:41:52 +08:00
parent 228b1a11d0
commit 2dbe049a91
2 changed files with 15 additions and 0 deletions

View File

@ -212,3 +212,11 @@ class TransferHistory(Base):
"download_hash": download_hash
}
)
@staticmethod
@db_query
def list_by_date(db: Session, date: str):
"""
查询某时间之后的转移历史
"""
return db.query(TransferHistory).filter(TransferHistory.date > date).order_by(TransferHistory.id.desc()).all()