package com.inspect.calender.domain;

import lombok.Data;

/**
 * 按年统计任务数量DTO
 */
@Data
public class MonthlyTaskStatsDTO {
    // 1-12
    private Integer month;
    // status = 1 已执行
    private Long executed;
    // status = 2 正在执行
    private Long executing;
    // status = 3 未执行
    private Long pending;
    // 当月总任务数
    private Long total;

    // 全参构造
    public MonthlyTaskStatsDTO(Integer month, Long executed, Long executing, Long pending) {
        this.month = month;
        this.executed = executed != null ? executed : 0L;
        this.executing = executing != null ? executing : 0L;
        this.pending = pending != null ? pending : 0L;
        this.total = this.executed + this.executing + this.pending;
    }
}
