runtime.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. // Code generated by ent, DO NOT EDIT.
  2. package runtime
  3. import (
  4. "time"
  5. "wechat-api/ent/contact"
  6. "wechat-api/ent/label"
  7. "wechat-api/ent/labelrelationship"
  8. "wechat-api/ent/message"
  9. "wechat-api/ent/schema"
  10. "wechat-api/ent/server"
  11. "wechat-api/ent/wx"
  12. )
  13. // The init function reads all schema descriptors with runtime code
  14. // (default values, validators, hooks and policies) and stitches it
  15. // to their package variables.
  16. func init() {
  17. contactMixin := schema.Contact{}.Mixin()
  18. contactMixinHooks2 := contactMixin[2].Hooks()
  19. contact.Hooks[0] = contactMixinHooks2[0]
  20. contactMixinInters2 := contactMixin[2].Interceptors()
  21. contact.Interceptors[0] = contactMixinInters2[0]
  22. contactMixinFields0 := contactMixin[0].Fields()
  23. _ = contactMixinFields0
  24. contactMixinFields1 := contactMixin[1].Fields()
  25. _ = contactMixinFields1
  26. contactFields := schema.Contact{}.Fields()
  27. _ = contactFields
  28. // contactDescCreatedAt is the schema descriptor for created_at field.
  29. contactDescCreatedAt := contactMixinFields0[1].Descriptor()
  30. // contact.DefaultCreatedAt holds the default value on creation for the created_at field.
  31. contact.DefaultCreatedAt = contactDescCreatedAt.Default.(func() time.Time)
  32. // contactDescUpdatedAt is the schema descriptor for updated_at field.
  33. contactDescUpdatedAt := contactMixinFields0[2].Descriptor()
  34. // contact.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  35. contact.DefaultUpdatedAt = contactDescUpdatedAt.Default.(func() time.Time)
  36. // contact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  37. contact.UpdateDefaultUpdatedAt = contactDescUpdatedAt.UpdateDefault.(func() time.Time)
  38. // contactDescStatus is the schema descriptor for status field.
  39. contactDescStatus := contactMixinFields1[0].Descriptor()
  40. // contact.DefaultStatus holds the default value on creation for the status field.
  41. contact.DefaultStatus = contactDescStatus.Default.(uint8)
  42. // contactDescWxWxid is the schema descriptor for wx_wxid field.
  43. contactDescWxWxid := contactFields[0].Descriptor()
  44. // contact.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  45. contact.DefaultWxWxid = contactDescWxWxid.Default.(string)
  46. // contactDescType is the schema descriptor for type field.
  47. contactDescType := contactFields[1].Descriptor()
  48. // contact.DefaultType holds the default value on creation for the type field.
  49. contact.DefaultType = contactDescType.Default.(int)
  50. // contactDescWxid is the schema descriptor for wxid field.
  51. contactDescWxid := contactFields[2].Descriptor()
  52. // contact.DefaultWxid holds the default value on creation for the wxid field.
  53. contact.DefaultWxid = contactDescWxid.Default.(string)
  54. // contactDescAccount is the schema descriptor for account field.
  55. contactDescAccount := contactFields[3].Descriptor()
  56. // contact.DefaultAccount holds the default value on creation for the account field.
  57. contact.DefaultAccount = contactDescAccount.Default.(string)
  58. // contactDescNickname is the schema descriptor for nickname field.
  59. contactDescNickname := contactFields[4].Descriptor()
  60. // contact.DefaultNickname holds the default value on creation for the nickname field.
  61. contact.DefaultNickname = contactDescNickname.Default.(string)
  62. // contactDescMarkname is the schema descriptor for markname field.
  63. contactDescMarkname := contactFields[5].Descriptor()
  64. // contact.DefaultMarkname holds the default value on creation for the markname field.
  65. contact.DefaultMarkname = contactDescMarkname.Default.(string)
  66. // contactDescHeadimg is the schema descriptor for headimg field.
  67. contactDescHeadimg := contactFields[6].Descriptor()
  68. // contact.DefaultHeadimg holds the default value on creation for the headimg field.
  69. contact.DefaultHeadimg = contactDescHeadimg.Default.(string)
  70. // contactDescSex is the schema descriptor for sex field.
  71. contactDescSex := contactFields[7].Descriptor()
  72. // contact.DefaultSex holds the default value on creation for the sex field.
  73. contact.DefaultSex = contactDescSex.Default.(int)
  74. // contactDescStarrole is the schema descriptor for starrole field.
  75. contactDescStarrole := contactFields[8].Descriptor()
  76. // contact.DefaultStarrole holds the default value on creation for the starrole field.
  77. contact.DefaultStarrole = contactDescStarrole.Default.(string)
  78. // contactDescDontseeit is the schema descriptor for dontseeit field.
  79. contactDescDontseeit := contactFields[9].Descriptor()
  80. // contact.DefaultDontseeit holds the default value on creation for the dontseeit field.
  81. contact.DefaultDontseeit = contactDescDontseeit.Default.(int)
  82. // contactDescDontseeme is the schema descriptor for dontseeme field.
  83. contactDescDontseeme := contactFields[10].Descriptor()
  84. // contact.DefaultDontseeme holds the default value on creation for the dontseeme field.
  85. contact.DefaultDontseeme = contactDescDontseeme.Default.(int)
  86. // contactDescLag is the schema descriptor for lag field.
  87. contactDescLag := contactFields[11].Descriptor()
  88. // contact.DefaultLag holds the default value on creation for the lag field.
  89. contact.DefaultLag = contactDescLag.Default.(string)
  90. // contactDescGid is the schema descriptor for gid field.
  91. contactDescGid := contactFields[12].Descriptor()
  92. // contact.DefaultGid holds the default value on creation for the gid field.
  93. contact.DefaultGid = contactDescGid.Default.(string)
  94. // contactDescGname is the schema descriptor for gname field.
  95. contactDescGname := contactFields[13].Descriptor()
  96. // contact.DefaultGname holds the default value on creation for the gname field.
  97. contact.DefaultGname = contactDescGname.Default.(string)
  98. // contactDescV3 is the schema descriptor for v3 field.
  99. contactDescV3 := contactFields[14].Descriptor()
  100. // contact.DefaultV3 holds the default value on creation for the v3 field.
  101. contact.DefaultV3 = contactDescV3.Default.(string)
  102. labelMixin := schema.Label{}.Mixin()
  103. labelMixinHooks2 := labelMixin[2].Hooks()
  104. label.Hooks[0] = labelMixinHooks2[0]
  105. labelMixinInters2 := labelMixin[2].Interceptors()
  106. label.Interceptors[0] = labelMixinInters2[0]
  107. labelMixinFields0 := labelMixin[0].Fields()
  108. _ = labelMixinFields0
  109. labelMixinFields1 := labelMixin[1].Fields()
  110. _ = labelMixinFields1
  111. labelFields := schema.Label{}.Fields()
  112. _ = labelFields
  113. // labelDescCreatedAt is the schema descriptor for created_at field.
  114. labelDescCreatedAt := labelMixinFields0[1].Descriptor()
  115. // label.DefaultCreatedAt holds the default value on creation for the created_at field.
  116. label.DefaultCreatedAt = labelDescCreatedAt.Default.(func() time.Time)
  117. // labelDescUpdatedAt is the schema descriptor for updated_at field.
  118. labelDescUpdatedAt := labelMixinFields0[2].Descriptor()
  119. // label.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  120. label.DefaultUpdatedAt = labelDescUpdatedAt.Default.(func() time.Time)
  121. // label.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  122. label.UpdateDefaultUpdatedAt = labelDescUpdatedAt.UpdateDefault.(func() time.Time)
  123. // labelDescStatus is the schema descriptor for status field.
  124. labelDescStatus := labelMixinFields1[0].Descriptor()
  125. // label.DefaultStatus holds the default value on creation for the status field.
  126. label.DefaultStatus = labelDescStatus.Default.(uint8)
  127. // labelDescType is the schema descriptor for type field.
  128. labelDescType := labelFields[0].Descriptor()
  129. // label.DefaultType holds the default value on creation for the type field.
  130. label.DefaultType = labelDescType.Default.(int)
  131. // labelDescName is the schema descriptor for name field.
  132. labelDescName := labelFields[1].Descriptor()
  133. // label.DefaultName holds the default value on creation for the name field.
  134. label.DefaultName = labelDescName.Default.(string)
  135. // labelDescFrom is the schema descriptor for from field.
  136. labelDescFrom := labelFields[2].Descriptor()
  137. // label.DefaultFrom holds the default value on creation for the from field.
  138. label.DefaultFrom = labelDescFrom.Default.(int)
  139. // labelDescMode is the schema descriptor for mode field.
  140. labelDescMode := labelFields[3].Descriptor()
  141. // label.DefaultMode holds the default value on creation for the mode field.
  142. label.DefaultMode = labelDescMode.Default.(int)
  143. // labelDescConditions is the schema descriptor for conditions field.
  144. labelDescConditions := labelFields[4].Descriptor()
  145. // label.DefaultConditions holds the default value on creation for the conditions field.
  146. label.DefaultConditions = labelDescConditions.Default.(string)
  147. labelrelationshipMixin := schema.LabelRelationship{}.Mixin()
  148. labelrelationshipMixinHooks2 := labelrelationshipMixin[2].Hooks()
  149. labelrelationship.Hooks[0] = labelrelationshipMixinHooks2[0]
  150. labelrelationshipMixinInters2 := labelrelationshipMixin[2].Interceptors()
  151. labelrelationship.Interceptors[0] = labelrelationshipMixinInters2[0]
  152. labelrelationshipMixinFields0 := labelrelationshipMixin[0].Fields()
  153. _ = labelrelationshipMixinFields0
  154. labelrelationshipMixinFields1 := labelrelationshipMixin[1].Fields()
  155. _ = labelrelationshipMixinFields1
  156. labelrelationshipFields := schema.LabelRelationship{}.Fields()
  157. _ = labelrelationshipFields
  158. // labelrelationshipDescCreatedAt is the schema descriptor for created_at field.
  159. labelrelationshipDescCreatedAt := labelrelationshipMixinFields0[1].Descriptor()
  160. // labelrelationship.DefaultCreatedAt holds the default value on creation for the created_at field.
  161. labelrelationship.DefaultCreatedAt = labelrelationshipDescCreatedAt.Default.(func() time.Time)
  162. // labelrelationshipDescUpdatedAt is the schema descriptor for updated_at field.
  163. labelrelationshipDescUpdatedAt := labelrelationshipMixinFields0[2].Descriptor()
  164. // labelrelationship.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  165. labelrelationship.DefaultUpdatedAt = labelrelationshipDescUpdatedAt.Default.(func() time.Time)
  166. // labelrelationship.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  167. labelrelationship.UpdateDefaultUpdatedAt = labelrelationshipDescUpdatedAt.UpdateDefault.(func() time.Time)
  168. // labelrelationshipDescStatus is the schema descriptor for status field.
  169. labelrelationshipDescStatus := labelrelationshipMixinFields1[0].Descriptor()
  170. // labelrelationship.DefaultStatus holds the default value on creation for the status field.
  171. labelrelationship.DefaultStatus = labelrelationshipDescStatus.Default.(uint8)
  172. // labelrelationshipDescLabelID is the schema descriptor for label_id field.
  173. labelrelationshipDescLabelID := labelrelationshipFields[0].Descriptor()
  174. // labelrelationship.DefaultLabelID holds the default value on creation for the label_id field.
  175. labelrelationship.DefaultLabelID = labelrelationshipDescLabelID.Default.(uint64)
  176. // labelrelationshipDescContactID is the schema descriptor for contact_id field.
  177. labelrelationshipDescContactID := labelrelationshipFields[1].Descriptor()
  178. // labelrelationship.DefaultContactID holds the default value on creation for the contact_id field.
  179. labelrelationship.DefaultContactID = labelrelationshipDescContactID.Default.(uint64)
  180. messageFields := schema.Message{}.Fields()
  181. _ = messageFields
  182. // messageDescWxWxid is the schema descriptor for wx_wxid field.
  183. messageDescWxWxid := messageFields[0].Descriptor()
  184. // message.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  185. message.DefaultWxWxid = messageDescWxWxid.Default.(string)
  186. // messageDescWxid is the schema descriptor for wxid field.
  187. messageDescWxid := messageFields[1].Descriptor()
  188. // message.DefaultWxid holds the default value on creation for the wxid field.
  189. message.DefaultWxid = messageDescWxid.Default.(string)
  190. // messageDescContent is the schema descriptor for content field.
  191. messageDescContent := messageFields[2].Descriptor()
  192. // message.DefaultContent holds the default value on creation for the content field.
  193. message.DefaultContent = messageDescContent.Default.(string)
  194. serverMixin := schema.Server{}.Mixin()
  195. serverMixinHooks2 := serverMixin[2].Hooks()
  196. server.Hooks[0] = serverMixinHooks2[0]
  197. serverMixinInters2 := serverMixin[2].Interceptors()
  198. server.Interceptors[0] = serverMixinInters2[0]
  199. serverMixinFields0 := serverMixin[0].Fields()
  200. _ = serverMixinFields0
  201. serverMixinFields1 := serverMixin[1].Fields()
  202. _ = serverMixinFields1
  203. serverFields := schema.Server{}.Fields()
  204. _ = serverFields
  205. // serverDescCreatedAt is the schema descriptor for created_at field.
  206. serverDescCreatedAt := serverMixinFields0[1].Descriptor()
  207. // server.DefaultCreatedAt holds the default value on creation for the created_at field.
  208. server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
  209. // serverDescUpdatedAt is the schema descriptor for updated_at field.
  210. serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
  211. // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  212. server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
  213. // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  214. server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
  215. // serverDescStatus is the schema descriptor for status field.
  216. serverDescStatus := serverMixinFields1[0].Descriptor()
  217. // server.DefaultStatus holds the default value on creation for the status field.
  218. server.DefaultStatus = serverDescStatus.Default.(uint8)
  219. wxMixin := schema.Wx{}.Mixin()
  220. wxMixinHooks2 := wxMixin[2].Hooks()
  221. wx.Hooks[0] = wxMixinHooks2[0]
  222. wxMixinInters2 := wxMixin[2].Interceptors()
  223. wx.Interceptors[0] = wxMixinInters2[0]
  224. wxMixinFields0 := wxMixin[0].Fields()
  225. _ = wxMixinFields0
  226. wxMixinFields1 := wxMixin[1].Fields()
  227. _ = wxMixinFields1
  228. wxFields := schema.Wx{}.Fields()
  229. _ = wxFields
  230. // wxDescCreatedAt is the schema descriptor for created_at field.
  231. wxDescCreatedAt := wxMixinFields0[1].Descriptor()
  232. // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
  233. wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
  234. // wxDescUpdatedAt is the schema descriptor for updated_at field.
  235. wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
  236. // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  237. wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
  238. // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  239. wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
  240. // wxDescStatus is the schema descriptor for status field.
  241. wxDescStatus := wxMixinFields1[0].Descriptor()
  242. // wx.DefaultStatus holds the default value on creation for the status field.
  243. wx.DefaultStatus = wxDescStatus.Default.(uint8)
  244. // wxDescServerID is the schema descriptor for server_id field.
  245. wxDescServerID := wxFields[0].Descriptor()
  246. // wx.DefaultServerID holds the default value on creation for the server_id field.
  247. wx.DefaultServerID = wxDescServerID.Default.(uint64)
  248. // wxDescPort is the schema descriptor for port field.
  249. wxDescPort := wxFields[1].Descriptor()
  250. // wx.DefaultPort holds the default value on creation for the port field.
  251. wx.DefaultPort = wxDescPort.Default.(string)
  252. // wxDescProcessID is the schema descriptor for process_id field.
  253. wxDescProcessID := wxFields[2].Descriptor()
  254. // wx.DefaultProcessID holds the default value on creation for the process_id field.
  255. wx.DefaultProcessID = wxDescProcessID.Default.(string)
  256. // wxDescCallback is the schema descriptor for callback field.
  257. wxDescCallback := wxFields[3].Descriptor()
  258. // wx.DefaultCallback holds the default value on creation for the callback field.
  259. wx.DefaultCallback = wxDescCallback.Default.(string)
  260. // wxDescWxid is the schema descriptor for wxid field.
  261. wxDescWxid := wxFields[4].Descriptor()
  262. // wx.DefaultWxid holds the default value on creation for the wxid field.
  263. wx.DefaultWxid = wxDescWxid.Default.(string)
  264. // wxDescAccount is the schema descriptor for account field.
  265. wxDescAccount := wxFields[5].Descriptor()
  266. // wx.DefaultAccount holds the default value on creation for the account field.
  267. wx.DefaultAccount = wxDescAccount.Default.(string)
  268. // wxDescNickname is the schema descriptor for nickname field.
  269. wxDescNickname := wxFields[6].Descriptor()
  270. // wx.DefaultNickname holds the default value on creation for the nickname field.
  271. wx.DefaultNickname = wxDescNickname.Default.(string)
  272. // wxDescTel is the schema descriptor for tel field.
  273. wxDescTel := wxFields[7].Descriptor()
  274. // wx.DefaultTel holds the default value on creation for the tel field.
  275. wx.DefaultTel = wxDescTel.Default.(string)
  276. // wxDescHeadBig is the schema descriptor for head_big field.
  277. wxDescHeadBig := wxFields[8].Descriptor()
  278. // wx.DefaultHeadBig holds the default value on creation for the head_big field.
  279. wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
  280. }
  281. const (
  282. Version = "v0.13.1" // Version of ent codegen.
  283. Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
  284. )