model.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. package models
  2. import (
  3. "gorm.io/datatypes"
  4. "gorm.io/gorm"
  5. )
  6. type PatientType struct {
  7. gorm.Model
  8. PatientTypeID string
  9. PatientTypeName string
  10. PatientTypeNameLocal string
  11. PatientTypeDescription string
  12. Sort int
  13. IsEnabled bool
  14. Product string
  15. IsPreInstall bool
  16. }
  17. func (PatientType) TableName() string {
  18. return "p_patient_type"
  19. }
  20. type BodyPart struct {
  21. gorm.Model
  22. BodyPartID string
  23. BodyPartName string
  24. BodyPartNameLocal string
  25. BodyPartDescription string
  26. PatientType string
  27. Modality string
  28. Sort int
  29. IsEnabled bool
  30. Product string
  31. IsPreInstall bool
  32. }
  33. func (BodyPart) TableName() string {
  34. return "p_body_part"
  35. }
  36. type Procedure struct {
  37. gorm.Model
  38. InternalID string `gorm:"index:,unique"`
  39. ProcedureID string
  40. ProcedureCode string //程序代码
  41. ProcedureName string //程序名称
  42. ProcedureNameLocal string
  43. ProcedureOtherName string //程序别名
  44. ProcedureDescription string //程序描述
  45. ProcedureDescriptionLocal string
  46. PatientType string //病人类型
  47. BodyPartID string
  48. ProcedureType string //程序类型
  49. FastSearch bool //是否快速搜索
  50. ProtocolLaterality string //协议体位
  51. ProcedureCategory string //程序类别
  52. Modality string //设备类型
  53. Views []*View `gorm:"many2many:p_procedure_views;foreignKey:InternalID;joinForeignKey:ProcedureID;References:InternalID;joinReferences:ViewID"`
  54. Sort int
  55. IsEnabled bool
  56. Product string
  57. IsPreInstall bool
  58. }
  59. func (Procedure) TableName() string {
  60. return "p_procedure"
  61. }
  62. type View struct {
  63. gorm.Model
  64. InternalID string `gorm:"index:,unique"`
  65. ViewID string //体位ID
  66. ViewName string //体位名称
  67. ViewNameLocal string
  68. ViewOtherName string //体位别名
  69. ViewDescription string //体位描述
  70. ViewPosition string //投照方向
  71. Application string //RAD
  72. AnatomicRegion string //解剖区域
  73. PatientType string
  74. BodyPartID string
  75. ViewIconName string
  76. ViewBigIconName string
  77. ViewCoachName string
  78. Modality string //设备类型
  79. WorkStationId int
  80. AprId string //曝光参数
  81. ImgProcId string //图像处理
  82. ConfigObject datatypes.JSON
  83. Sort int
  84. IsEnabled bool
  85. Product string
  86. IsPreInstall bool
  87. }
  88. func (View) TableName() string {
  89. return "p_view"
  90. }
  91. type Apr struct {
  92. gorm.Model
  93. AprID string `gorm:"index:,unique"`
  94. AprName string
  95. AprDescription string
  96. PatientType string
  97. BodyPartID string
  98. ViewPosition string
  99. Category string
  100. Modality string
  101. Sort int
  102. IsEnabled bool
  103. Product string
  104. IsPreInstall bool
  105. }
  106. func (Apr) TableName() string {
  107. return "p_apr"
  108. }
  109. type AprSub struct {
  110. gorm.Model
  111. AprID string `gorm:"index"`
  112. WorkStationID int
  113. PatientSize string
  114. AcquisitionMode string
  115. ConfigObject datatypes.JSON
  116. Sort int
  117. IsEnabled bool
  118. Product string
  119. IsPreInstall bool
  120. }
  121. func (AprSub) TableName() string {
  122. return "p_apr_sub"
  123. }