import { Module } from '@nestjs/common';
import { PassportModule } from '@nestjs/passport';
import { AuthService } from './service/auth.service';
import { AuthController } from './controller/auth.controller';
import { SessionSerializer } from './session.serializer';
import { UserModule } from '../user/user.module'; // Correct path to UserModule

@Module({
  imports: [
    PassportModule.register({ session: true }),
    UserModule, // import UserModule here
  ],
  providers: [AuthService, SessionSerializer],
  controllers: [AuthController],
})
export class AuthModule {}

// import { Module } from '@nestjs/common';
// import { PassportModule } from '@nestjs/passport';
// import { TypeOrmModule } from '@nestjs/typeorm';
// import { AuthService } from './service/auth.service';
// import { AuthController } from './controller/auth.controller';
// import { SessionSerializer } from './session.serializer';
// import { UserService } from '../user/user.service';
// import { UserEntity } from '../user/entities/user.entity';

// @Module({
//   imports: [
//     PassportModule.register({ session: true }),
//     TypeOrmModule.forFeature([UserEntity]), // Include entities here
//   ],
//   providers: [AuthService, SessionSerializer, UserService],
//   controllers: [AuthController],
// })
// export class AuthModule {}
