smart_sch.go 4.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package models
  2. type SmartSchPatient struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  5. Name string `gorm:"column:name" json:"name" form:"name"`
  6. SmartSchedule []*SmartSchedule `gorm:"-" json:"sch"`
  7. }
  8. func (SmartSchPatient) TableName() string {
  9. return "xt_patients"
  10. }
  11. type SmartSchTemplatePatient struct {
  12. ID int64 `gorm:"column:id" json:"id" form:"id"`
  13. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  14. Name string `gorm:"column:name" json:"name" form:"name"`
  15. XtPatientScheduleTemplateId []*XtPatientScheduleTemplateId
  16. }
  17. func (SmartSchTemplatePatient) TableName() string {
  18. return "xt_patients"
  19. }
  20. type SmartSchedule struct {
  21. ID int64 `gorm:"column:id" json:"id" form:"id"`
  22. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  23. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  24. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  25. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  26. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  27. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  28. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  29. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  30. Status int64 `gorm:"column:status" json:"status" form:"status"`
  31. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  32. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  33. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  34. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:ID;AssociationForeignKey:PartitionId;"`
  35. DeviceNumber DeviceNumber `json:"number" gorm:"foreignkey:ID;AssociationForeignKey:BedId;"`
  36. }
  37. func (SmartSchedule) TableName() string {
  38. return "xt_schedule"
  39. }
  40. type XtPatientScheduleTemplateId struct {
  41. ID int64 `gorm:"column:id" json:"id" form:"id"`
  42. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  43. Status int64 `gorm:"column:status" json:"status" form:"status"`
  44. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  45. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  46. Week int64 `gorm:"column:week" json:"week" form:"week"`
  47. XtPatientScheduleTemplateItem []*XtPatientScheduleTemplateItem `gorm:"foreignkey:TemplateId;AssociationForeignKey:ID;" json:"template" form:"template"`
  48. }
  49. func (XtPatientScheduleTemplateId) TableName() string {
  50. return "xt_patient_schedule_template_id"
  51. }
  52. type XtPatientScheduleTemplateItem struct {
  53. ID int64 `gorm:"column:id" json:"id" form:"id"`
  54. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  55. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  56. DeviceNumberId int64 `gorm:"column:device_number_id" json:"device_number_id" form:"device_number_id"`
  57. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  58. TreatMode int64 `gorm:"column:treat_mode" json:"treat_mode" form:"treat_mode"`
  59. Weekday int64 `gorm:"column:weekday" json:"weekday" form:"weekday"`
  60. TimeType int64 `gorm:"column:time_type" json:"time_type" form:"time_type"`
  61. Status int64 `gorm:"column:status" json:"status" form:"status"`
  62. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  63. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  64. IsExport int64 `gorm:"column:is_export" json:"is_export" form:"is_export"`
  65. ZoneId int64 `gorm:"-" json:"zone_id" form:"zone_id"`
  66. }
  67. func (XtPatientScheduleTemplateItem) TableName() string {
  68. return "xt_patient_schedule_template_item"
  69. }