import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

import { ClientLoginLog } from './client-login-log.entity';
import { ClientLoginLogService } from './client-login-log.service';
import {
  ClientLoginLogAdminController,
  ClientLoginLogSelfController,
} from './client-login-log.controller';
// Same guard your BillingModule provides locally.
import { ClientAuthGuard } from '../guards/client-auth.guard';

@Module({
  imports: [TypeOrmModule.forFeature([ClientLoginLog], 'scheme_dbs')],
  controllers: [ClientLoginLogAdminController, ClientLoginLogSelfController],
  providers: [ClientLoginLogService, ClientAuthGuard],
  // Exported so your CLIENT LOGIN controller/service can call
  // ClientLoginLogService.record(req, {...}) on success/failure.
  exports: [ClientLoginLogService],
})
export class ClientLoginLogModule {}
