package vn.azteam.tpf.service.dto;

import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the TBExternalTable entity.
 */
public class TBExternalTableDTO implements Serializable {

    private Long id;

    private String name;

    private String description;

    private Integer objectType;

    private String relationTable;

    private String foreignKey;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getObjectType() {
        return objectType;
    }

    public void setObjectType(Integer objectType) {
        this.objectType = objectType;
    }

    public String getRelationTable() {
        return relationTable;
    }

    public void setRelationTable(String relationTable) {
        this.relationTable = relationTable;
    }

    public String getForeignKey() {
        return foreignKey;
    }

    public void setForeignKey(String foreignKey) {
        this.foreignKey = foreignKey;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        TBExternalTableDTO tBExternalTableDTO = (TBExternalTableDTO) o;
        if (tBExternalTableDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), tBExternalTableDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "TBExternalTableDTO{" +
            "id=" + getId() +
            ", name='" + getName() + "'" +
            ", description='" + getDescription() + "'" +
            ", objectType=" + getObjectType() +
            "}";
    }
}
