package com.sf._04_set_contact.demo1;

import java.util.Objects;

public class BorrowRecord {
    private String borrower;
    private Book book;
    private String date;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BorrowRecord that = (BorrowRecord) o;
        return Objects.equals(borrower, that.borrower) &&
                Objects.equals(book, that.book) &&
                Objects.equals(date, that.date);
    }

    @Override
    public int hashCode() {
        return Objects.hash(borrower, book, date);
    }

    public BorrowRecord() {
    }

    public BorrowRecord(String borrower, Book book, String date) {
        this.borrower = borrower;
        this.book = book;
        this.date = date;
    }

    /**
     * 获取
     * @return borrower
     */
    public String getBorrower() {
        return borrower;
    }

    /**
     * 设置
     * @param borrower
     */
    public void setBorrower(String borrower) {
        this.borrower = borrower;
    }

    /**
     * 获取
     * @return book
     */
    public Book getBook() {
        return book;
    }

    /**
     * 设置
     * @param book
     */
    public void setBook(Book book) {
        this.book = book;
    }

    /**
     * 获取
     * @return date
     */
    public String getDate() {
        return date;
    }

    /**
     * 设置
     * @param date
     */
    public void setDate(String date) {
        this.date = date;
    }

    public String toString() {
        return "BorrowRecord{borrower = " + borrower + ", book = " + book + ", date = " + date + "}";
    }
}
