package de.votian.services.entity;

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

public class ServiceZoneMappingId implements Serializable {

    private Long zoneId;
    private Long zipCodeId;

    public ServiceZoneMappingId() {
    }

    public ServiceZoneMappingId(Long zoneId, Long zipCodeId) {
        this.zoneId = zoneId;
        this.zipCodeId = zipCodeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ServiceZoneMappingId that = (ServiceZoneMappingId) o;
        return Objects.equals(zoneId, that.zoneId) && Objects.equals(zipCodeId, that.zipCodeId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(zoneId, zipCodeId);
    }
}
