package de.votian.services.entity;

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

public class ServiceZipCodeAreaMappingId implements Serializable {

    private Long zipCodeId;
    private Long areaId;

    public ServiceZipCodeAreaMappingId() {
    }

    public ServiceZipCodeAreaMappingId(Long zipCodeId, Long areaId) {
        this.zipCodeId = zipCodeId;
        this.areaId = areaId;
    }

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

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