blob: 283a7f4d803527eb1c8ca1dfb993ea36d28fc80a [file] [log] [blame]
Matthias Andreas Benkard2f0b3702020-01-12 15:46:34 +01001package eu.mulk.entity;
2
3import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
4import java.util.Objects;
5import javax.persistence.Basic;
6import javax.persistence.Column;
7import javax.persistence.Entity;
8import javax.persistence.Id;
9import javax.persistence.Table;
10
11@Entity
12@Table(name = "article_comment_counts", schema = "public", catalog = "mulkcms")
13public 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}