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

        Train train = (Train) o;

        if (id != train.id) return false;
        if (totalSeats != train.totalSeats) return false;
        if (departure != null ? !departure.equals(train.departure) : train.departure != null) return false;
        if (name != null ? !name.equals(train.name) : train.name != null) return false;

        return true;
    }