MedicationStat.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. package com.yihu.ehr.profile.model;
  2. import com.fasterxml.jackson.annotation.JsonFormat;
  3. import org.hibernate.annotations.GenericGenerator;
  4. import javax.persistence.*;
  5. import java.util.Date;
  6. /**
  7. * @author Sand
  8. * @version 1.0
  9. * @created 2016.04.08 11:42
  10. */
  11. @Entity
  12. @Table(name = "rs_medication_list")
  13. @Access(value = AccessType.PROPERTY)
  14. public class MedicationStat {
  15. private int drugId;
  16. private String drugName;
  17. private int month3;
  18. private int month6;
  19. private String code;
  20. private String unit;
  21. private String specifications;
  22. private Date lastTime = new Date();
  23. @Id
  24. @GeneratedValue(generator = "Generator")
  25. @GenericGenerator(name = "Generator", strategy = "increment")
  26. @Column(name = "drug_id")
  27. public int getDrugId() {
  28. return drugId;
  29. }
  30. public void setDrugId(int drugId) {
  31. this.drugId = drugId;
  32. }
  33. @Column(name = "drug_name")
  34. public String getDrugName() {
  35. return drugName;
  36. }
  37. public void setDrugName(String drugName) {
  38. this.drugName = drugName;
  39. }
  40. @Column(name = "month3")
  41. public int getMonth3() {
  42. return month3;
  43. }
  44. public void setMonth3(int month3) {
  45. this.month3 = month3;
  46. }
  47. @Column(name = "month6")
  48. public int getMonth6() {
  49. return month6;
  50. }
  51. public void setMonth6(int month6) {
  52. this.month6 = month6;
  53. }
  54. @Column(name = "code")
  55. public String getCode() {
  56. return code;
  57. }
  58. public void setCode(String code) {
  59. this.code = code;
  60. }
  61. @Column(name = "unit")
  62. public String getUnit() {
  63. return unit;
  64. }
  65. public void setUnit(String unit) {
  66. this.unit = unit;
  67. }
  68. @Column(name = "specifications")
  69. public String getSpecifications() {
  70. return specifications;
  71. }
  72. public void setSpecifications(String specifications) {
  73. this.specifications = specifications;
  74. }
  75. @Column(name = "last_time")
  76. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  77. public Date getLastTime() {
  78. return lastTime;
  79. }
  80. public void setLastTime(Date lastTime) {
  81. this.lastTime = lastTime;
  82. }
  83. }