diff -r c27eee1259bd -r ed2e7aef2a3e src/main/java/de/uapcore/lightpit/entities/IssueComment.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/uapcore/lightpit/entities/IssueComment.java Fri Oct 09 19:07:05 2020 +0200 @@ -0,0 +1,85 @@ +package de.uapcore.lightpit.entities; + +import java.sql.Timestamp; +import java.time.Instant; +import java.util.Objects; + +public class IssueComment { + + private final Issue issue; + private final int commentid; + + private User author; + private String comment; + + private Timestamp created = Timestamp.from(Instant.now()); + private Timestamp updated = Timestamp.from(Instant.now()); + private int updatecount = 0; + + + public IssueComment(int id, Issue issue) { + this.commentid = id; + this.issue = issue; + } + + public Issue getIssue() { + return issue; + } + + public int getId() { + return commentid; + } + + public User getAuthor() { + return author; + } + + public void setAuthor(User author) { + this.author = author; + } + + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public Timestamp getCreated() { + return created; + } + + public void setCreated(Timestamp created) { + this.created = created; + } + + public Timestamp getUpdated() { + return updated; + } + + public void setUpdated(Timestamp updated) { + this.updated = updated; + } + + public int getUpdateCount() { + return updatecount; + } + + public void setUpdateCount(int updatecount) { + this.updatecount = updatecount; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + IssueComment that = (IssueComment) o; + return commentid == that.commentid; + } + + @Override + public int hashCode() { + return Objects.hash(commentid); + } +}