model.go 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 int32
  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 int32
  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 int32
  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. ConfigObject datatypes.JSON
  80. TechTemplate string //曝光参数
  81. ImgProcTemplate string //图像处理
  82. Sort int32
  83. IsEnabled bool
  84. Product string
  85. IsPreInstall bool
  86. }
  87. func (View) TableName() string {
  88. return "p_view"
  89. }