package com.ifish.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ifish.serializer.CustomDateSerializer;

/** 
 * 用户信息
 * @date 2015年7月2日 下午16:40:00 
 *  
 */
@Entity
@Table(name="tbl_user")
public class User implements Serializable{

	private static final long serialVersionUID = 9090213827766125261L;
	/**
	 * 用户ID
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="user_id")
	private Integer userId;
	/**
	 * 用户昵称
	 */
	@Column(name="nick_name",nullable=false,length=20)
	private String nickName;
	/**
	 * 用户密码
	 */
	@Column(name="user_password",nullable=false,length=32)
	private String userPassword;
	/**
	 * 手机号码
	 */
	@Column(name="phone_number",unique=true,nullable=false,length=11)
	private String phoneNumber;
	/**
	 * 用户头像
	 */
	@Column(name="user_img",length=100)
	private String userImg;
	/**
	 * 性别
	 */
	@Column(name="user_sex",length=1)
	private String userSex;
	/**
	 * 个性签名
	 */
	@Column(name="signature",length=30)
	private String signature;
	/**
	 * 注册手机类型
	 */
	@Column(name="phone_type",updatable=false,length=10)
	private String phoneType;
	/**
	 * 登陆手机类型
	 */
	@Column(name="login_type",updatable=false,length=10)
	private String loginType;
	/**
	 * 最后一次登陆
	 */
	@Column(name="login_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date loginTime;
	/**
	 * 地址
	 */
	@Column(name="address",length=200)
	private String address;
	/**
	 * 是否注册技威
	 */
	@Column(name="is_register_gwell",length=1)
	private String isRegisterGwell;
	/**
	 * code1
	 */
	@Column(name="P2PVerify_code1",length=50)
	private String p2PVerifyCode1;
	/**
	 * code2
	 */
	@Column(name="P2PVerify_code2",length=50)
	private String p2PVerifyCode2;
	/**
	 * UserID
	 */
	@Column(name="gwell_userID",length=50)
	private String gwellUserID;
	/**
	 * 是否注册云信
	 */
	@Column(name="is_register_netease",length=1)
	private String isRegisterNetease;
	/**
	 * 云信token
	 */
	@Column(name="netease_token",length=50)
	private String neteaseToken;
	/**
	 * 用户类型(0:普通用户,1:商家用户)
	 */
	@Column(name="user_type",length=10)
	private String userType;
	/**
	 * 商家ID
	 */
	@Column(name="shops_user_id")
	private Integer shopsUserId;
	/**
	 * 经度
	 */
	@Column(name="longitude")
	private Double longitude;
	/**
	 * 纬度
	 */
	@Column(name="latitude")
	private Double latitude;
	/**
	 * 修改时间
	 */
	@JsonSerialize(using = CustomDateSerializer.class)
	@Column(name="update_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date updateTime;
	/**
	 * 创建时间
	 */
	@JsonSerialize(using = CustomDateSerializer.class)
	@Column(name="create_time",updatable=false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;

	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getUserPassword() {
		return userPassword;
	}
	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getUserImg() {
		return userImg;
	}
	public void setUserImg(String userImg) {
		this.userImg = userImg;
	}
	public String getUserSex() {
		return userSex;
	}
	public void setUserSex(String userSex) {
		this.userSex = userSex;
	}
	public String getSignature() {
		return signature;
	}
	public void setSignature(String signature) {
		this.signature = signature;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getPhoneType() {
		return phoneType;
	}
	public void setPhoneType(String phoneType) {
		this.phoneType = phoneType;
	}

	public String getLoginType() {
		return loginType;
	}

	public void setLoginType(String loginType) {
		this.loginType = loginType;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getIsRegisterGwell() {
		return isRegisterGwell;
	}
	public void setIsRegisterGwell(String isRegisterGwell) {
		this.isRegisterGwell = isRegisterGwell;
	}
	public String getGwellUserID() {
		return gwellUserID;
	}
	public void setGwellUserID(String gwellUserID) {
		this.gwellUserID = gwellUserID;
	}
	public String getP2PVerifyCode1() {
		return p2PVerifyCode1;
	}
	public void setP2PVerifyCode1(String p2pVerifyCode1) {
		p2PVerifyCode1 = p2pVerifyCode1;
	}
	public String getP2PVerifyCode2() {
		return p2PVerifyCode2;
	}
	public void setP2PVerifyCode2(String p2pVerifyCode2) {
		p2PVerifyCode2 = p2pVerifyCode2;
	}
	public String getUserType() {
		return userType;
	}
	public void setUserType(String userType) {
		this.userType = userType;
	}
	public Integer getShopsUserId() {
		return shopsUserId;
	}
	public void setShopsUserId(Integer shopsUserId) {
		this.shopsUserId = shopsUserId;
	}
	public String getIsRegisterNetease() {
		return isRegisterNetease;
	}
	public void setIsRegisterNetease(String isRegisterNetease) {
		this.isRegisterNetease = isRegisterNetease;
	}
	public String getNeteaseToken() {
		return neteaseToken;
	}
	public void setNeteaseToken(String neteaseToken) {
		this.neteaseToken = neteaseToken;
	}
	public Double getLongitude() {
		return longitude;
	}
	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}
	public Double getLatitude() {
		return latitude;
	}
	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}
	public Date getLoginTime() {
		return loginTime;
	}
	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

}
