feat 转移历史记录文件清单
This commit is contained in:
@ -45,3 +45,7 @@ class DownloadHistory(Base):
|
||||
@staticmethod
|
||||
def list_by_page(db: Session, page: int = 1, count: int = 30):
|
||||
return db.query(DownloadHistory).offset((page - 1) * count).limit(count).all()
|
||||
|
||||
@staticmethod
|
||||
def get_by_path(db: Session, path: str):
|
||||
return db.query(DownloadHistory).filter(DownloadHistory.path == path).first()
|
||||
|
@ -43,6 +43,8 @@ class TransferHistory(Base):
|
||||
errmsg = Column(String)
|
||||
# 时间
|
||||
date = Column(String, index=True)
|
||||
# 文件清单,以JSON存储
|
||||
files = Column(String)
|
||||
|
||||
@staticmethod
|
||||
def list_by_title(db: Session, title: str, page: int = 1, count: int = 30):
|
||||
|
@ -15,7 +15,7 @@ class TransferHistoryOper(DbOper):
|
||||
按标题查询转移记录
|
||||
:param title: 数据key
|
||||
"""
|
||||
return TransferHistory.search_by_title(self._db, title)
|
||||
return TransferHistory.list_by_title(self._db, title)
|
||||
|
||||
def get_by_src(self, src: str) -> Any:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user