import { Module } from '@nestjs/common'
import { TypeOrmModule } from '@nestjs/typeorm'
import { Users } from './entities/users.entity'
import { UsersService } from './users.service'
import { UsersController } from './users.controller'
import { BcryptService } from '../shared/hashing/bcrypt.service'
import { HashingService } from '../shared/hashing/hashing.service'
import { SmsModule } from '../sms/sms.module'
import { UsersAdminController } from './users.admin.controller'
import { MembershipModule } from '../membership/membership.module'
import { ApiUserModule } from '../api-users/api-user.module'

@Module({
    imports: [SmsModule, TypeOrmModule.forFeature([Users]), MembershipModule, ApiUserModule],
    controllers: [UsersController, UsersAdminController],
    providers: [
        {
            provide: HashingService,
            useClass: BcryptService
        },
        UsersService
    ],
    exports: [UsersService]
})
export class UsersModule {}
