org_models.go 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. package models
  2. type Org struct {
  3. Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // 机构 ID
  4. Creator int64 `json:"creator"` // 创建者,即管理员用户的 id
  5. OrgName string `gorm:"column:org_name" json:"org_name"`
  6. OrgShortName string `gorm:"column:org_short_name" json:"org_short_name"` // 简称
  7. OrgLogo string `gorm:"column:org_logo" json:"org_logo"`
  8. OrgIntroduction string `gorm:"column:org_introduction" json:"org_introduction"`
  9. Province int64 `json:"province"` // 省,代号,下面的市、区也一样
  10. City int64 `json:"city"`
  11. District int64 `json:"district"`
  12. Address string `json:"address"` // 详细地址
  13. Illness string `json:"illness"` // 服务病种 多个并用“,”隔开
  14. Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用
  15. CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间
  16. ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间
  17. OrgType int64 `gorm:"column:org_type" json:"org_type"`
  18. Evaluate float64 `gorm:"column:evaluate" json:"evaluate"`
  19. Comments int64 `gorm:"column:comments" json:"comments"`
  20. OperatingState int64 `gorm:"column:operating_state" json:"operating_state"`
  21. Claim int64 `gorm:"column:claim" json:"claim"`
  22. Telephone string `gorm:"column:telephone" json:"telephone"`
  23. BusinessWeek string `gorm:"column:business_week" json:"business_week"`
  24. BusinessTime string `gorm:"column:business_time" json:"business_time"`
  25. Gallery string `gorm:"column:gallery" json:"gallery"`
  26. ContactName string `gorm:"column:contact_name" json:"contact_name"`
  27. OrgGallery []*OrgGallery `gorm:"ForeignKey:OrgId" json:"org_gallery"`
  28. }
  29. func (Org) TableName() string {
  30. return "sgj_user_org"
  31. }
  32. type OrgGallery struct {
  33. ID int64 `gorm:"column:id" json:"id" form:"id"`
  34. Url string `gorm:"column:url" json:"url" form:"url"`
  35. Type int64 `gorm:"column:type" json:"type" form:"type"`
  36. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  37. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  38. Status int64 `gorm:"column:status" json:"status" form:"status"`
  39. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  40. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  41. }
  42. func (OrgGallery) TableName() string {
  43. return "sgj_user_org_gallery"
  44. }
  45. type OrgApp struct {
  46. Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // ID
  47. AppType int `gorm:"column:app_type" json:"app_type"` // 应用类型 1.病友经营;2.科普号;3.血透经营;4.慢病管理
  48. Creator int `json:"creator"` // 创建者,即管理员用户的 id
  49. OrgId int `gorm:"column:org_id" json:"org_id"`
  50. OpenStatus int `gorm:"column:open_status" json:"open_status"`
  51. Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用
  52. CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间
  53. ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间
  54. Name string `gorm:"column:name" json:"name" form:"name"`
  55. Url string `gorm:"column:url" json:"url" form:"url"`
  56. Pid int64 `gorm:"column:pid" json:"pid" form:"pid"`
  57. Number int64 `gorm:"column:number" json:"number" form:"number"`
  58. }
  59. func (OrgApp) TableName() string {
  60. return "sgj_user_org_app"
  61. }
  62. type OrgBan struct {
  63. ID int64 `gorm:"column:id" json:"id"`
  64. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  65. Reason string `gorm:"column:reason" json:"reason"`
  66. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  67. BanTime int64 `gorm:"column:ban_time" json:"ban_time"`
  68. Status int64 `gorm:"column:status" json:"status"`
  69. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  70. }
  71. func (OrgBan) TableName() string {
  72. return "sgj_user_admin_org_ban"
  73. }
  74. type OrgType struct {
  75. ID int64 `gorm:"column:id" json:"id" form:"id"`
  76. Name string `gorm:"column:name" json:"name" form:"name"`
  77. ShortName string `gorm:"column:short_name" json:"short_name" form:"short_name"`
  78. Pid int64 `gorm:"column:pid" json:"pid" form:"pid"`
  79. Status int64 `gorm:"column:status" json:"status" form:"status"`
  80. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  81. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  82. SortNo int64 `gorm:"column:sort_no" json:"sort_no" form:"sort_no"`
  83. }
  84. func (OrgType) TableName() string {
  85. return "sgj_user_org_type"
  86. }
  87. type Illness struct {
  88. ID int64 `gorm:"column:id" json:"id"`
  89. IllnessName string `gorm:"column:illness_name" json:"illness_name"`
  90. Status int64 `gorm:"column:status" json:"status"`
  91. CreatedTime int64 `gorm:"column:created_time" json:"created_time"`
  92. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time"`
  93. }
  94. func (Illness) TableName() string {
  95. return "sgj_user_illness"
  96. }
  97. type SgjUserOrg struct {
  98. ID int64 `gorm:"column:id" json:"id" form:"id"`
  99. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  100. OrgName string `gorm:"column:org_name" json:"org_name" form:"org_name"`
  101. OrgShortName string `gorm:"column:org_short_name" json:"org_short_name" form:"org_short_name"`
  102. OrgLogo string `gorm:"column:org_logo" json:"org_logo" form:"org_logo"`
  103. OrgIntroduction string `gorm:"column:org_introduction" json:"org_introduction" form:"org_introduction"`
  104. Illness string `gorm:"column:illness" json:"illness" form:"illness"`
  105. Province int64 `gorm:"column:province" json:"province" form:"province"`
  106. City int64 `gorm:"column:city" json:"city" form:"city"`
  107. District int64 `gorm:"column:district" json:"district" form:"district"`
  108. Address string `gorm:"column:address" json:"address" form:"address"`
  109. Longitude string `gorm:"column:longitude" json:"longitude" form:"longitude"`
  110. Latitude string `gorm:"column:latitude" json:"latitude" form:"latitude"`
  111. OrgType int64 `gorm:"column:org_type" json:"org_type" form:"org_type"`
  112. Comments int64 `gorm:"column:comments" json:"comments" form:"comments"`
  113. Evaluate float64 `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  114. Gallery string `gorm:"column:gallery" json:"gallery" form:"gallery"`
  115. BusinessWeek string `gorm:"column:business_week" json:"business_week" form:"business_week"`
  116. BusinessTime string `gorm:"column:business_time" json:"business_time" form:"business_time"`
  117. ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
  118. Telephone string `gorm:"column:telephone" json:"telephone" form:"telephone"`
  119. Claim int64 `gorm:"column:claim" json:"claim" form:"claim"`
  120. OperatingState int64 `gorm:"column:operating_state" json:"operating_state" form:"operating_state"`
  121. Status int64 `gorm:"column:status" json:"status" form:"status"`
  122. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  123. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  124. Source int64 `gorm:"column:source" json:"source" form:"source"`
  125. Ttype int64 `gorm:"column:ttype" json:"ttype" form:"ttype"`
  126. Ttid int64 `gorm:"column:ttid" json:"ttid" form:"ttid"`
  127. Tuid int64 `gorm:"column:tuid" json:"tuid" form:"tuid"`
  128. Reason string `gorm:"column:reason" json:"reason" form:"reason"`
  129. Level int64 `gorm:"column:level" json:"level" form:"level"`
  130. Website string `gorm:"column:website" json:"website" form:"website"`
  131. Import int64 `gorm:"column:import" json:"import" form:"import"`
  132. Sortno int64 `gorm:"column:sortno" json:"sortno" form:"sortno"`
  133. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  134. }
  135. func (SgjUserOrg) TableName() string {
  136. return "sgj_user_org"
  137. }
  138. type SgjUserDistrict struct {
  139. ID int64 `gorm:"column:id" json:"id" form:"id"`
  140. Name string `gorm:"column:name" json:"name" form:"name"`
  141. Level int64 `gorm:"column:level" json:"level" form:"level"`
  142. Upid int64 `gorm:"column:upid" json:"upid" form:"upid"`
  143. Path string `gorm:"column:path" json:"path" form:"path"`
  144. Namepath string `gorm:"column:namepath" json:"namepath" form:"namepath"`
  145. Initial string `gorm:"column:initial" json:"initial" form:"initial"`
  146. Longitude string `gorm:"column:longitude" json:"longitude" form:"longitude"`
  147. Latitude string `gorm:"column:latitude" json:"latitude" form:"latitude"`
  148. Adcode int64 `gorm:"column:adcode" json:"adcode" form:"adcode"`
  149. }
  150. func (SgjUserDistrict) TableName() string {
  151. return "sgj_user_district"
  152. }
  153. type SgjUserOrgType struct {
  154. ID int64 `gorm:"column:id" json:"id" form:"id"`
  155. Name string `gorm:"column:name" json:"name" form:"name"`
  156. ShortName string `gorm:"column:short_name" json:"short_name" form:"short_name"`
  157. Pid int64 `gorm:"column:pid" json:"pid" form:"pid"`
  158. Status int64 `gorm:"column:status" json:"status" form:"status"`
  159. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  160. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  161. SortNo int64 `gorm:"column:sort_no" json:"sort_no" form:"sort_no"`
  162. }
  163. func (SgjUserOrgType) TableName() string {
  164. return "sgj_user_org_type"
  165. }