package com.slodon.b2b2c.vo.member;

import com.slodon.b2b2c.enums.WebSiteConstant;
import com.slodon.b2b2c.system.pojo.Country;
import lombok.Data;

import java.io.Serializable;

/**
 * @author cyan
 */
@Data
public class CountryPhoneCodeVO implements Serializable {

    private static final long serialVersionUID = -8426680439937326616L;

    private String label;

    private String value;

    public CountryPhoneCodeVO(Country country, String webSite) {
        label = country.getName();
        if (!WebSiteConstant.MEMBER_OVERSEA.equals(webSite)) {
            label = country.getZhName();
        }
        value = country.getPhoneCode();
    }
}
