package com.hdkj.lt.core.sys.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@TableName(value = "map_org_mapping")
@Data
public class MapOrgMapping {
    /**
     * id
     */
    @TableId(value = "ID", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     *
     */
    private Long struId;
    /**
     * 上级id
     */
    private Long parentId;

    /**
     * 机构名称
     */
    private String organName;

    /**
     *
     */
    private String mapOrgCode;

    /**
     *
     */
    private String mapOrgName;

    /**
     *
     */
    private String longitude;
    /**
     *
     */
    private String latitude;

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

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MapOrgMapping other = (MapOrgMapping) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getStruId() == null ? other.getStruId() == null : this.getStruId().equals(other.getStruId()))
                && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
                && (this.getOrganName() == null ? other.getOrganName() == null : this.getOrganName().equals(other.getOrganName()))
                && (this.getMapOrgCode() == null ? other.getMapOrgCode() == null : this.getMapOrgCode().equals(other.getMapOrgCode()))
                && (this.getMapOrgName() == null ? other.getMapOrgName() == null : this.getMapOrgName().equals(other.getMapOrgName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStruId() == null) ? 0 : getStruId().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getOrganName() == null) ? 0 : getOrganName().hashCode());
        result = prime * result + ((getMapOrgCode() == null) ? 0 : getMapOrgCode().hashCode());
        result = prime * result + ((getMapOrgName() == null) ? 0 : getMapOrgName().hashCode());
        return result;
    }

    @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(", struId=").append(struId);
        sb.append(", parentId=").append(parentId);
        sb.append(", organName=").append(organName);
        sb.append(", mapOrgCode=").append(mapOrgCode);
        sb.append(", mapOrgName=").append(mapOrgName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}