package com.ifish.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 用户资产表(金币,经验值等)
 * @author Administrator
 */
@Entity
@Table(name="tbl_user_asset")
public class UserAsset implements Serializable{
	
	private static final long serialVersionUID = 5604899088149487004L;
	/**
	 * 用户ID
	 */
	@Id
	@Column(name="user_id",nullable=false)
	private Integer userId;
	/**
	 * 经验值
	 */
	@Column(name="grade_value",nullable=false)
	private Integer gradeValue;
	/**
	 * 金币
	 */
	@Column(name="gold_value",nullable=false,precision=9,scale=2)
	private BigDecimal goldValue;
	/**
	 * 最后一次签到日期
	 */
	@Column(name="last_signin_date",nullable=false)
	private String lastSigninDate;
	/**
	 * 连续签到天数
	 */
	@Column(name="keep_signin_num",nullable=false)
	private Integer keepSigninNum;
	/**
	 * 最后一次登陆日期
	 */
	@Column(name="last_login_date",nullable=false)
	private String lastLoginDate;
	
	public UserAsset() {}
	
	public UserAsset(Integer userId) {
		this.userId = userId;
		this.gradeValue = 0;
		this.goldValue = new BigDecimal(0);
		this.lastSigninDate = "";
		this.keepSigninNum = 0;
		this.lastLoginDate = "";
	}
	
	public UserAsset(Integer userId,BigDecimal goldValue) {
		this.userId = userId;
		this.gradeValue = 0;
		this.goldValue = goldValue;
		this.lastSigninDate = "";
		this.keepSigninNum = 0;
		this.lastLoginDate = "";
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Integer getGradeValue() {
		return gradeValue;
	}
	public void setGradeValue(Integer gradeValue) {
		this.gradeValue = gradeValue;
	}
	public BigDecimal getGoldValue() {
		return goldValue;
	}
	public void setGoldValue(BigDecimal goldValue) {
		this.goldValue = goldValue;
	}
	public String getLastSigninDate() {
		return lastSigninDate;
	}
	public void setLastSigninDate(String lastSigninDate) {
		this.lastSigninDate = lastSigninDate;
	}
	public Integer getKeepSigninNum() {
		return keepSigninNum;
	}
	public void setKeepSigninNum(Integer keepSigninNum) {
		this.keepSigninNum = keepSigninNum;
	}
	public String getLastLoginDate() {
		return lastLoginDate;
	}
	public void setLastLoginDate(String lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}
	
}
