package com.ningdatech.pmapi.expert.model;

import lombok.Data;

import java.util.Objects;

/**
 * @author liuxinxin
 * @date 2022/7/22 上午10:07
 */
@Data
public class RegionDtoMapKey {

    /**
     * 区域码
     */
    private String regionCode;

    /**
     * 地区级别
     */
    private Integer regionLevel;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        RegionDtoMapKey regionDtoMapKey = (RegionDtoMapKey) o;
        return regionCode.equals(regionDtoMapKey.getRegionCode()) &&
                regionLevel.equals(regionDtoMapKey.getRegionLevel());
    }

    @Override
    public int hashCode() {
        return Objects.hash(regionCode, regionLevel);
    }
}
