You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
3.2 KiB

package com.bupt.note.Model;
import javax.persistence.*;
/**
* 论文实体
*/
@Entity
@Table(name = "sys_paper")
public class Paper {
private Long id;
private String title;
private String type;
private String author;
private String profession;
private String school;
private Integer year;
private String summary;
private String tag;
private byte[] pdfContent;
private byte[] htmlContent;
private String txtContent;
private Long createTime;
private boolean hasCollect;
private Long collectTime;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Column(nullable = false)
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Column(nullable = false)
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Column(nullable = false)
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
@Column(nullable = false)
public String getProfession() {
return profession;
}
public void setProfession(String profession) {
this.profession = profession;
}
@Column(nullable = false)
public String getSchool() {
return school;
}
public void setSchool(String school) {
this.school = school;
}
@Column(nullable = false)
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
@Lob
@Column(nullable = false)
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
@Column(nullable = false)
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
@Lob
@Column(nullable = false)
public byte[] getPdfContent() {
return pdfContent;
}
public void setPdfContent(byte[] content) {
this.pdfContent = content;
}
@Lob
@Column(nullable = false)
public byte[] getHtmlContent() {
return htmlContent;
}
public void setHtmlContent(byte[] htmlContent) {
this.htmlContent = htmlContent;
}
@Lob
@Column(nullable = false)
public String getTxtContent() {
return txtContent;
}
public void setTxtContent(String txtContent) {
this.txtContent = txtContent;
}
@Column(nullable = false)
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
@Transient
public boolean isHasCollect() {
return hasCollect;
}
public void setHasCollect(boolean hasCollect) {
this.hasCollect = hasCollect;
}
@Transient
public Long getCollectTime() {
return collectTime;
}
public void setCollectTime(Long collectTime) {
this.collectTime = collectTime;
}
}