package de.avatic.lcc.model.db.materials;

import java.util.Objects;


public class Material {

    private Integer id;

    private String partNumber;

    private String normalizedPartNumber;

    private String hsCode;

    private String name;

    private Boolean isDeprecated;

    public Integer getId() {
        return id;
    }

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

    public String getPartNumber() {
        return partNumber;
    }

    public void setPartNumber(String partNumber) {
        this.partNumber = partNumber;
    }

    public String getNormalizedPartNumber() {
        return normalizedPartNumber;
    }

    public void setNormalizedPartNumber(String normalizedPartNumber) {
        this.normalizedPartNumber = normalizedPartNumber;
    }

    public String getHsCode() {
        return hsCode;
    }

    public void setHsCode(String hsCode) {
        this.hsCode = hsCode;
    }

    public String getName() {
        return name;
    }

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

    public Boolean getDeprecated() {
        return isDeprecated;
    }

    public void setDeprecated(Boolean deprecated) {
        isDeprecated = deprecated;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        Material material = (Material) o;
        return Objects.equals(id, material.id) && Objects.equals(partNumber, material.partNumber) && Objects.equals(normalizedPartNumber, material.normalizedPartNumber) && Objects.equals(hsCode, material.hsCode) && Objects.equals(name, material.name) && Objects.equals(isDeprecated, material.isDeprecated);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, partNumber, normalizedPartNumber, hsCode, name, isDeprecated);
    }

    @Override
    public String toString() {
        return "Material{" +
                "id=" + id +
                ", partNumber='" + partNumber + '\'' +
                ", normalizedPartNumber='" + normalizedPartNumber + '\'' +
                ", hsCode='" + hsCode + '\'' +
                ", name='" + name + '\'' +
                ", isDeprecated=" + isDeprecated +
                '}';
    }
}
