package com.usoftchina.bi.server.model.vo.configVo;


import com.alibaba.fastjson.JSON;
import com.usoftchina.bi.core.utils.JsonUtils;
import com.usoftchina.bi.server.model.bo.Column;
import com.usoftchina.bi.server.model.bo.Screen;

import java.util.List;

public class HistogramConfigInfo {
    private int id;
    private Column xAxis;
    private Column yAxis;
    private List<String> groups;
    private List<Screen> filters;
    private String sort;
    private String rule;

    /**
     * 需要展示的条数
     */
    private int maxCount = 20;

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getRule() {
        return rule;
    }

    public void setRule(String rule) {
        this.rule = rule;
    }

    public int getMaxCount() {
        return maxCount;
    }

    public void setMaxCount(int maxCount) {
        this.maxCount = maxCount;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Column getxAxis() {
        return xAxis;
    }

    public void setxAxis(Column xAxis) {
        this.xAxis = xAxis;
    }

    public Column getyAxis() {
        return yAxis;
    }

    public void setyAxis(Column yAxis) {
        this.yAxis = yAxis;
    }

    public List<String> getGroups() {
        return groups;
    }

    public void setGroups(List<String> groups) {
        this.groups = groups;
    }

    public List<Screen> getFilters() {
        return filters;
    }

    public void setFilters(List<Screen> filters) {
        this.filters = filters;
    }

    @Override
    public String toString() {
        return "HistogramConfigInfo{" +
                "id=" + id +
                ", xAxis=" + xAxis.toString() +
                ", yAxis=" + yAxis.toString() +
                ", groups=" + JSON.toJSONString(groups) +
                ", filters=" + JSON.toJSONString(filters) +
                ", maxCount=" + maxCount +
                '}';
    }
}
