import { CONNECTION_NAME } from 'src/core/strings/constants/base.constants';

import { ConfigModule } from '@nestjs/config';
import { Module } from '@nestjs/common';
import { VerificationModel } from './data/models/verification.model';
import { TypeOrmModule } from '@nestjs/typeorm';
import { BookingAuthenticationController } from './infrastructure/controllers/booking-authentication.controller';
import { VerificationService } from './data/services/verification.service';
import { JwtModule } from '@nestjs/jwt';
import { JWT_EXPIRED } from 'src/core/sessions/constants';
import { JWT_SECRET } from 'src/core/sessions/constants';
@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature([VerificationModel], CONNECTION_NAME.DEFAULT),

    JwtModule.register({
      secret: JWT_SECRET,
      signOptions: { expiresIn: JWT_EXPIRED },
    }),
  ],
  controllers: [BookingAuthenticationController],
  providers: [VerificationService],
})
export class BookingOnlineAuthModule {}
