Evenement.java 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. package fr.jaquin.bdlg.planner.persistence;
  2. import java.time.LocalDateTime;
  3. import java.util.Objects;
  4. import javax.persistence.Entity;
  5. import javax.persistence.Id;
  6. import javax.persistence.ManyToOne;
  7. @Entity
  8. public class Evenement {
  9. @Id
  10. private Long id;
  11. private String uuid;
  12. private String name;
  13. private LocalDateTime lastModified;
  14. @ManyToOne
  15. private CustomUser lastEditor;
  16. public Long getId() {
  17. return this.id;
  18. }
  19. public void setId(Long id) {
  20. this.id = id;
  21. }
  22. public String getUuid() {
  23. return this.uuid;
  24. }
  25. public void setUuid(String uuid) {
  26. this.uuid = uuid;
  27. }
  28. public String getName() {
  29. return this.name;
  30. }
  31. public void setName(String name) {
  32. this.name = name;
  33. }
  34. public LocalDateTime getLastModified() {
  35. return this.lastModified;
  36. }
  37. public void setLastModified(LocalDateTime lastModified) {
  38. this.lastModified = lastModified;
  39. }
  40. public CustomUser getLastEditor() {
  41. return this.lastEditor;
  42. }
  43. public void setLastEditor(CustomUser lastEditor) {
  44. this.lastEditor = lastEditor;
  45. }
  46. @Override
  47. public boolean equals(Object o) {
  48. if (o == this)
  49. return true;
  50. if (!(o instanceof Evenement)) {
  51. return false;
  52. }
  53. Evenement evenement = (Evenement) o;
  54. return id == evenement.id;
  55. }
  56. @Override
  57. public int hashCode() {
  58. return Objects.hash(id, uuid);
  59. }
  60. }