package com.goafanti.common.model;

import java.io.Serializable;
import java.util.UUID;

import com.alibaba.fastjson.JSON;

public class BaseModel implements Serializable {

	/**
	 * 
	 */
	private static final long	serialVersionUID	= 1L;

	private String				id;

	@Override
	public String toString() {
		return JSON.toJSONString(this);
	}

	public String getId() {
		if (id == null) {
			this.id = UUID.randomUUID().toString().replace("-", "");
		}
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
