package com.ruoyi.oa.domain.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Data
public class LineChartVo {
    private List<Integer> months;
    private List<BigDecimal> totalExpenditures;
    private List<BigDecimal> avgSalaries;

    public LineChartVo(List<LineChartPointVo> points) {
        this.months = new ArrayList<>();
        this.totalExpenditures = new ArrayList<>();
        this.avgSalaries = new ArrayList<>();
        
        for (LineChartPointVo point : points) {
            this.months.add(point.getMonth());
            this.totalExpenditures.add(point.getTotalExpenditure());
            this.avgSalaries.add(point.getAvgSalary());
        }
    }
}