import { Global, Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AuditLog } from '../database/entities';
import { AuditService } from './services/audit.service';
import { ErrorResponseService } from './services/error-response.service';
import { CacheService } from './services/cache.service';
import { EmailService } from './services/email.service';

@Global()
@Module({
  imports: [TypeOrmModule.forFeature([AuditLog])],
  providers: [AuditService, ErrorResponseService, CacheService, EmailService],
  exports: [AuditService, ErrorResponseService, CacheService, EmailService],
})
export class CommonModule {}
