package com.bcxin.risk.common.dto.data;

import lombok.Data;

import java.util.Map;

/**
* @author Administrator
 */

@Data

public class RegionalizationDataDto {

	private String oid;

    private String createOn;

	private String name; //联系人

    private String address; //联系地址

    private String phone; //联系电话

    private String area;  // 区域ID

    private String city;  // 城市ID

    private String province;  // 省份ID

    private String updateOn;

    public RegionalizationDataDto(Map<String,Object> map){
        this.oid = safeTransfor(map.get("oid"));
        this.createOn = safeTransfor(map.get("createOn"));
        this.updateOn = safeTransfor(map.get("updateOn"));
        this.name = safeTransfor(map.get("name"));
        this.address = safeTransfor(map.get("address"));
        this.phone = safeTransfor(map.get("phone"));
        this.area = safeTransfor(map.get("area"));
        this.city = safeTransfor(map.get("city"));
        this.province = safeTransfor(map.get("province"));
    }

    private String safeTransfor(Object obj){
        if ( obj == null ) {
            return "";
        }
        return obj.toString();
    }


}
