/**
 * 
 */
package org.springblade.etl.dto.etl;

import java.io.Serializable;

import org.springblade.etl.enums.InstanceStatus;

import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import lombok.NoArgsConstructor;

/**
 * @author wookvn
 *
 */
@NoArgsConstructor
@ApiModel(value = "任务统计结果", description = "任务统计结果")
public class JobStatRes implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Long cnt;
	
	@JsonIgnore
	private Integer status;
	
	private InstanceStatus insStatus;

	/**
	 * @param cnt
	 * @param insType
	 */
	public JobStatRes(Long cnt, InstanceStatus insStatus) {
		super();
		this.cnt = cnt;
		this.insStatus = insStatus;
	}

	/**
	 * @return the cnt
	 */
	public Long getCnt() {
		return cnt;
	}

	/**
	 * @param cnt the cnt to set
	 */
	public void setCnt(Long cnt) {
		this.cnt = cnt;
	}

	/**
	 * @return the status
	 */
	public Integer getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}

	/**
	 * @return the insStatus
	 */
	public InstanceStatus getInsStatus() {
		return insStatus != null ? insStatus : InstanceStatus.of(status);
	}

	/**
	 * @param insStatus the insStatus to set
	 */
	public void setInsStatus(InstanceStatus insStatus) {
		this.insStatus = insStatus;
	}
	
}