Matthias Andreas Benkard | 2f0b370 | 2020-01-12 15:46:34 +0100 | [diff] [blame^] | 1 | package eu.mulk.entity; |
| 2 | |
| 3 | import io.quarkus.hibernate.orm.panache.PanacheEntityBase; |
| 4 | import java.util.Objects; |
| 5 | import javax.persistence.Basic; |
| 6 | import javax.persistence.Column; |
| 7 | import javax.persistence.Entity; |
| 8 | import javax.persistence.Id; |
| 9 | import javax.persistence.Table; |
| 10 | |
| 11 | @Entity |
| 12 | @Table(name = "article_comment_counts", schema = "public", catalog = "mulkcms") |
| 13 | public class ArticleCommentCount extends PanacheEntityBase { |
| 14 | |
| 15 | @Id |
| 16 | private Integer article; |
| 17 | private Long commentCount; |
| 18 | |
| 19 | @Basic |
| 20 | @Column(name = "article", nullable = true) |
| 21 | public Integer getArticle() { |
| 22 | return article; |
| 23 | } |
| 24 | |
| 25 | public void setArticle(Integer article) { |
| 26 | this.article = article; |
| 27 | } |
| 28 | |
| 29 | @Basic |
| 30 | @Column(name = "comment_count", nullable = true) |
| 31 | public Long getCommentCount() { |
| 32 | return commentCount; |
| 33 | } |
| 34 | |
| 35 | public void setCommentCount(Long commentCount) { |
| 36 | this.commentCount = commentCount; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public boolean equals(Object o) { |
| 41 | if (this == o) { |
| 42 | return true; |
| 43 | } |
| 44 | if (o == null || getClass() != o.getClass()) { |
| 45 | return false; |
| 46 | } |
| 47 | ArticleCommentCount that = (ArticleCommentCount) o; |
| 48 | return Objects.equals(article, that.article) && |
| 49 | Objects.equals(commentCount, that.commentCount); |
| 50 | } |
| 51 | |
| 52 | @Override |
| 53 | public int hashCode() { |
| 54 | return Objects.hash(article, commentCount); |
| 55 | } |
| 56 | } |