package com.yihu.wlyy.statistics.etl.model;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by Administrator on 2016.10.20.
 */
public class LogModel {
    private String id;//指标id
    private Integer successNum;//成功数
    private Integer errorNum;//錯誤數目
    private Integer allNum;//所有总数
    private String excuteSql;//执行的sql
    private Date endTime;//结束时间
    private List<ErrorModel> modelList = new ArrayList<>();//错误列表
    private String date;//統計的時間
    private boolean success;//是否出现异常

    @Override
    public String toString() {
        return "LogModel{" +
                "id='" + id + '\'' +
                ", successNum=" + successNum +
                ", errorNum=" + errorNum +
                ", allNum=" + allNum +
                ", excuteSql='" + excuteSql + '\'' +
                ", endTime=" + endTime +
                ", modelList=" + modelList +
                ", date='" + date + '\'' +
                ", success=" + success +
                '}';
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Integer getSuccessNum() {
        return successNum;
    }

    public Integer getErrorNum() {
        return errorNum;
    }

    public void setErrorNum(Integer errorNum) {
        this.errorNum = errorNum;
    }

    public void setSuccessNum(Integer successNum) {
        this.successNum = successNum;
    }

    public Integer getAllNum() {
        return allNum;
    }

    public void setAllNum(Integer allNum) {
        this.allNum = allNum;
    }

    public String getExcuteSql() {
        return excuteSql;
    }

    public void setExcuteSql(String excuteSql) {
        this.excuteSql = excuteSql;
    }

    public String getEndTime() {
        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return simpleDateFormat.format(endTime);
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public List<ErrorModel> getModelList() {
        return modelList;
    }

    public void setModelList(List<ErrorModel> modelList) {
        this.modelList = modelList;
    }

    public String getId() {
        return id;
    }

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