package com.persagy.dmp.define.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.persagy.dmp.common.model.entity.AuditableEntity;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * 项目设备类边关系表
 * @TableName dt_equip_class_rel
 */
@TableName(value ="dt_equip_class_rel")
@Data
@EqualsAndHashCode(callSuper = true)
public class DigitalEquipClassRel extends AuditableEntity<DigitalEquipClassRel> {

    /**
     * 集团编码
     */
    @TableField(value = "group_code")
    private String groupCode;

    /**
     * 项目id
     */
    @TableField(value = "project_id")
    private String projectId;

    /**
     * 源端设备类编码
     */
    @TableField(value = "source_equip_code")
    private String sourceEquipCode;

    /**
     * 末端设备类编码
     */
    @TableField(value = "end_equip_code")
    private String endEquipCode;

    /**
     * 图类型编码
     */
    @TableField(value = "graph_code")
    private String graphCode;

    /**
     * 边类型编码
     */
    @TableField(value = "rel_code")
    private String relCode;

    /**
     * 边类型编码
     */
    @TableField(value = "rel_code_name")
    private String relCodeName;

    /**
     * 边类型名称
     */
    @TableField(exist = false)
    private String calcName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", projectId=").append(projectId);
        sb.append(", sourceEquipCode=").append(sourceEquipCode);
        sb.append(", endEquipCode=").append(endEquipCode);
        sb.append(", graphCode=").append(graphCode);
        sb.append(", relCode=").append(relCode);
        sb.append(", creator=").append(creator);
        sb.append(", creationTime=").append(creationTime);
        sb.append(", modifier=").append(modifier);
        sb.append(", modifiedTime=").append(modifiedTime);
        sb.append(", valid=").append(valid);
        sb.append(", ts=").append(ts);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}