refactor: 收口 V3 分层架构与插件兼容边界

This commit is contained in:
jxxghp
2026-08-18 13:22:02 +08:00
parent cca99bd421
commit 8472bcff43
274 changed files with 10730 additions and 6130 deletions
+25 -1
View File
@@ -1,4 +1,4 @@
from typing import List
from typing import List, Optional
from app.db.base import DbOper
from app.db.models.subscribehistory import SubscribeHistory
@@ -24,3 +24,27 @@ class SubscribeHistoryOper(DbOper):
page=page,
count=count,
)
async def async_list_by_type_and_username(
self,
mtype: str,
username: str,
page: int = 1,
count: int = 30,
) -> List[SubscribeHistory]:
"""异步按媒体类型和用户分页查询订阅历史。"""
return await SubscribeHistory.async_list_by_type_and_username(
self._db,
mtype=mtype,
username=username,
page=page,
count=count,
)
async def async_get(self, history_id: int) -> Optional[SubscribeHistory]:
"""异步按 ID 查询订阅历史。"""
return await SubscribeHistory.async_get(self._db, history_id)
async def async_delete(self, history_id: int) -> None:
"""异步删除订阅历史。"""
await SubscribeHistory.async_delete(self._db, history_id)