package com.ifish.entity;

import java.io.Serializable;
import java.math.BigDecimal;
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;

/**
 * 优惠券兑换记录
 * @author Administrator
 *
 */
@Entity
@Table(name="tbl_coupon_record")
public class CouponRecord implements Serializable {

	private static final long serialVersionUID = 5703119042203252824L;
	/**
	 *记录ID
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="record_id")
	private Integer recordId;
	/**
	 * 用户ID
	 */
	@Column(name="user_id",nullable=false)
	private Integer userId;
	/**
	 * 优惠券ID
	 */
	@Column(name="coupon_id",nullable=false)
	private Integer couponId;
	/**
	 * 兑换RMB价值
	 */
	@Column(name="money_value",nullable=false)
	private Integer moneyValue;
	/**
	 * 兑换所需金币
	 */
	@Column(name="need_gold",precision=6,scale=2,nullable=false)
	private BigDecimal needGold;
	/**
	 * 使用兑换券需要消费金额
	 */
	@Column(name="use_need_money",nullable=false)
	private Integer useNeedMoney;
	/**
	 * 文字标签
	 */
	@Column(name="tag_text",length=20)
	private String tagText;
	/**
	 * 有效开始时间
	 */
	@Column(name="valid_start_date")
	@Temporal(TemporalType.DATE)
	private Date validStartDate;
	/**
	 * 有效结束时间
	 */
	@Column(name="valid_end_date")
	@Temporal(TemporalType.DATE)
	private Date validEndDate;
	/**
	 * 激活码
	 */
	@Column(name="activation_code",length=8,nullable=false)
	private String activationCode;
	/**
	 * 是否使用过
	 */
	@Column(name="is_used",nullable=false,length=1)
	private String isUsed;
	/**
	 * 创建时间
	 */
	@Column(name="create_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	
	public Integer getRecordId() {
		return recordId;
	}
	public void setRecordId(Integer recordId) {
		this.recordId = recordId;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Integer getCouponId() {
		return couponId;
	}
	public void setCouponId(Integer couponId) {
		this.couponId = couponId;
	}
	public String getActivationCode() {
		return activationCode;
	}
	public void setActivationCode(String activationCode) {
		this.activationCode = activationCode;
	}
	public String getIsUsed() {
		return isUsed;
	}
	public void setIsUsed(String isUsed) {
		this.isUsed = isUsed;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getValidStartDate() {
		return validStartDate;
	}
	public void setValidStartDate(Date validStartDate) {
		this.validStartDate = validStartDate;
	}
	public Date getValidEndDate() {
		return validEndDate;
	}
	public void setValidEndDate(Date validEndDate) {
		this.validEndDate = validEndDate;
	}
	public Integer getMoneyValue() {
		return moneyValue;
	}
	public void setMoneyValue(Integer moneyValue) {
		this.moneyValue = moneyValue;
	}
	public BigDecimal getNeedGold() {
		return needGold;
	}
	public void setNeedGold(BigDecimal needGold) {
		this.needGold = needGold;
	}
	public Integer getUseNeedMoney() {
		return useNeedMoney;
	}
	public void setUseNeedMoney(Integer useNeedMoney) {
		this.useNeedMoney = useNeedMoney;
	}
	public String getTagText() {
		return tagText;
	}
	public void setTagText(String tagText) {
		this.tagText = tagText;
	}
}
