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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
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 : jimmy.zeng
 * @CreateDate : 2020-10-28 9:54
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_PLC")
@Api("WMSPLC配置表")
public class WmsPlc extends BaseBean {

    @Column(name = "PLC_CODE")
    @ApiParam("PLC代码")
    private String plcCode;

    @Column(name = "PLC_NAME")
    @ApiParam("PLC名称")
    private String plcName;

    @Column(name = "BUSI_TYPE")
    @ApiParam("业务类型")
    @AnnoOutputColumn(refClass = WmsEnumUtil.PLC_BUSI_TYPE.class)
    private Integer busiType;

    @Column(name = "OPC_URL")
    @ApiParam("OPC路径")
    private String opcUrl;

    @Column(name = "CHANNEL")
    @ApiParam("通道")
    private String channel;

    @Column(name = "DEVICE")
    @ApiParam("终端")
    private String device;

    @Column(name = "TAG_NAME")
    @ApiParam("标签名称")
    private String tagName;

    @Column(name = "TAG_ADDRESS")
    @ApiParam("标签地址")
    private String tagAddress;

    @Column(name = "DATA_TYPE")
    @ApiParam("标签数据类型")
    private String dataType;

    /*@Column(name = "DATA_TYPE")
    @ApiParam("标签类别")
    private Integer dataType;*/

    @Column(name = "USER_NAME")
    @ApiParam("用户名")
    private String userName;

    @Column(name = "PASSWORD")
    @ApiParam("密码")
    private String password;

    @Column(name = "START_VALUE")
    @ApiParam("开始节点")
    private Integer startValue;

    @Column(name = "end_VALUE")
    @ApiParam("结束节点")
    private Integer endValue;

    @Column(name = "NAME_SPACE_INDEX")
    @ApiParam("空间索引")
    private Integer nameSpaceIndex = 2;

    @Column(name = "REQUEST_INTERVAL")
    @ApiParam("请求间隔")
    private Double requestInterval = 500.0;



}
