content: package com.bookstore.entity;
  
  import java.io.Serializable;
  import javax.persistence.Entity;
  import javax.persistence.FetchType;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.JoinColumn;
  import javax.persistence.ManyToOne;
  
  @Entity
  public class Review implements Serializable {
  
      private static final long serialVersionUID = 1L;
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      private String content;
  
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "book_id")
      private Book book;
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getContent() {
          return content;
      }
  
      public void setContent(String content) {
          this.content = content;
      }
  
      public Book getBook() {
          return book;
      }
  
      public void setBook(Book book) {
          this.book = book;
      }
  
      @Override
      public boolean equals(Object obj) {
  
          if (this == obj) {
              return true;
          }
  
          if (obj == null) {
              return false;
          }
  
          if (getClass() != obj.getClass()) {
              return false;
          }
  
          return id != null && id.equals(((Review) obj).id);
      }
  
      @Override
      public int hashCode() {
          return 2021;
      }
  
      @Override
      public String toString() {
          return "Review{" + "id=" + id + ", content=" + content + '}';
      }
  }
  