import { HttpModule } from "@nestjs/axios";
import { Global, Module } from "@nestjs/common";
import { AppConfigService } from "./app-config.service";
import { HttpService } from "./http.service";
import { LoggerService } from "src/common/logger/logger.service";
import { SequelizeModule } from "@nestjs/sequelize";
import { MailService } from "./mail.service";
import { TemplateService } from "./template.service";
import { RedisService } from "./redis.service";
import { ShortenService } from "./shorten.service";

const providers = [
  AppConfigService,
  HttpService,
  MailService,
  TemplateService,
  LoggerService,
  RedisService,
  ShortenService
];

@Global()
@Module({
  imports: [
    HttpModule,
    SequelizeModule.forFeature([])
  ],
  providers,
  exports: [...providers],
})
export class ShareModule {}
