import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';

@Injectable()
export class MySQLConfigService {
  constructor(private configService: ConfigService) {}

  get host(): string {
    return this.configService.get<string>('mysql.host');
  }

  get username(): string {
    return this.configService.get<string>('mysql.username');
  }

  get password(): string {
    return this.configService.get<string>('mysql.password');
  }

  get port(): number {
    return this.configService.get<number>('mysql.port');
  }

  get database(): string {
    return this.configService.get<string>('mysql.database');
  }

  get timezone(): string {
    return this.configService.get<string>('mysql.timezone');
  }
}
