package cn.estsh.i3plus.ext.mes.pojo.model.bu3;

import cn.estsh.i3plus.ext.mes.pojo.bean.MesProdDataToStatisticsTravel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 * @DESCRIPTION:
 * @USER: wangjie
 * @DATE: 2022-11-01 15:54
 */
@Data
@ApiModel("生产数据自动统计MODEL")
public class SxProdDataToAutoStatisticsModel implements Serializable {

    private static final long serialVersionUID = 1491792796548478376L;

    @ApiParam("组织代码")
    public String organizeCode;

    @ApiParam("操作人")
    public String createUser;

    @ApiParam("今天")
    private String today;

    @ApiParam("日期")
    private String date;

    @ApiParam("执行标志")
    private String flag;

    @ApiParam("策略类")
    private String strategyClass;

    @ApiParam("日期起始")
    private String startTime;

    @ApiParam("日期截止")
    private String endTime;

    @ApiParam(value = "模块代码")
    private String moduleCode;

    @ApiParam(value = "模块名称")
    private String moduleName;

    @ApiParam(value = "统计方式")
    private String statisticsType;

    @ApiParam(value = "统计日期")
    private String statisticsDate;

    @ApiParam(value = "数据KEY")
    private String dataKey;

    @ApiParam(value = "源数据量")
    private Integer sourceCount;

    @ApiParam(value = "统计数据量")
    private Integer targetCount;

    @ApiParam(value = "数据")
    private Object data;

    @ApiParam(value = "数据")
    private MesProdDataToStatisticsTravel travel;

    @ApiParam(value = "pid")
    private String pid;

    public SxProdDataToAutoStatisticsModel() {}

    public SxProdDataToAutoStatisticsModel(String organizeCode, String flag, String createUser) {
        this.organizeCode = organizeCode;
        this.flag = flag;
        this.createUser = createUser;
    }

    public SxProdDataToAutoStatisticsModel today(String today) {
        this.today = today;
        return this;
    }

    public SxProdDataToAutoStatisticsModel date(String date) {
        this.date = date;
        return this;
    }

    public SxProdDataToAutoStatisticsModel startTime(String startTime) {
        this.startTime = startTime;
        return this;
    }

    public SxProdDataToAutoStatisticsModel endTime(String endTime) {
        this.endTime = endTime;
        return this;
    }

    public SxProdDataToAutoStatisticsModel moduleCode(String moduleCode) {
        this.moduleCode = moduleCode;
        return this;
    }

    public SxProdDataToAutoStatisticsModel moduleName(String moduleName) {
        this.moduleName = moduleName;
        return this;
    }

    public SxProdDataToAutoStatisticsModel statisticsType(String statisticsType) {
        this.statisticsType = statisticsType;
        return this;
    }

    public SxProdDataToAutoStatisticsModel statisticsDate(String statisticsDate) {
        this.statisticsDate = statisticsDate;
        return this;
    }

    public SxProdDataToAutoStatisticsModel dataKey(String dataKey) {
        this.dataKey = dataKey;
        return this;
    }

    public SxProdDataToAutoStatisticsModel sourceCount(Integer sourceCount) {
        this.sourceCount = sourceCount;
        return this;
    }

    public SxProdDataToAutoStatisticsModel targetCount(Integer targetCount) {
        this.targetCount = targetCount;
        return this;
    }

    public SxProdDataToAutoStatisticsModel data(Object data) {
        this.data = data;
        return this;
    }

    public SxProdDataToAutoStatisticsModel travel(MesProdDataToStatisticsTravel travel) {
        this.travel = travel;
        return this;
    }

    public SxProdDataToAutoStatisticsModel pid(String pid) {
        this.pid = pid;
        return this;
    }

    public SxProdDataToAutoStatisticsModel copy(SxProdDataToAutoStatisticsModel model) {
        BeanUtils.copyProperties(model, this);
        return this;
    }

    public SxProdDataToAutoStatisticsModel strategyClass(String strategyClass) {
        this.strategyClass = strategyClass;
        return this;
    }
}
