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 instructionSetTemplate(
 * <br/>       templateName         varchar(50)                    null,
 * <br/>       templateCode         varchar(50)                    null,
 * <br/>       templateTypeId       bigint                         null,
 * <br/>       templateTypeNameRdd  varchar(50)                    null,
 * <br/>       templateDescription  varchar(50)                    null,
 * <br/>       templateStepNum      int                            null
 * <br/>   );
 *
 * <br/>   comment on table instructionSetTemplate is'指令集模板';
 * <br/>   comment on column instructionSetTemplate.templateName is'模板名称';
 * <br/>   comment on column instructionSetTemplate.templateCode is'模板代码';
 * <br/>   comment on column instructionSetTemplate.templateTypeId is'模板大类id';
 * <br/>   comment on column instructionSetTemplate.templateTypeNameRdd is'模板大类名称';
 * <br/>   comment on column instructionSetTemplate.templateDescription is'模板描述';
 * <br/>   comment on column instructionSetTemplate.templateStepNum is'模板步骤';
 * </per>
 * @Reference :
 * @Author : wei.peng
 * @CreateDate : 19-10-25 下午5:45
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="LAC_COMMAND_STACK_TEMPLATE")
@Api(value="指令集模板",description = "指令集模板信息")
public class LacCommandStackTemplate extends BaseBean {

    private static final long serialVersionUID = 4884527553767334910L;
    @Column(name="TEMPLATE_NAME")
    @ApiParam(value ="模板名称")
    private String templateName;

    @Column(name="TEMPLATE_CODE")
    @ApiParam(value ="模板代码")
    private String templateCode;

    @Column(name="STACK_TYPE_ID")
    @ApiParam(value ="指令集类型")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long stackTypeId;

    @Column(name="STACK_TYPE_NAME_RDD")
    @ApiParam(value ="类型名称")
    private String stackTypeNameRdd;

    @Column(name="TYPE_DESCRIPTION")
    @ApiParam(value ="模板大类名称")
    private String typeDescription;

    @Column(name="TEMPLATE_NUM")
    @ApiParam(value ="适配器使用数量")
    private Integer templateNum;

    @Column(name="TEMPLATE_DESCRIPTION")
    @ApiParam(value ="模板描述")
    private String templateDescription;

    @Transient
    @ApiParam(value ="步骤列表")
    private List<LacCommandStackStep> stepList;
}
