package cn.feast.coding.bean;

import cn.feast.coding.model.order.MonthStatis;

import java.util.List;

public class ColumnChartData {
    private String name;
    private int[] data;

    public ColumnChartData(String name, List<MonthStatis> list) {
        this.name = name;
        this.data = new int[12];
        for(MonthStatis monthStatis : list){
            data[monthStatis.getMonth() - 1] = monthStatis.getOrderTotal();
        }
    }

    public ColumnChartData() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int[] getData() {
        return data;
    }

    public void setData(int[] data) {
        this.data = data;
    }
}
