import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import { AuditModule } from '../audit/audit.module.js'
import { AuthModule } from '../auth/auth.module.js'
import { Flag, FlagSchema } from '../schemas/flag.schema.js'
import { Tenant, TenantSchema } from '../schemas/tenant.schema.js'
import { FlagsController } from './flags.controller.js'
import { FlagsService } from './flags.service.js'

@Module({
  imports: [
    AuthModule,
    AuditModule,
    MongooseModule.forFeature([
      { name: Flag.name, schema: FlagSchema },
      { name: Tenant.name, schema: TenantSchema },
    ]),
  ],
  controllers: [FlagsController],
  providers: [FlagsService],
  exports: [FlagsService],
})
export class FlagsModule {}
