package com.jiayue.ipfcst.common.data.entity.sendertunnelinfo;

import com.jiayue.ipfcst.common.data.constant.enums.TunnelType;
import com.jiayue.ipfcst.common.data.entity.BaseTunnelInfo;
import com.jiayue.ipfcst.common.data.entity.ProtocolSenderDataPoint;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Proxy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 104协议tcp发送数据通道信息
 *
 * @author 修唯xiuwei
 * @version 3.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sender_104_tcp_tunnel_info")
@Proxy(lazy = false)
public class Sender104TcpTunnelInfo extends BaseTunnelInfo<ProtocolSenderDataPoint> {


  /**
   * 初始化时确定通道类型
   */
  public Sender104TcpTunnelInfo() {
    this.setTunnelType(TunnelType.IEC104TCPSLAVE);
  }


  /**
   * 本机端口
   */
  @Column(length = 6)
  private Integer selfPort = 2404;
  /**
   * 本机ip
   */
  @Column(length = 15)
  private String selfIp;

  /**
   * 公共地址位
   */
  @Column(length = 3)
  private Integer publicAddress = 1;


  /**
   * 远端ip
   */
  @Column
  private String remoteIp;



}
