HotWord.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. package com.yihu.ehr.resource.model;
  2. import com.fasterxml.jackson.annotation.JsonFormat;
  3. import org.hibernate.annotations.GenericGenerator;
  4. import javax.persistence.*;
  5. import java.util.Date;
  6. @Entity
  7. @Table(name="hot_word")
  8. public class HotWord {
  9. private String id;
  10. private String word;
  11. private int searchCount;
  12. private long expireTime;
  13. private int type;
  14. private Date updateTime;
  15. @Id
  16. @GenericGenerator(name="idGenerator", strategy="uuid")
  17. @GeneratedValue(generator="idGenerator")
  18. @Column(name = "id", unique = true, nullable = false,length = 32)
  19. public String getId() {
  20. return id;
  21. }
  22. public void setId(String id) {
  23. this.id = id;
  24. }
  25. @Column(name = "word", nullable = false)
  26. public String getWord() {
  27. return word;
  28. }
  29. public void setWord(String word) {
  30. this.word = word;
  31. }
  32. @Column(name = "search_count", nullable = false)
  33. public int getSearchCount() {
  34. return searchCount;
  35. }
  36. public void setSearchCount(int searchCount) {
  37. this.searchCount = searchCount;
  38. }
  39. @Column(name = "expire_time", nullable = false)
  40. public long getExpireTime() {
  41. return expireTime;
  42. }
  43. public void setExpireTime(long expireTime) {
  44. this.expireTime = expireTime;
  45. }
  46. @Column(name = "type", nullable = false)
  47. public int getType() {
  48. return type;
  49. }
  50. public void setType(int type) {
  51. this.type = type;
  52. }
  53. @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  54. @Column(name = "update_time", nullable = false)
  55. public Date getUpdateTime() {
  56. return updateTime;
  57. }
  58. public void setUpdateTime(Date updateTime) {
  59. this.updateTime = updateTime;
  60. }
  61. }