package com.willalp.device.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 网络配置 对象 pns_network_config
 *
 * @author willalp
 * @date 2021-11-23
 */

@TableName("pns_network_config")
public class NetworkConfig extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 网络配置ID
     */
    @TableId
    private String networkConfigId;

    /**
     * 设备ID
     */
    @Excel(name = "设备ID")
    private String deviceId;

    /**
     * 设备ID
     */
    @Excel(name = "设备名称")
    @TableField(exist = false)
    private String deviceName;

    /**
     * 服务器IP地址
     */
    @Excel(name = "服务器IP地址")
    private String deviceServerIp;

    /**
     * socket端口号
     */
    @Excel(name = "socket端口号")
    private Long socketPortNumber;

    /**
     * 服务器端口号
     */
    @Excel(name = "服务器端口号")
    private Long serverPortNumber;

    /**
     * 关联配置id（同表主键字段）
     */
    @Excel(name = "关联配置id" , readConverterExp = "同=表主键字段")
    private Long relationConfigId;

    /**
     * 是否删除（0.未删除；1.已删除）
     */
    @TableLogic
    private Integer isDelete;

    public String getNetworkConfigId() {
        return networkConfigId;
    }

    public void setNetworkConfigId(String networkConfigId) {
        this.networkConfigId = networkConfigId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceServerIp() {
        return deviceServerIp;
    }

    public void setDeviceServerIp(String deviceServerIp) {
        this.deviceServerIp = deviceServerIp;
    }

    public Long getSocketPortNumber() {
        return socketPortNumber;
    }

    public void setSocketPortNumber(Long socketPortNumber) {
        this.socketPortNumber = socketPortNumber;
    }

    public Long getServerPortNumber() {
        return serverPortNumber;
    }

    public void setServerPortNumber(Long serverPortNumber) {
        this.serverPortNumber = serverPortNumber;
    }

    public Long getRelationConfigId() {
        return relationConfigId;
    }

    public void setRelationConfigId(Long relationConfigId) {
        this.relationConfigId = relationConfigId;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("networkConfigId" , getNetworkConfigId())
                .append("deviceId" , getDeviceId())
                .append("deviceServerIp" , getDeviceServerIp())
                .append("socketPortNumber" , getSocketPortNumber())
                .append("serverPortNumber" , getServerPortNumber())
                .append("relationConfigId" , getRelationConfigId())
                .append("isDelete" , getIsDelete())
                .append("createTime" , getCreateTime())
                .append("updateTime" , getUpdateTime())
                .toString();
    }
}
