package cn.estsh.i3plus.pojo.softswitch.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description : 定时适配任务
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2019-08-13 9:21
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "BS_SUIT_SCHEDULE")
@Api(value = "定时适配任务", description = "定时适配任务")
public class BsSuitSchedule extends BaseBean {

    private static final long serialVersionUID = 4814615639892051613L;
    @Column(name = "SUIT_CASE_ID")
    @ApiParam(value = "适配套件id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long suitCaseId;

    @Column(name = "SUIT_CASE_NAME_RDD")
    @ApiParam(value = "适配套件名称")
    private String suitCaseNameRdd;

    @Column(name = "SUIT_CASE_CODE")
    @ApiParam(value = "适配套件代码")
    private String suitCaseCode;

    @Column(name = "SCHEDULE_NAME")
    @ApiParam(value = "任务名称")
    private String scheduleName;

    @Column(name = "SCHEDULE_GROUP_NAME")
    @ApiParam(value = "任务组名称")
    private String scheduleGroupName;

    @Column(name = "TASK_PLAN_ID")
    @ApiParam(value = "任务计划id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long taskPlanId;

    @Column(name = "TASK_CYCLE_ID")
    @ApiParam(value = "任务周期id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long taskCycleId;

    @Column(name = "TASK_CYCLE_NAME_RDD")
    @ApiParam(value = "任务周期名称")
    private String taskCycleName;

    @Column(name = "TASK_CYCLE_EXECUTE_RDD")
    @ApiParam(value = "任务周期表达式表达式")
    private String taskCycleExecuteRdd;

    @Column(name = "SUIT_PARAM")
    @ApiParam(value = "适配参数")
    private String suitParam;

    @Column(name = "LAST_EXECUTE_DATE_TIME")
    @ApiParam(value = "最后一次执行时间")
    private String lastExecuteDateTime;

    @Column(name = "status")
    @ApiParam(value = "定时适配任务状态")
    private Integer status;

}

