package org.springblade.etl.entity;

import java.time.LocalDateTime;

import org.springblade.core.mp.base.TenantEntity;
import org.springblade.datasource.enums.DsTypeEnum;
import org.springblade.etl.enums.JobStatus;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
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;

/**
 * SQL任务表 sql_job
 * 
 * @author aokunsang
 * @date 2023-12-03
 */
@Data
@TableName("sql_job")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SqlJob对象", description = "SQL任务")
public class SqlJob extends TenantEntity{

	private static final long serialVersionUID = 1L;
	
 	/** 
	 *  
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;
	
	/** 
	 * 分类ID 
	 */
	@ApiModelProperty(value = "分类ID")
	private Integer categoryId;

	/** 
	 * 任务名称 
	 */
	@ApiModelProperty(value = "任务名称")
	@TableField(condition = SqlCondition.LIKE)
	private String jobName;

	/** 
	 * 任务描述 
	 */
	@ApiModelProperty(value = "任务描述")
	private String jobDesc;

	/** 
	 * 上线状态 
	 */
	@ApiModelProperty(value = "上线状态")
	private JobStatus jobStatus;

	/** 
	 * 调度状态 
	 */
	@ApiModelProperty(value = "调度状态")
	private Integer triggerStatus;

	/** 
	 * xxljob的任务Cron 
	 */
	@ApiModelProperty(value = "xxljob的任务Cron")
	private String jobCron;

	/** 
	 * xxljob的任务ID 
	 */
	@ApiModelProperty(value = "xxljob的任务ID")
	private Integer xxlJobId;

	/** 
	 * 数据源ID 
	 */
	@ApiModelProperty(value = "数据源ID")
	private Integer dsId;

	/** 
	 * 数据源类型 
	 */
	@ApiModelProperty(value = "数据源类型")
	private DsTypeEnum dsType;

	/** 
	 * 公开状态(0-不公开/1-公开) 
	 */
	@ApiModelProperty(value = "公开状态(0-不公开/1-公开)")
	private Integer publicStatus;

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

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

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

	/** 
	 * 更新时间 
	 */
	@ApiModelProperty(value = "更新时间")
	private LocalDateTime updateTime;

	/** 
	 * 更新人ID 
	 */
	@ApiModelProperty(value = "更新人ID")
	private Long updateUserId;

	/** 
	 * 更新人 
	 */
	@ApiModelProperty(value = "更新人")
	private String updateBy;
}
