package com.dcs.hnyz.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.dcs.common.annotation.Excel;
import com.dcs.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * PLC信息管理对象 plc_info
 *
 * @author hmy
 * @date 2025-04-27
 */
@Data
@TableName("plc_info")
@ApiModel(value = "PLC信息对象", description = "PLC信息管理")
public class PlcInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，自增
     */
    @TableId(value = "plc_id")
    @ApiModelProperty(value = "主键，自增")
    private Long plcId;

    /**
     * PLC名称
     */
    @Excel(name = "PLC名称")
    @TableField(value = "plc_name")
    @ApiModelProperty(value = "plc名称")
    private String plcName;

    /**
     * PLC的IP地址
     */
    @Excel(name = "PLC的IP地址")
    @TableField(value = "ip_address")
    @ApiModelProperty(value = "PLC的IP地址")
    private String ipAddress;

    /**
     * 通信端口
     */
    @Excel(name = "通信端口")
    @TableField(value = "port")
    @ApiModelProperty(value = "通信端口")
    private Long port;

    /**
     * 采集间隔（单位：毫秒）
     */
    @Excel(name = "采集间隔(ms)")
    @TableField(value = "scan_interval")
    @ApiModelProperty(value = "采集间隔（单位：毫秒）")
    private Long scanInterval;

    /**
     * 连接超时时间（秒）
     */
    @Excel(name = "连接超时时间(秒)")
    @TableField(value = "connect_timeout")
    @ApiModelProperty(value = "连接超时时间（秒）")
    private Long connectTimeout;

    /**
     * 协议id
     */
    @TableField(value = "protocol_id")
    @ApiModelProperty(value = "协议id")
    private Long protocolId;

    /**
     * 启用状态（0-启用,1-禁用）
     */
    @Excel(name = "启用状态", readConverterExp = "0-启用,1-禁用")
    @TableField(value = "status")
    @ApiModelProperty(value = "启用状态（0-启用,1-禁用）")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableField(value = "del_flag")
    @TableLogic
    @ApiModelProperty(value = "删除标志（0代表存在 2代表删除）")
    private String delFlag;

}
