package org.springblade.etl.entity;

import java.time.LocalDateTime;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.springblade.core.mp.base.TenantEntity;
import org.springblade.etl.enums.ConnectorType;
import org.springblade.etl.enums.PluginType;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 任务步骤(节点)表 etl_job_task
 * 
 * @author aokunsang
 * @date 2023-07-28
 */
@Data
@TableName("etl_job_task")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "JobTask对象", description = "任务步骤(节点)")
public class JobTask extends TenantEntity{

	private static final long serialVersionUID = 1L;
	
 	/** 
	 *  
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;

	/** 
	 * 任务ID 
	 */
	@ApiModelProperty(value = "任务ID")
	private Integer jobId;

	/** 
	 * 插件类型 
	 */
	@ApiModelProperty(value = "插件类型")
	@NotNull(message = "插件类型为空")
	private PluginType pluginType;

	/** 
	 * 连接器类型 
	 */
	@ApiModelProperty(value = "连接器类型")
	@NotNull(message = "连接器类型为空")
	private ConnectorType connectorType;

	/** 
	 * 配置json 
	 */
	@ApiModelProperty(value = "配置json")
	@NotEmpty(message = "配置信息为空")
	private String configJson;

	/** 
	 * 扩展json 
	 */
	@ApiModelProperty(value = "扩展json")
	private String extJson;
	
	/**
	 * 
	 */
	@ApiModelProperty(value = "节点code")
	@NotEmpty(message = "节点Code不能为空")
	private String taskCode;

	/** 
	 * 创建时间 
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	/** 
	 * 创建人ID 
	 */
	@ApiModelProperty(value = "创建人ID")
	private Long createUserId;

	/** 
	 * 创建人姓名 
	 */
	@ApiModelProperty(value = "创建人姓名")
	private String createBy;

}
