package com.huimv.env.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 端口
 * </p>
 *
 * @author newspaper
 * @since 2024-05-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("terminal_port")
public class TerminalPort {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 端口编号
     */
    @TableField("device_code")
    private String deviceCode;

    /**
     * 终端ID
     */
    @TableField("terminal_id")
    private Integer terminalId;

    /**
     * 终端ID
     */
    @TableField("location_id")
    @Trans(type = TransType.SIMPLE, target = BasePigpen.class, fields = "buildName", alias = "build", refs = "locationName")
    private Integer locationId;

    @TableField(exist = false)
    private String locationName;

    /**
     * 小区ID
     */
    @TableField("farm_id")
    private Integer farmId;


}
