package com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate;

import java.util.ArrayList;
import java.util.List;

import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.ProcessingStatus;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.file.WorkflowStatus;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DossierTemplateStats {

    private String dossierTemplateId;
    private String name;
    private DossierTemplateStatus dossierTemplateStatus;

    private int numberOfDeletedDossiers;
    private int numberOfActiveDossiers;
    private int numberOfArchivedDossiers;

    private int numberOfPeople;
    private int numberOfActiveFiles;
    private int numberOfSoftDeletedFiles;

    private int numberOfPages;
    private int numberOfExcludedPages;

    private List<ProcessingStatusCount> fileCountPerProcessingStatus = new ArrayList<>();
    private List<WorkflowStatusCount> fileCountPerWorkflowStatus = new ArrayList<>();
    private List<DossierStatusCount> dossierCountByStatus = new ArrayList<>();

    private List<String> dossiersInTemplate = new ArrayList<>();

    @Data
    @AllArgsConstructor
    public static class DossierStatusCount {

        private String statusId;
        private int count;

    }

    @Data
    @AllArgsConstructor
    public static class ProcessingStatusCount {

        private ProcessingStatus processingStatus;
        private int count;

    }

    @Data
    @AllArgsConstructor
    public static class WorkflowStatusCount {

        private WorkflowStatus workflowStatus;
        private int count;

    }

}
