package cn.novalon.gym.manage.sys.core.repository;

import cn.novalon.gym.manage.common.dto.PageRequest;
import cn.novalon.gym.manage.common.dto.PageResponse;
import cn.novalon.gym.manage.sys.core.domain.OperationLog;
import cn.novalon.gym.manage.sys.core.query.OperationLogQuery;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.time.LocalDateTime;

/**
 * 操作日志仓储接口
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public interface IOperationLogRepository {

    Mono<OperationLog> findById(Long id);

    Mono<OperationLog> save(OperationLog operationLog);

    Mono<Void> deleteById(Long id);

    Flux<OperationLog> findAll();

    Flux<OperationLog> findByUsername(String username);

    Mono<PageResponse<OperationLog>> findByQueryWithPagination(OperationLogQuery query, PageRequest pageRequest);

    Mono<Long> count();

    Mono<Long> countByCreatedAtAfter(LocalDateTime dateTime);
}