src/com/classnet/entity/NewsEntity.java
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.classnet.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@SuppressWarnings("serial")
@Entity
@Table(name="news",catalog="classnet")
public class NewsEntity implements Serializable{
private Integer id;
private String title; //标题
private String author; //作者
private String source; //来源
private Date pubtime=new Date(); //发布时间
private String content; //内容
private Integer viewNum=0; //浏览数目
private String img; //新闻封面图片
private Integer status=1; //新闻状态 1普通,2推荐, 3栏目头条, 4首页flash 图片新闻
private NewsMenuEntity newsMenu; //目录
@Id
@GeneratedValue
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name="title",length=50,nullable=false)
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Column(name="author",length=10,nullable=true)
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
@Column(name="source",length=20,nullable=true)
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
@Column(name="pubtime")
后面还有 43 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
