package com.yihu.ehr.resource.model; import com.fasterxml.jackson.annotation.JsonFormat; import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; import java.util.Date; @Entity @Table(name="hot_word") public class HotWord { private String id; private String word; private int searchCount; private long expireTime; private int type; private Date updateTime; @Id @GenericGenerator(name="idGenerator", strategy="uuid") @GeneratedValue(generator="idGenerator") @Column(name = "id", unique = true, nullable = false,length = 32) public String getId() { return id; } public void setId(String id) { this.id = id; } @Column(name = "word", nullable = false) public String getWord() { return word; } public void setWord(String word) { this.word = word; } @Column(name = "search_count", nullable = false) public int getSearchCount() { return searchCount; } public void setSearchCount(int searchCount) { this.searchCount = searchCount; } @Column(name = "expire_time", nullable = false) public long getExpireTime() { return expireTime; } public void setExpireTime(long expireTime) { this.expireTime = expireTime; } @Column(name = "type", nullable = false) public int getType() { return type; } public void setType(int type) { this.type = type; } @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @Column(name = "update_time", nullable = false) public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } }