package com.ningdatech.carapi.sys.entity.dto;

import lombok.Data;

import java.util.Objects;

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

    /**
     * 区域码
     */
    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;
        }
        RegionMapKey key = (RegionMapKey) o;
        return regionCode.equals(key.getRegionCode()) && regionLevel.equals(key.getRegionLevel());
    }

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