package cn.axzo.msg.center.message.service.todo.pagequery;

import cn.axzo.msg.center.domain.entity.PendingRecordAdapter;
import lombok.Getter;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * @author yanglin
 */
@Getter
public class PageQueryResult {
    private final long total;
    private final List<PendingRecordAdapter> adapters;
    private final Map<String, Object> analysis;

    public PageQueryResult(long total, List<PendingRecordAdapter> adapters) {
        this(total, adapters, Collections.emptyMap());
    }

    public PageQueryResult(long total, List<PendingRecordAdapter> adapters, Map<String, Object> analysis) {
        this.total = total;
        this.adapters = adapters;
        this.analysis = analysis;
    }

    public static PageQueryResult empty() {
        return new PageQueryResult(0L, Collections.emptyList());
    }
}