App.java 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. package com.yihu.ehr.basic.apps.model;
  2. import org.apache.commons.lang3.StringUtils;
  3. import org.hibernate.annotations.GenericGenerator;
  4. import javax.persistence.*;
  5. import java.util.ArrayList;
  6. import java.util.Arrays;
  7. import java.util.Date;
  8. import java.util.List;
  9. /**
  10. * APP对象。
  11. *
  12. * @author Sand
  13. * @version 1.0
  14. * @created 03_8月_2015 16:53:21
  15. */
  16. @Entity
  17. @Table(name = "apps")
  18. @Access(value = AccessType.FIELD)
  19. public class App {
  20. @Id
  21. @GeneratedValue(generator = "Generator")
  22. @GenericGenerator(name = "Generator", strategy = "assigned")
  23. @Column(name = "id", unique = true, nullable = false)
  24. private String id;
  25. private String name;
  26. private String secret;
  27. private String url;
  28. private String outUrl;
  29. private String creator;
  30. private String auditor;
  31. private Date createTime;
  32. private Date auditTime;
  33. private String catalog;
  34. private String status;
  35. private String description;
  36. private String tags;
  37. private String org;
  38. private String code;
  39. private int sourceType;
  40. private String icon;
  41. private int releaseFlag;
  42. private String manageType; // 管理类型,dictId=94
  43. /**
  44. * 医生工作站的应用分类,与catalog并无父子关系,1、在线学习,2在线服务
  45. */
  46. private String doctorManageType;
  47. public App() {
  48. }
  49. @Column(name = "id", nullable = true)
  50. public String getId() {
  51. return id;
  52. }
  53. public void setId(String id) {
  54. this.id = id;
  55. }
  56. @Column(name = "name", nullable = true)
  57. public String getName() {
  58. return name;
  59. }
  60. public void setName(String name) {
  61. this.name = name;
  62. }
  63. @Column(name = "secret", nullable = true)
  64. public String getSecret() {
  65. return secret;
  66. }
  67. public void setSecret(String secret) {
  68. this.secret = secret;
  69. }
  70. @Column(name = "url", nullable = true)
  71. public String getUrl() {
  72. return url;
  73. }
  74. public void setUrl(String url) {
  75. this.url = url;
  76. }
  77. @Column(name = "out_url", nullable = true)
  78. public String getOutUrl() {
  79. return outUrl;
  80. }
  81. public void setOutUrl(String outUrl) {
  82. this.outUrl = outUrl;
  83. }
  84. @Column(name = "creator", nullable = true)
  85. public String getCreator() {
  86. return creator;
  87. }
  88. public void setCreator(String creator) {
  89. this.creator = creator;
  90. }
  91. @Column(name = "auditor", nullable = true)
  92. public String getAuditor() {
  93. return auditor;
  94. }
  95. public void setAuditor(String auditor) {
  96. this.auditor = auditor;
  97. }
  98. @Column(name = "create_time", nullable = true)
  99. public Date getCreateTime() {
  100. return createTime;
  101. }
  102. public void setCreateTime(Date createTime) {
  103. this.createTime = createTime;
  104. }
  105. @Column(name = "audit_time", nullable = true)
  106. public Date getAuditTime() {
  107. return auditTime;
  108. }
  109. public void setAuditTime(Date auditTime) {
  110. this.auditTime = auditTime;
  111. }
  112. @Column(name = "catalog", nullable = true)
  113. public String getCatalog() {
  114. return catalog;
  115. }
  116. public void setCatalog(String catalog) {
  117. this.catalog = catalog;
  118. }
  119. @Column(name = "status", nullable = true)
  120. public String getStatus() {
  121. return status;
  122. }
  123. public void setStatus(String status) {
  124. this.status = status;
  125. }
  126. @Column(name = "description", nullable = true)
  127. public String getDescription() {
  128. return description;
  129. }
  130. public void setDescription(String description) {
  131. this.description = description;
  132. }
  133. @Column(name = "tags", nullable = true)
  134. public List<String> getTags() {
  135. List<String> list = new ArrayList<>();
  136. if (StringUtils.isEmpty(tags)) {
  137. } else {
  138. String[] arr = tags.split(";|;");
  139. list = Arrays.asList(arr);
  140. }
  141. return list;
  142. }
  143. public void setTags(List<String> tags) {
  144. if (tags.size() > 0) {
  145. this.tags = StringUtils.join(tags.toArray(), ";");
  146. } else {
  147. this.tags = "";
  148. }
  149. }
  150. @Column(name = "org", nullable = true)
  151. public String getOrg() {
  152. return org;
  153. }
  154. public void setOrg(String org) {
  155. this.org = org;
  156. }
  157. @Column(name = "code", nullable = true)
  158. public String getCode() {
  159. return code;
  160. }
  161. public void setCode(String code) {
  162. this.code = code;
  163. }
  164. @Column(name = "source_type", nullable = true)
  165. public int getSourceType() {
  166. return sourceType;
  167. }
  168. public void setSourceType(int sourceType) {
  169. this.sourceType = sourceType;
  170. }
  171. @Column(name = "icon", nullable = true)
  172. public String getIcon() {
  173. return icon;
  174. }
  175. public void setIcon(String icon) {
  176. this.icon = icon;
  177. }
  178. @Column(name = "release_flag", nullable = true)
  179. public int getReleaseFlag() {
  180. return releaseFlag;
  181. }
  182. public void setReleaseFlag(int releaseFlag) {
  183. this.releaseFlag = releaseFlag;
  184. }
  185. @Column(name = "manage_type")
  186. public String getManageType() {
  187. return manageType;
  188. }
  189. public void setManageType(String manageType) {
  190. this.manageType = manageType;
  191. }
  192. @Column(name = "doctor_manage_type")
  193. public String getDoctorManageType() {
  194. return doctorManageType;
  195. }
  196. public void setDoctorManageType(String doctorManageType) {
  197. this.doctorManageType = doctorManageType;
  198. }
  199. }