19 lines
509 B
Python
19 lines
509 B
Python
from typing import Any
|
|
|
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
|
|
from app.core.base_crud import CRUDBase
|
|
from app.core.base_schema import AuthSchema
|
|
|
|
from .model import AuditLogModel
|
|
|
|
|
|
class BreedingAuditCRUD(CRUDBase[AuditLogModel, Any, Any]):
|
|
"""审计日志 CRUD —— 复用 CRUDBase 的查询/分页(自动带数据权限过滤)。"""
|
|
|
|
def __init__(self, auth: AuthSchema, db: AsyncSession) -> None:
|
|
super().__init__(AuditLogModel, auth, db)
|
|
|
|
|
|
audit_crud = BreedingAuditCRUD
|