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

import com.bcxin.risk.hibernateplus.entity.page.Page;
import lombok.Data;

import java.util.Map;

/**
 * @param oid
 * @return
 * @auther Administrator
 * @date 2017/09/12 0012
 * @注意事项 </b>
 */
@Data
public class PoliceUserDataDto {
    private String createOn;
    private String oid;
    private String province_id;
    private String city_id;
    private String area_id;
    private String realName;
    private String userName;
    private String phone;
    private String email;
    private String active;

    private String address;

    private Page page;

    public PoliceUserDataDto(Map<String,Object> map){
        this.createOn = safeTransfor(map.get("createOn"));
        this.oid = safeTransfor(map.get("oid"));
        this.province_id = safeTransfor(map.get("province_id"));
        this.city_id = safeTransfor(map.get("city_id"));
        this.area_id = safeTransfor(map.get("area_id"));
        this.realName = safeTransfor(map.get("realName"));
        this.userName = safeTransfor(map.get("userName"));
        this.phone = safeTransfor(map.get("phone"));
        this.email = safeTransfor(map.get("email"));
        this.active = safeTransfor(map.get("active"));

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

}
