package com.platform.modules.foreign.entity;

import com.google.gson.Gson;

/**
 * 爱济南用户信息
 * 
 * @author Anine
 * @date 2019/3/13
 */
public class AiJiNanUserInfoModel {
	private Long userId;
	private String avatar;
	private String userName;

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String toJson() {
		return "{" + "userId=" + userId + ", avatar='" + avatar + '\'' + ", userName='" + userName + '\'' + '}';
	}

	public AiJiNanUserInfoModel() {
	}

	public static void main(String[] args) {
		AiJiNanUserInfoModel model = new AiJiNanUserInfoModel();
		model.setUserName("username");
		model.setUserId(123456L);
		model.setAvatar("ht");
		String string = model.toJson();
		System.out.println(string);
		Gson gson = new Gson();
		AiJiNanUserInfoModel model1 = gson.fromJson(string, AiJiNanUserInfoModel.class);
		System.out.println("\n");
	}
}
