package com.ssj.bean.weixin.card.domain;

import java.util.Date;

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

import com.ssj.bean.common.framework.core.domain.BaseEntity;


@Entity
@Table(name="tb_lib_card_detail")
public class LibCardDetail extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 卡券ID。
	 */
	private String cardId;
	/**
	 * 领取人微信openid
	 */
	private String openId;
	/**
	 * 卡券状态    
	 * NORMAL 正常 
	 * CONSUMED 已核销 
	 * EXPIRE 已过期 
	 * GIFTING 转赠中 
	 * GIFT_TIMEOUT 转赠超时 
	 * DELETE 已删除 
	 * UNAVAILABLE 已失效 
	 * code未被添加或被转赠领取的情况则统一报错：invalid serial code
	 */
	private String cardStat;
	/**
	 * code序列号。
	 */
	private String UserCardCode;
	/**
	 * 是否为转赠领取，1代表是，0代表否。
	 */
	private String IsGiveByFriend;
	/**
	 * 为保证安全，微信会在转赠发生后变更该卡券的code号，该字段表示转赠前的code。
	 */
	private String OldUserCardCode;
	/**
	 * 当IsGiveByFriend为1时填入的字段，表示发起转赠用户的openid
	 */
	private String FriendUserName;
	/**
	 * 领取场景值，用于领取渠道数据统计。可在生成二维码接口及添加Addcard接口中自定义该字段的字符串值。
	 */
	private String OuterStr;
	/**
	 * 是否转赠退回，0代表不是，1代表是。 (转赠专有)
	 */
	private Integer IsReturnBack;
	/**
	 * 是否是群转赠 (转赠专有)
	 */
	private Integer IsChatRoom;
	/**
	 * 创建时间 
	 */
	private Date createdDate;
	/**
	 * 修改时间
	 */
	private Date updatedDate;
	
	public String getCardId() {
		return cardId;
	}
	public void setCardId(String cardId) {
		this.cardId = cardId;
	}
	public String getOpenId() {
		return openId;
	}
	public void setOpenId(String openId) {
		this.openId = openId;
	}
	public String getCardStat() {
		return cardStat;
	}
	public void setCardStat(String cardStat) {
		this.cardStat = cardStat;
	}

	public String getIsGiveByFriend() {
		return IsGiveByFriend;
	}
	public void setIsGiveByFriend(String isGiveByFriend) {
		IsGiveByFriend = isGiveByFriend;
	}
	public String getUserCardCode() {
		return UserCardCode;
	}
	public void setUserCardCode(String userCardCode) {
		UserCardCode = userCardCode;
	}
	public String getOldUserCardCode() {
		return OldUserCardCode;
	}
	public void setOldUserCardCode(String oldUserCardCode) {
		OldUserCardCode = oldUserCardCode;
	}

	
	@Column(updatable = false)
    public Date getCreatedDate() {
        return createdDate;
    }
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    @Column(insertable = false, updatable = false)
    public Date getUpdatedDate() {
        return updatedDate;
    }
    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }
	public String getOuterStr() {
		return OuterStr;
	}
	public void setOuterStr(String outerStr) {
		OuterStr = outerStr;
	}
	public Integer getIsReturnBack() {
		return IsReturnBack;
	}
	public void setIsReturnBack(Integer isReturnBack) {
		IsReturnBack = isReturnBack;
	}
	public Integer getIsChatRoom() {
		return IsChatRoom;
	}
	public void setIsChatRoom(Integer isChatRoom) {
		IsChatRoom = isChatRoom;
	}
	public String getFriendUserName() {
		return FriendUserName;
	}
	public void setFriendUserName(String friendUserName) {
		FriendUserName = friendUserName;
	}
	
	

}
