import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { DatabaseModule } from '@it0/database';
import { AppVersion } from './domain/entities/app-version.entity';
import { AppVersionRepository } from './infrastructure/repositories/app-version.repository';
import { VersionController } from './interfaces/rest/controllers/version.controller';
import { AppVersionCheckController } from './interfaces/rest/controllers/app-version-check.controller';

@Module({
  imports: [
    ConfigModule.forRoot({ isGlobal: true }),
    DatabaseModule.forRoot(),
    TypeOrmModule.forFeature([AppVersion]),
  ],
  controllers: [VersionController, AppVersionCheckController],
  providers: [AppVersionRepository],
})
export class VersionModule {}
