package org.raddatz.familienarchiv.dashboard;

import lombok.RequiredArgsConstructor;
import org.raddatz.familienarchiv.document.DocumentService;
import org.raddatz.familienarchiv.geschichte.GeschichteService;
import org.raddatz.familienarchiv.person.PersonService;
import org.raddatz.familienarchiv.dashboard.StatsDTO;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class StatsService {

    private final PersonService personService;
    private final DocumentService documentService;
    private final GeschichteService geschichteService;

    public StatsDTO getStats() {
        return new StatsDTO(personService.count(), documentService.count(), geschichteService.countPublished());
    }
}
