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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.LacEnumUtil;
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;
import javax.persistence.Transient;

/**
 * @Description :
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2019-12-09 14:47
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="LAC_TASK_CHECK")
@Api(value="任务检查",description = "任务检查")
public class LacTaskCheck extends BaseBean {

    private static final long serialVersionUID = -4157772560831884634L;
    @Column(name="COMMAND_STACK_TEMPLATE_ID")
    @ApiParam(value ="指令集模板ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commandStackTemplateId;

    @Column(name="STEP_ID")
    @ApiParam(value ="步骤ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long stepId;

    @Column(name="STEP_TASK_ID")
    @ApiParam(value ="步骤ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long stepTaskId;

    @Column(name="TASK_ID")
    @ApiParam(value ="任务ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long taskId;

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

    @Column(name="TASK_CHECK_TYPE")
    @ApiParam(value ="任务检查类型")
    @AnnoOutputColumn(refClass = LacEnumUtil.TASK_CHECK_TYPE.class)
    private Integer taskCheckType;

    @Column(name="TASK_CHECK_GROUP")
    @ApiParam(value ="任务检查组")
    private String taskCheckGroup;

    @Column(name="PARAM_ID")
    @ApiParam(value ="参数id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long paramId;

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

    @Column(name="PARAM_VALUE_TYPE")
    @ApiParam(value ="参数值类型")
    @AnnoOutputColumn(refClass = LacEnumUtil.PARAM_VALUE_TYPE.class)
    private Integer paramValueType;

    @Column(name="RELATIONAL_OPERATOR")
    @ApiParam(value ="关系运算符")
    @AnnoOutputColumn(refClass = LacEnumUtil.RELATIONAL_OPERATOR.class)
    private Integer relationalOperator;

    @Column(name="LOGICAL_OPERATOR")
    @ApiParam(value ="逻辑运算符")
    @AnnoOutputColumn(refClass = LacEnumUtil.LOGICAL_OPERATOR.class)
    private Integer logicalOperator;

    @Column(name="CHECK_VALUE")
    @ApiParam(value ="检查值")
    private String checkValue;

    @Column(name="TARGET_STEP_ID")
    @ApiParam(value ="目标步骤ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long targetStepId;

    @Column(name="TARGET_STEP_NAME_RDD")
    @ApiParam(value ="目标步骤名称")
    private String targetStepNameRdd;

    @Transient
    private String value;
}
