runtime.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. // Code generated by ent, DO NOT EDIT.
  2. package runtime
  3. import (
  4. "time"
  5. "wechat-api/ent/contact"
  6. "wechat-api/ent/schema"
  7. "wechat-api/ent/server"
  8. "wechat-api/ent/wx"
  9. )
  10. // The init function reads all schema descriptors with runtime code
  11. // (default values, validators, hooks and policies) and stitches it
  12. // to their package variables.
  13. func init() {
  14. contactMixin := schema.Contact{}.Mixin()
  15. contactMixinHooks2 := contactMixin[2].Hooks()
  16. contact.Hooks[0] = contactMixinHooks2[0]
  17. contactMixinInters2 := contactMixin[2].Interceptors()
  18. contact.Interceptors[0] = contactMixinInters2[0]
  19. contactMixinFields0 := contactMixin[0].Fields()
  20. _ = contactMixinFields0
  21. contactMixinFields1 := contactMixin[1].Fields()
  22. _ = contactMixinFields1
  23. contactFields := schema.Contact{}.Fields()
  24. _ = contactFields
  25. // contactDescCreatedAt is the schema descriptor for created_at field.
  26. contactDescCreatedAt := contactMixinFields0[1].Descriptor()
  27. // contact.DefaultCreatedAt holds the default value on creation for the created_at field.
  28. contact.DefaultCreatedAt = contactDescCreatedAt.Default.(func() time.Time)
  29. // contactDescUpdatedAt is the schema descriptor for updated_at field.
  30. contactDescUpdatedAt := contactMixinFields0[2].Descriptor()
  31. // contact.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  32. contact.DefaultUpdatedAt = contactDescUpdatedAt.Default.(func() time.Time)
  33. // contact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  34. contact.UpdateDefaultUpdatedAt = contactDescUpdatedAt.UpdateDefault.(func() time.Time)
  35. // contactDescStatus is the schema descriptor for status field.
  36. contactDescStatus := contactMixinFields1[0].Descriptor()
  37. // contact.DefaultStatus holds the default value on creation for the status field.
  38. contact.DefaultStatus = contactDescStatus.Default.(uint8)
  39. // contactDescWxWxid is the schema descriptor for wx_wxid field.
  40. contactDescWxWxid := contactFields[0].Descriptor()
  41. // contact.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  42. contact.DefaultWxWxid = contactDescWxWxid.Default.(string)
  43. // contactDescType is the schema descriptor for type field.
  44. contactDescType := contactFields[1].Descriptor()
  45. // contact.DefaultType holds the default value on creation for the type field.
  46. contact.DefaultType = contactDescType.Default.(int)
  47. // contactDescWxid is the schema descriptor for wxid field.
  48. contactDescWxid := contactFields[2].Descriptor()
  49. // contact.DefaultWxid holds the default value on creation for the wxid field.
  50. contact.DefaultWxid = contactDescWxid.Default.(string)
  51. // contactDescAccount is the schema descriptor for account field.
  52. contactDescAccount := contactFields[3].Descriptor()
  53. // contact.DefaultAccount holds the default value on creation for the account field.
  54. contact.DefaultAccount = contactDescAccount.Default.(string)
  55. // contactDescNickname is the schema descriptor for nickname field.
  56. contactDescNickname := contactFields[4].Descriptor()
  57. // contact.DefaultNickname holds the default value on creation for the nickname field.
  58. contact.DefaultNickname = contactDescNickname.Default.(string)
  59. // contactDescMarkname is the schema descriptor for markname field.
  60. contactDescMarkname := contactFields[5].Descriptor()
  61. // contact.DefaultMarkname holds the default value on creation for the markname field.
  62. contact.DefaultMarkname = contactDescMarkname.Default.(string)
  63. // contactDescHeadimg is the schema descriptor for headimg field.
  64. contactDescHeadimg := contactFields[6].Descriptor()
  65. // contact.DefaultHeadimg holds the default value on creation for the headimg field.
  66. contact.DefaultHeadimg = contactDescHeadimg.Default.(string)
  67. // contactDescSex is the schema descriptor for sex field.
  68. contactDescSex := contactFields[7].Descriptor()
  69. // contact.DefaultSex holds the default value on creation for the sex field.
  70. contact.DefaultSex = contactDescSex.Default.(int)
  71. // contactDescStarrole is the schema descriptor for starrole field.
  72. contactDescStarrole := contactFields[8].Descriptor()
  73. // contact.DefaultStarrole holds the default value on creation for the starrole field.
  74. contact.DefaultStarrole = contactDescStarrole.Default.(string)
  75. // contactDescDontseeit is the schema descriptor for dontseeit field.
  76. contactDescDontseeit := contactFields[9].Descriptor()
  77. // contact.DefaultDontseeit holds the default value on creation for the dontseeit field.
  78. contact.DefaultDontseeit = contactDescDontseeit.Default.(int)
  79. // contactDescDontseeme is the schema descriptor for dontseeme field.
  80. contactDescDontseeme := contactFields[10].Descriptor()
  81. // contact.DefaultDontseeme holds the default value on creation for the dontseeme field.
  82. contact.DefaultDontseeme = contactDescDontseeme.Default.(int)
  83. // contactDescLag is the schema descriptor for lag field.
  84. contactDescLag := contactFields[11].Descriptor()
  85. // contact.DefaultLag holds the default value on creation for the lag field.
  86. contact.DefaultLag = contactDescLag.Default.(string)
  87. // contactDescGid is the schema descriptor for gid field.
  88. contactDescGid := contactFields[12].Descriptor()
  89. // contact.DefaultGid holds the default value on creation for the gid field.
  90. contact.DefaultGid = contactDescGid.Default.(string)
  91. // contactDescGname is the schema descriptor for gname field.
  92. contactDescGname := contactFields[13].Descriptor()
  93. // contact.DefaultGname holds the default value on creation for the gname field.
  94. contact.DefaultGname = contactDescGname.Default.(string)
  95. // contactDescV3 is the schema descriptor for v3 field.
  96. contactDescV3 := contactFields[14].Descriptor()
  97. // contact.DefaultV3 holds the default value on creation for the v3 field.
  98. contact.DefaultV3 = contactDescV3.Default.(string)
  99. serverMixin := schema.Server{}.Mixin()
  100. serverMixinHooks2 := serverMixin[2].Hooks()
  101. server.Hooks[0] = serverMixinHooks2[0]
  102. serverMixinInters2 := serverMixin[2].Interceptors()
  103. server.Interceptors[0] = serverMixinInters2[0]
  104. serverMixinFields0 := serverMixin[0].Fields()
  105. _ = serverMixinFields0
  106. serverMixinFields1 := serverMixin[1].Fields()
  107. _ = serverMixinFields1
  108. serverFields := schema.Server{}.Fields()
  109. _ = serverFields
  110. // serverDescCreatedAt is the schema descriptor for created_at field.
  111. serverDescCreatedAt := serverMixinFields0[1].Descriptor()
  112. // server.DefaultCreatedAt holds the default value on creation for the created_at field.
  113. server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
  114. // serverDescUpdatedAt is the schema descriptor for updated_at field.
  115. serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
  116. // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  117. server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
  118. // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  119. server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
  120. // serverDescStatus is the schema descriptor for status field.
  121. serverDescStatus := serverMixinFields1[0].Descriptor()
  122. // server.DefaultStatus holds the default value on creation for the status field.
  123. server.DefaultStatus = serverDescStatus.Default.(uint8)
  124. wxMixin := schema.Wx{}.Mixin()
  125. wxMixinHooks2 := wxMixin[2].Hooks()
  126. wx.Hooks[0] = wxMixinHooks2[0]
  127. wxMixinInters2 := wxMixin[2].Interceptors()
  128. wx.Interceptors[0] = wxMixinInters2[0]
  129. wxMixinFields0 := wxMixin[0].Fields()
  130. _ = wxMixinFields0
  131. wxMixinFields1 := wxMixin[1].Fields()
  132. _ = wxMixinFields1
  133. wxFields := schema.Wx{}.Fields()
  134. _ = wxFields
  135. // wxDescCreatedAt is the schema descriptor for created_at field.
  136. wxDescCreatedAt := wxMixinFields0[1].Descriptor()
  137. // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
  138. wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
  139. // wxDescUpdatedAt is the schema descriptor for updated_at field.
  140. wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
  141. // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  142. wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
  143. // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  144. wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
  145. // wxDescStatus is the schema descriptor for status field.
  146. wxDescStatus := wxMixinFields1[0].Descriptor()
  147. // wx.DefaultStatus holds the default value on creation for the status field.
  148. wx.DefaultStatus = wxDescStatus.Default.(uint8)
  149. // wxDescServerID is the schema descriptor for server_id field.
  150. wxDescServerID := wxFields[0].Descriptor()
  151. // wx.DefaultServerID holds the default value on creation for the server_id field.
  152. wx.DefaultServerID = wxDescServerID.Default.(uint64)
  153. // wxDescPort is the schema descriptor for port field.
  154. wxDescPort := wxFields[1].Descriptor()
  155. // wx.DefaultPort holds the default value on creation for the port field.
  156. wx.DefaultPort = wxDescPort.Default.(string)
  157. // wxDescProcessID is the schema descriptor for process_id field.
  158. wxDescProcessID := wxFields[2].Descriptor()
  159. // wx.DefaultProcessID holds the default value on creation for the process_id field.
  160. wx.DefaultProcessID = wxDescProcessID.Default.(string)
  161. // wxDescCallback is the schema descriptor for callback field.
  162. wxDescCallback := wxFields[3].Descriptor()
  163. // wx.DefaultCallback holds the default value on creation for the callback field.
  164. wx.DefaultCallback = wxDescCallback.Default.(string)
  165. // wxDescWxid is the schema descriptor for wxid field.
  166. wxDescWxid := wxFields[4].Descriptor()
  167. // wx.DefaultWxid holds the default value on creation for the wxid field.
  168. wx.DefaultWxid = wxDescWxid.Default.(string)
  169. // wxDescAccount is the schema descriptor for account field.
  170. wxDescAccount := wxFields[5].Descriptor()
  171. // wx.DefaultAccount holds the default value on creation for the account field.
  172. wx.DefaultAccount = wxDescAccount.Default.(string)
  173. // wxDescNickname is the schema descriptor for nickname field.
  174. wxDescNickname := wxFields[6].Descriptor()
  175. // wx.DefaultNickname holds the default value on creation for the nickname field.
  176. wx.DefaultNickname = wxDescNickname.Default.(string)
  177. // wxDescTel is the schema descriptor for tel field.
  178. wxDescTel := wxFields[7].Descriptor()
  179. // wx.DefaultTel holds the default value on creation for the tel field.
  180. wx.DefaultTel = wxDescTel.Default.(string)
  181. // wxDescHeadBig is the schema descriptor for head_big field.
  182. wxDescHeadBig := wxFields[8].Descriptor()
  183. // wx.DefaultHeadBig holds the default value on creation for the head_big field.
  184. wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
  185. }
  186. const (
  187. Version = "v0.13.1" // Version of ent codegen.
  188. Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
  189. )