import { Global, Module } from "@nestjs/common";
import { AuditLogService } from "./audit-log.service.js";
import { AuditQueryService } from "./audit-query.service.js";

/**
 * Global audit module.
 *
 * Provides:
 * - AuditLogService   (write operations: log, logAuthEvent)
 * - AuditQueryService (read operations: getAuditLogs, getSecurityStats)
 *
 * Existing callers can continue to import { AuditService } from audit.service.ts,
 * which re-exports AuditLogService under the old name for backward compatibility.
 */
@Global()
@Module({
  providers: [AuditLogService, AuditQueryService],
  exports: [AuditLogService, AuditQueryService],
})
export class AuditModule {}
