package cn.estsh.i3plus.pojo.lac.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;
import javax.persistence.Transient;
import java.util.List;

/**
 * @Description :
 * <per>
 * <br/>  create table LacInstructionSetStep(
 * <br/>           templateId           bigint                         null,
 * <br/>           templateNameRdd      varchar(50)                    null,
 * <br/>           templateCode         varchar(50)                    null,
 * <br/>           stepName             varchar(50)                    null,
 * <br/>           stepSort             int                            null,
 * <br/>           stepExecCond         double                         null,
 * <br/>           stepDescription      varchar(255)                   null
 * <br/>   );
 *
 * <br/>   comment on table LacInstructionSetStep is'指令集模板步骤';
 * <br/>   comment on column LacInstructionSetStep.templateId is'模板id';
 * <br/>   comment on column LacInstructionSetStep.templateNameRdd is'模板名称';
 * <br/>   comment on column LacInstructionSetStep.templateCode is'模板代码';
 * <br/>   comment on column LacInstructionSetStep.stepName is'步骤名称';
 * <br/>   comment on column LacInstructionSetStep.stepSort is'步骤顺序';
 * <br/>   comment on column LacInstructionSetStep.stepExecCond is'步骤执行条件';
 * <br/>   comment on column LacInstructionSetStep.stepDescription is'步骤描述';
 * </per>
 * @Reference :
 * @Author : wei.peng
 * @CreateDate : 19-10-25 下午5:53
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="LAC_COMMAND_STACK_STEP")
@Api(value="指令集步骤",description = "指令集步骤")
public class LacCommandStackStep extends BaseBean {

    private static final long serialVersionUID = 4053765920069631323L;
    @Column(name="TEMPLATE_ID")
    @ApiParam(value ="模板ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long templateId;

    @Column(name="TEMPLATE_NAME_RDD")
    @ApiParam(value ="模板名称")
    private String templateNameRdd;

    @Column(name="STEP_NAME")
    @ApiParam(value ="步骤名称")
    private String stepName;

    @Column(name="STEP_CODE")
    @ApiParam(value ="步骤代码")
    private String stepCode;

    @Column(name="STEP_SORT")
    @ApiParam(value ="步骤顺序")
    private Integer stepSort;

    @Column(name="STEP_EXEC_COND")
    @ApiParam(value ="步骤执行条件")
    private Double stepExecCond;

    @Column(name="STEP_DESCRIPTION")
    @ApiParam(value ="步骤描述")
    private String stepDescription;

    @Transient
    @ApiParam(value ="步骤任务列表")
    private List<LacCommandStackStepTask> stepTaskList;

    @Transient
    @ApiParam(value ="步骤任务检查")
    private List<LacTaskCheck> taskCheckList;

    public LacCommandStackStep() {
    }

    public LacCommandStackStep(Long templateId) {
        this.templateId = templateId;
    }
}
