package com.fang.bbks.modules.social.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import com.fang.bbks.common.persistence.BaseEntity;
import com.fang.bbks.modules.sys.entity.Book;
/**
* @Intro descrption here
* @author Lee [shouli1990@gmail.com]
* @Version V0.0.1
* @Date 2014-5-13
* @since 下午6:46:03
*/
@SuppressWarnings("serial")
@Entity
@Table(name = "TB_DONATE")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Donate extends BaseEntity implements Serializable{
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
private Long uid;//人id
private DonateType type;
private Long mid;//目标类型id::书籍-bookid,
private String description;
private String link;//捐赠的资源的连接
private Date createdAt;
private String delFlag;
@Transient
private Book book;
public Donate() {
this.createdAt = new Date();
this.delFlag = DEL_FLAG_NORMAL;
}
public Donate(Long id) {
super();
this.id = id;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public DonateType getType() {
return type;
}
public void setType(DonateType type) {
this.type = type;
}
public Long getMid() {
return mid;
}
public void setMid(Long mid) {
this.mid = mid;
}
public Long getUid() {
return uid;
}
public void setUid(Long uid) {
this.uid = uid;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Book getBook() {
return book;
}
public void setBook(Book book) {
this.book = book;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}