inspection_models.go 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package models
  2. type Inspection struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  5. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  6. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  7. ItemId int64 `gorm:"column:item_id" json:"item_id" form:"item_id"`
  8. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  9. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  10. InspectType int64 `gorm:"column:inspect_type" json:"inspect_type" form:"inspect_type"`
  11. InspectValue string `gorm:"column:inspect_value" json:"inspect_value" form:"inspect_value"`
  12. InspectDate int64 `gorm:"column:inspect_date" json:"inspect_date" form:"inspect_date"`
  13. Status int64 `gorm:"column:status" json:"status" form:"status"`
  14. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  15. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  16. }
  17. func (Inspection) TableName() string {
  18. return "xt_inspection"
  19. }
  20. type InspectionReference struct {
  21. ID int64 `gorm:"column:id" json:"id" form:"id"`
  22. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  23. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  24. Project string `gorm:"column:project" json:"project" form:"project"`
  25. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  26. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  27. ItemNameAddition string `gorm:"column:item_name_addition" json:"item_name_addition" form:"item_name_addition"`
  28. Item string `gorm:"column:item" json:"item" form:"item"`
  29. RangeType int64 `gorm:"column:range_type" json:"range_type" form:"range_type"`
  30. RangeMin string `gorm:"column:range_min" json:"range_min" form:"range_min"`
  31. RangeMax string `gorm:"column:range_max" json:"range_max" form:"range_max"`
  32. RangeValue string `gorm:"column:range_value" json:"range_value" form:"range_value"`
  33. RangeOptions string `gorm:"column:range_options" json:"range_options" form:"range_options"`
  34. Unit string `gorm:"column:unit" json:"unit" form:"unit"`
  35. Status int64 `gorm:"column:status" json:"status" form:"status"`
  36. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  37. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  38. }
  39. func (InspectionReference) TableName() string {
  40. return "xt_inspection_reference"
  41. }
  42. type UserInspectionProjectCount struct {
  43. PatientId int64
  44. Count int64
  45. ProjectId int64
  46. }
  47. type InspectionReferenceMap struct {
  48. ProjectName string `gorm:"-" json:"project_name" form:"project_name"`
  49. Project string `gorm:"-" json:"project" form:"project"`
  50. ProjectId int64 `gorm:"-" json:"project_id" form:"project_id"`
  51. Count int64 `gorm:"-" json:"count" form:"count"`
  52. InspectionReference []InspectionReference `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
  53. }
  54. type InepectionForm struct {
  55. Method string `json:"method"`
  56. ProjectId int64 `json:"project_id"`
  57. InspectDate string `json:"inspect_date"`
  58. FormItem []struct {
  59. ID int64 `json:"id"`
  60. ProjectId int64 `json:"project_id"`
  61. ProjectName string `json:"project_name"`
  62. ItemId int64 `json:"item_id"`
  63. Item string `json:"item"`
  64. ItemName string `json:"item_name"`
  65. RangeType int64 `json:"range_type"`
  66. Value string `json:"value"`
  67. } `json:"formItem"`
  68. }
  69. type InspectionDate struct {
  70. InspectDate int64
  71. }