package cn.estsh.i3plus.pojo.platform.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.Index;
import javax.persistence.Table;

/**
 * @Description : 硬件设备表
 * @Reference   :
 * @Author      : wei.peng
 * @Date        : 2018-10-22 16:58:44.033
 * @Modify      :
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_TOOL",indexes =
                        {
                            @Index(name="sys_tool_tool_type_idx",columnList = "tool_type_id"),
                            @Index(name="sys_tool_tool_status_idx",columnList = "TOOL_STATUS"),
                            @Index(name="sys_tool_tool_conn_type_idx",columnList = "TOOL_CONN_TYPE"),
                            @Index(name="sys_tool_tool_data_type_idx",columnList = "TOOL_DATA_TYPE")
                        })
@Api(value="硬件设备表",description = "硬件设备表")
public class SysTool extends BaseBean {

    private static final long serialVersionUID = 100098534186501411L;
    @Column(name="NAME")
    @ApiParam(value ="名称" , access ="名称")
    private String name;

    @Column(name="TOOL_TYPE_ID")
    @ApiParam(value ="类型ID" , example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long toolTypeId;

    @Column(name="TOOL_TYPE_NAME_RDD")
    @ApiParam(value ="类型名称" , access ="类型名称")
    private String toolTypeNameRdd;
 
    @Column(name="TOOL_STATUS")
    @ApiParam(value ="设备状态（枚举：枚举：1.正常，2.禁用）" , example ="-1")
    private Integer toolStatus;
 
    @Column(name="TOOL_IP")
    @ApiParam(value ="IP地址" , access ="IP地址")
    private String toolIp;
 
    @Column(name="TOOL_PORT")
    @ApiParam(value ="端口" , example ="80" , access ="端口")
    private Integer toolPort;
 
    @Column(name="TOOL_CONN_TYPE")
    @ApiParam(value ="连接方式（枚举：1.网口，2.串口，3.USB......）" , example ="-1")
    private Integer toolConnType;
 
    @Column(name="TOOL_DATA_TYPE")
    @ApiParam(value ="传输数据类型（枚举：1.字符串，2.二进制数据流....）" , example ="-1")
    private Integer toolDataType;
 
    @Column(name="TOOL_OPERATING")
    @ApiParam(value ="操作内容" , access ="操作内容")
    private String toolOperating;
 
    @Column(name="TOOL_DESCRIPTION")
    @ApiParam(value ="描述" , access ="描述")
    private String toolDescription;

}
