package thyyxxk.webserver.entity.casefrontsheet;

import lombok.Data;

@Data
public class StandardAddressMember {
    private Integer provinceCode;
    private Integer cityCode;
    private Integer districtCode;
    private String provinceName;
    private String cityName;
    private String districtName;

    public Integer[] makeStandardAddress() {
        if (null == provinceCode) {
            return null;
        }
        if (null == cityCode) {
            return new Integer[]{provinceCode};
        }
        if (null == districtCode) {
            return new Integer[]{provinceCode,cityCode};
        }
        return new Integer[]{provinceCode, cityCode, districtCode};
    }

    public String makeAddressCombo() {
        return provinceName + cityName + districtName;
    }
}
