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.
75 lines
1.9 KiB
75 lines
1.9 KiB
//图书实体类
|
|
public class Book {
|
|
private String id; // 图书ID
|
|
private String title; // 标题
|
|
private String author; // 作者
|
|
private String publisher; // 出版社
|
|
private int publicationYear; // 出版年份
|
|
private String category; // 类别
|
|
private boolean isAvailable; // 是否可借阅
|
|
private String borrowDate; // 借阅日期(临时存储,用于显示)
|
|
private String dueDate; // 应还日期(临时存储,用于显示)
|
|
|
|
//构造方法
|
|
public Book(String id, String title, String author, String publisher,
|
|
int publicationYear, String category, boolean isAvailable) {
|
|
this.id = id;
|
|
this.title = title;
|
|
this.author = author;
|
|
this.publisher = publisher;
|
|
this.publicationYear = publicationYear;
|
|
this.category = category;
|
|
this.isAvailable = isAvailable;
|
|
this.borrowDate = "";
|
|
this.dueDate = "";
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
public String getAuthor() {
|
|
return author;
|
|
}
|
|
|
|
public String getPublisher() {
|
|
return publisher;
|
|
}
|
|
|
|
public int getPublicationYear() {
|
|
return publicationYear;
|
|
}
|
|
|
|
public String getCategory() {
|
|
return category;
|
|
}
|
|
|
|
public boolean isAvailable() {
|
|
return isAvailable;
|
|
}
|
|
|
|
public void setAvailable(boolean available) {
|
|
isAvailable = available;
|
|
}
|
|
|
|
public String getBorrowDate() {
|
|
return borrowDate;
|
|
}
|
|
|
|
public void setBorrowDate(String borrowDate) {
|
|
this.borrowDate = borrowDate;
|
|
}
|
|
|
|
public String getDueDate() {
|
|
return dueDate;
|
|
}
|
|
|
|
public void setDueDate(String dueDate) {
|
|
this.dueDate = dueDate;
|
|
}
|
|
}
|