package org.texttechnologylab.project.gruppe_05_1.domain.mdb;

import java.util.List;
import java.util.Objects;
import java.util.StringJoiner;

public abstract class MdbDocument {

    private String version;
    private List<Mdb> mdbs;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public List<Mdb> getMdbs() {
        return mdbs;
    }

    public void setMdbs(List<Mdb> mdbs) {
        this.mdbs = mdbs;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MdbDocument that)) return false;
        return Objects.equals(version, that.version) && Objects.equals(mdbs, that.mdbs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(version, mdbs);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", MdbDocument.class.getSimpleName() + "[", "]")
                .add("version='" + version + "'")
                .add("mdbs=" + mdbs)
                .toString();
    }
}
