You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.9 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. package com.gcc.communityHall.entity;
  2. import java.util.Date;
  3. import com.fasterxml.jackson.annotation.JsonIgnore;
  4. import jakarta.persistence.CascadeType;
  5. import jakarta.persistence.Column;
  6. import jakarta.persistence.Entity;
  7. import jakarta.persistence.EnumType;
  8. import jakarta.persistence.Enumerated;
  9. import jakarta.persistence.FetchType;
  10. import jakarta.persistence.GeneratedValue;
  11. import jakarta.persistence.GenerationType;
  12. import jakarta.persistence.Id;
  13. import jakarta.persistence.ManyToOne;
  14. @Entity
  15. public class UserHistory {
  16. @Id
  17. @GeneratedValue(strategy = GenerationType.IDENTITY)
  18. private int userHisId;
  19. private Date cdate ;
  20. @Column(name="user_status", columnDefinition = "VARCHAR(20) DEFAULT 'APPROVED'")
  21. @Enumerated(EnumType.STRING)
  22. private Users.userStatus userstatus = Users.userStatus.APPROVED ;
  23. private String comments;
  24. private String updatedBy;
  25. @ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
  26. @JsonIgnore
  27. private Users users;
  28. public int getUserHisId() {
  29. return userHisId;
  30. }
  31. public void setUserHisId(int userHisId) {
  32. this.userHisId = userHisId;
  33. }
  34. public Date getCdate() {
  35. return cdate;
  36. }
  37. public void setCdate(Date cdate) {
  38. this.cdate = cdate;
  39. }
  40. public Users.userStatus getUserstatus() {
  41. return userstatus;
  42. }
  43. public void setUserstatus(Users.userStatus userstatus) {
  44. this.userstatus = userstatus;
  45. }
  46. public String getComments() {
  47. return comments;
  48. }
  49. public void setComments(String comments) {
  50. this.comments = comments;
  51. }
  52. public String getUpdatedBy() {
  53. return updatedBy;
  54. }
  55. public void setUpdatedBy(String updatedBy) {
  56. this.updatedBy = updatedBy;
  57. }
  58. public Users getUsers() {
  59. return users;
  60. }
  61. public void setUsers(Users users) {
  62. this.users = users;
  63. }
  64. }