Evenement.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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.OneToMany;
  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. @OneToMany
  15. private Users 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 Users getLastEditor() {
  41. return this.lastEditor;
  42. }
  43. public void setLastEditor(Users 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. }