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.sql.Timestamp; |
| 5 | import java.util.Objects; |
| 6 | import javax.persistence.Basic; |
| 7 | import javax.persistence.Column; |
| 8 | import javax.persistence.Entity; |
| 9 | import javax.persistence.Id; |
| 10 | import javax.persistence.Table; |
| 11 | |
| 12 | @Entity |
| 13 | @Table(name = "article_publishing_dates", schema = "public", catalog = "mulkcms") |
| 14 | public class ArticlePublishingDate extends PanacheEntityBase { |
| 15 | |
| 16 | @Id |
| 17 | private Integer article; |
| 18 | private Timestamp publishingDate; |
| 19 | |
| 20 | @Basic |
| 21 | @Column(name = "article", nullable = true) |
| 22 | public Integer getArticle() { |
| 23 | return article; |
| 24 | } |
| 25 | |
| 26 | public void setArticle(Integer article) { |
| 27 | this.article = article; |
| 28 | } |
| 29 | |
| 30 | @Basic |
| 31 | @Column(name = "publishing_date", nullable = true) |
| 32 | public Timestamp getPublishingDate() { |
| 33 | return publishingDate; |
| 34 | } |
| 35 | |
| 36 | public void setPublishingDate(Timestamp publishingDate) { |
| 37 | this.publishingDate = publishingDate; |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | public boolean equals(Object o) { |
| 42 | if (this == o) { |
| 43 | return true; |
| 44 | } |
| 45 | if (o == null || getClass() != o.getClass()) { |
| 46 | return false; |
| 47 | } |
| 48 | ArticlePublishingDate that = (ArticlePublishingDate) o; |
| 49 | return Objects.equals(article, that.article) && |
| 50 | Objects.equals(publishingDate, that.publishingDate); |
| 51 | } |
| 52 | |
| 53 | @Override |
| 54 | public int hashCode() { |
| 55 | return Objects.hash(article, publishingDate); |
| 56 | } |
| 57 | } |