import { Injectable } from '@nestjs/common';
import { UtilisateursService } from 'src/gestion-utilisateurs/utilisateurs/utilisateurs.service';

@Injectable()
export class DashboardService {
    constructor(
        private readonly utilisateurService: UtilisateursService
        
    ){}

    /* async dashboard(id: number): Promise<Object>{
        
        const [comptes, utilisateurs, client, virements, solde, topVirement, transactionMonth] = await Promise.all([
            this.ribService.findAndCountBy(id),
            this.utilisateurService.findAndCountBy(id),
            this.clientService.findAndCountBy(id),
            this.transactionService.findAndCountBy(id),
            this.transactionService.getSoldeTotal(id),
            this.transactionService.getTopTransactionsOfToday(id),
            this.transactionService.getTotalTransactionsByMonth(id),
        ]);
    
        return {
            comptes: comptes[1],
            utilisateurs: utilisateurs[1],
            client: client[1],
            virements: virements[1],
            solde: solde,
            topVirement,
            transactionMonth
        };
    } */
}
