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.
36 lines
1.2 KiB
36 lines
1.2 KiB
package model;
|
|
|
|
import java.util.Date;
|
|
|
|
public class Article {
|
|
private String title;
|
|
private String content;
|
|
private String url;
|
|
// 新增字段
|
|
private String author;
|
|
private Date publishDate;
|
|
|
|
// 无参构造
|
|
public Article() {}
|
|
|
|
// 全参构造(方便赋值)
|
|
public Article(String title, String content, String url, String author, Date publishDate) {
|
|
this.title = title;
|
|
this.content = content;
|
|
this.url = url;
|
|
this.author = author;
|
|
this.publishDate = publishDate;
|
|
}
|
|
|
|
// getter & setter
|
|
public String getTitle() { return title; }
|
|
public void setTitle(String title) { this.title = title; }
|
|
public String getContent() { return content; }
|
|
public void setContent(String content) { this.content = content; }
|
|
public String getUrl() { return url; }
|
|
public void setUrl(String url) { this.url = url; }
|
|
public String getAuthor() { return author; }
|
|
public void setAuthor(String author) { this.author = author; }
|
|
public Date getPublishDate() { return publishDate; }
|
|
public void setPublishDate(Date publishDate) { this.publishDate = publishDate; }
|
|
}
|