add 转移历史记录

This commit is contained in:
jxxghp
2023-06-19 16:17:46 +08:00
parent e9e7bcc206
commit df0ba221f9
4 changed files with 80 additions and 2 deletions

View File

@ -0,0 +1,24 @@
from typing import Any
from app.db import DbOper
from app.db.models.transferhistory import TransferHistory
class TransferHistoryOper(DbOper):
"""
转移历史管理
"""
def get_by_title(self, title: str) -> Any:
"""
按标题查询转移记录
:param title: 数据key
"""
return TransferHistory.search_by_title(self._db, title)
def add(self, **kwargs):
"""
新增转移历史
"""
transferhistory = TransferHistory(**kwargs)
return transferhistory.create(self._db)