runtime.go 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. // Code generated by ent, DO NOT EDIT.
  2. package runtime
  3. import (
  4. "time"
  5. "wechat-api/ent/batchmsg"
  6. "wechat-api/ent/contact"
  7. "wechat-api/ent/label"
  8. "wechat-api/ent/labelrelationship"
  9. "wechat-api/ent/message"
  10. "wechat-api/ent/messagerecords"
  11. "wechat-api/ent/msg"
  12. "wechat-api/ent/schema"
  13. "wechat-api/ent/server"
  14. "wechat-api/ent/sopnode"
  15. "wechat-api/ent/sopstage"
  16. "wechat-api/ent/soptask"
  17. "wechat-api/ent/wx"
  18. )
  19. // The init function reads all schema descriptors with runtime code
  20. // (default values, validators, hooks and policies) and stitches it
  21. // to their package variables.
  22. func init() {
  23. batchmsgMixin := schema.BatchMsg{}.Mixin()
  24. batchmsgMixinHooks1 := batchmsgMixin[1].Hooks()
  25. batchmsg.Hooks[0] = batchmsgMixinHooks1[0]
  26. batchmsgMixinInters1 := batchmsgMixin[1].Interceptors()
  27. batchmsg.Interceptors[0] = batchmsgMixinInters1[0]
  28. batchmsgMixinFields0 := batchmsgMixin[0].Fields()
  29. _ = batchmsgMixinFields0
  30. batchmsgFields := schema.BatchMsg{}.Fields()
  31. _ = batchmsgFields
  32. // batchmsgDescCreatedAt is the schema descriptor for created_at field.
  33. batchmsgDescCreatedAt := batchmsgMixinFields0[1].Descriptor()
  34. // batchmsg.DefaultCreatedAt holds the default value on creation for the created_at field.
  35. batchmsg.DefaultCreatedAt = batchmsgDescCreatedAt.Default.(func() time.Time)
  36. // batchmsgDescUpdatedAt is the schema descriptor for updated_at field.
  37. batchmsgDescUpdatedAt := batchmsgMixinFields0[2].Descriptor()
  38. // batchmsg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  39. batchmsg.DefaultUpdatedAt = batchmsgDescUpdatedAt.Default.(func() time.Time)
  40. // batchmsg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  41. batchmsg.UpdateDefaultUpdatedAt = batchmsgDescUpdatedAt.UpdateDefault.(func() time.Time)
  42. contactMixin := schema.Contact{}.Mixin()
  43. contactMixinHooks2 := contactMixin[2].Hooks()
  44. contact.Hooks[0] = contactMixinHooks2[0]
  45. contactMixinInters2 := contactMixin[2].Interceptors()
  46. contact.Interceptors[0] = contactMixinInters2[0]
  47. contactMixinFields0 := contactMixin[0].Fields()
  48. _ = contactMixinFields0
  49. contactMixinFields1 := contactMixin[1].Fields()
  50. _ = contactMixinFields1
  51. contactFields := schema.Contact{}.Fields()
  52. _ = contactFields
  53. // contactDescCreatedAt is the schema descriptor for created_at field.
  54. contactDescCreatedAt := contactMixinFields0[1].Descriptor()
  55. // contact.DefaultCreatedAt holds the default value on creation for the created_at field.
  56. contact.DefaultCreatedAt = contactDescCreatedAt.Default.(func() time.Time)
  57. // contactDescUpdatedAt is the schema descriptor for updated_at field.
  58. contactDescUpdatedAt := contactMixinFields0[2].Descriptor()
  59. // contact.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  60. contact.DefaultUpdatedAt = contactDescUpdatedAt.Default.(func() time.Time)
  61. // contact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  62. contact.UpdateDefaultUpdatedAt = contactDescUpdatedAt.UpdateDefault.(func() time.Time)
  63. // contactDescStatus is the schema descriptor for status field.
  64. contactDescStatus := contactMixinFields1[0].Descriptor()
  65. // contact.DefaultStatus holds the default value on creation for the status field.
  66. contact.DefaultStatus = contactDescStatus.Default.(uint8)
  67. // contactDescWxWxid is the schema descriptor for wx_wxid field.
  68. contactDescWxWxid := contactFields[0].Descriptor()
  69. // contact.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  70. contact.DefaultWxWxid = contactDescWxWxid.Default.(string)
  71. // contactDescType is the schema descriptor for type field.
  72. contactDescType := contactFields[1].Descriptor()
  73. // contact.DefaultType holds the default value on creation for the type field.
  74. contact.DefaultType = contactDescType.Default.(int)
  75. // contactDescWxid is the schema descriptor for wxid field.
  76. contactDescWxid := contactFields[2].Descriptor()
  77. // contact.DefaultWxid holds the default value on creation for the wxid field.
  78. contact.DefaultWxid = contactDescWxid.Default.(string)
  79. // contactDescAccount is the schema descriptor for account field.
  80. contactDescAccount := contactFields[3].Descriptor()
  81. // contact.DefaultAccount holds the default value on creation for the account field.
  82. contact.DefaultAccount = contactDescAccount.Default.(string)
  83. // contactDescNickname is the schema descriptor for nickname field.
  84. contactDescNickname := contactFields[4].Descriptor()
  85. // contact.DefaultNickname holds the default value on creation for the nickname field.
  86. contact.DefaultNickname = contactDescNickname.Default.(string)
  87. // contactDescMarkname is the schema descriptor for markname field.
  88. contactDescMarkname := contactFields[5].Descriptor()
  89. // contact.DefaultMarkname holds the default value on creation for the markname field.
  90. contact.DefaultMarkname = contactDescMarkname.Default.(string)
  91. // contactDescHeadimg is the schema descriptor for headimg field.
  92. contactDescHeadimg := contactFields[6].Descriptor()
  93. // contact.DefaultHeadimg holds the default value on creation for the headimg field.
  94. contact.DefaultHeadimg = contactDescHeadimg.Default.(string)
  95. // contactDescSex is the schema descriptor for sex field.
  96. contactDescSex := contactFields[7].Descriptor()
  97. // contact.DefaultSex holds the default value on creation for the sex field.
  98. contact.DefaultSex = contactDescSex.Default.(int)
  99. // contactDescStarrole is the schema descriptor for starrole field.
  100. contactDescStarrole := contactFields[8].Descriptor()
  101. // contact.DefaultStarrole holds the default value on creation for the starrole field.
  102. contact.DefaultStarrole = contactDescStarrole.Default.(string)
  103. // contactDescDontseeit is the schema descriptor for dontseeit field.
  104. contactDescDontseeit := contactFields[9].Descriptor()
  105. // contact.DefaultDontseeit holds the default value on creation for the dontseeit field.
  106. contact.DefaultDontseeit = contactDescDontseeit.Default.(int)
  107. // contactDescDontseeme is the schema descriptor for dontseeme field.
  108. contactDescDontseeme := contactFields[10].Descriptor()
  109. // contact.DefaultDontseeme holds the default value on creation for the dontseeme field.
  110. contact.DefaultDontseeme = contactDescDontseeme.Default.(int)
  111. // contactDescLag is the schema descriptor for lag field.
  112. contactDescLag := contactFields[11].Descriptor()
  113. // contact.DefaultLag holds the default value on creation for the lag field.
  114. contact.DefaultLag = contactDescLag.Default.(string)
  115. // contactDescGid is the schema descriptor for gid field.
  116. contactDescGid := contactFields[12].Descriptor()
  117. // contact.DefaultGid holds the default value on creation for the gid field.
  118. contact.DefaultGid = contactDescGid.Default.(string)
  119. // contactDescGname is the schema descriptor for gname field.
  120. contactDescGname := contactFields[13].Descriptor()
  121. // contact.DefaultGname holds the default value on creation for the gname field.
  122. contact.DefaultGname = contactDescGname.Default.(string)
  123. // contactDescV3 is the schema descriptor for v3 field.
  124. contactDescV3 := contactFields[14].Descriptor()
  125. // contact.DefaultV3 holds the default value on creation for the v3 field.
  126. contact.DefaultV3 = contactDescV3.Default.(string)
  127. // contactDescOrganizationID is the schema descriptor for organization_id field.
  128. contactDescOrganizationID := contactFields[15].Descriptor()
  129. // contact.DefaultOrganizationID holds the default value on creation for the organization_id field.
  130. contact.DefaultOrganizationID = contactDescOrganizationID.Default.(uint64)
  131. labelMixin := schema.Label{}.Mixin()
  132. labelMixinFields0 := labelMixin[0].Fields()
  133. _ = labelMixinFields0
  134. labelMixinFields1 := labelMixin[1].Fields()
  135. _ = labelMixinFields1
  136. labelFields := schema.Label{}.Fields()
  137. _ = labelFields
  138. // labelDescCreatedAt is the schema descriptor for created_at field.
  139. labelDescCreatedAt := labelMixinFields0[1].Descriptor()
  140. // label.DefaultCreatedAt holds the default value on creation for the created_at field.
  141. label.DefaultCreatedAt = labelDescCreatedAt.Default.(func() time.Time)
  142. // labelDescUpdatedAt is the schema descriptor for updated_at field.
  143. labelDescUpdatedAt := labelMixinFields0[2].Descriptor()
  144. // label.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  145. label.DefaultUpdatedAt = labelDescUpdatedAt.Default.(func() time.Time)
  146. // label.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  147. label.UpdateDefaultUpdatedAt = labelDescUpdatedAt.UpdateDefault.(func() time.Time)
  148. // labelDescStatus is the schema descriptor for status field.
  149. labelDescStatus := labelMixinFields1[0].Descriptor()
  150. // label.DefaultStatus holds the default value on creation for the status field.
  151. label.DefaultStatus = labelDescStatus.Default.(uint8)
  152. // labelDescType is the schema descriptor for type field.
  153. labelDescType := labelFields[0].Descriptor()
  154. // label.DefaultType holds the default value on creation for the type field.
  155. label.DefaultType = labelDescType.Default.(int)
  156. // labelDescName is the schema descriptor for name field.
  157. labelDescName := labelFields[1].Descriptor()
  158. // label.DefaultName holds the default value on creation for the name field.
  159. label.DefaultName = labelDescName.Default.(string)
  160. // labelDescFrom is the schema descriptor for from field.
  161. labelDescFrom := labelFields[2].Descriptor()
  162. // label.DefaultFrom holds the default value on creation for the from field.
  163. label.DefaultFrom = labelDescFrom.Default.(int)
  164. // labelDescMode is the schema descriptor for mode field.
  165. labelDescMode := labelFields[3].Descriptor()
  166. // label.DefaultMode holds the default value on creation for the mode field.
  167. label.DefaultMode = labelDescMode.Default.(int)
  168. // labelDescConditions is the schema descriptor for conditions field.
  169. labelDescConditions := labelFields[4].Descriptor()
  170. // label.DefaultConditions holds the default value on creation for the conditions field.
  171. label.DefaultConditions = labelDescConditions.Default.(string)
  172. // labelDescOrganizationID is the schema descriptor for organization_id field.
  173. labelDescOrganizationID := labelFields[5].Descriptor()
  174. // label.DefaultOrganizationID holds the default value on creation for the organization_id field.
  175. label.DefaultOrganizationID = labelDescOrganizationID.Default.(uint64)
  176. labelrelationshipMixin := schema.LabelRelationship{}.Mixin()
  177. labelrelationshipMixinHooks2 := labelrelationshipMixin[2].Hooks()
  178. labelrelationship.Hooks[0] = labelrelationshipMixinHooks2[0]
  179. labelrelationshipMixinInters2 := labelrelationshipMixin[2].Interceptors()
  180. labelrelationship.Interceptors[0] = labelrelationshipMixinInters2[0]
  181. labelrelationshipMixinFields0 := labelrelationshipMixin[0].Fields()
  182. _ = labelrelationshipMixinFields0
  183. labelrelationshipMixinFields1 := labelrelationshipMixin[1].Fields()
  184. _ = labelrelationshipMixinFields1
  185. labelrelationshipFields := schema.LabelRelationship{}.Fields()
  186. _ = labelrelationshipFields
  187. // labelrelationshipDescCreatedAt is the schema descriptor for created_at field.
  188. labelrelationshipDescCreatedAt := labelrelationshipMixinFields0[1].Descriptor()
  189. // labelrelationship.DefaultCreatedAt holds the default value on creation for the created_at field.
  190. labelrelationship.DefaultCreatedAt = labelrelationshipDescCreatedAt.Default.(func() time.Time)
  191. // labelrelationshipDescUpdatedAt is the schema descriptor for updated_at field.
  192. labelrelationshipDescUpdatedAt := labelrelationshipMixinFields0[2].Descriptor()
  193. // labelrelationship.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  194. labelrelationship.DefaultUpdatedAt = labelrelationshipDescUpdatedAt.Default.(func() time.Time)
  195. // labelrelationship.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  196. labelrelationship.UpdateDefaultUpdatedAt = labelrelationshipDescUpdatedAt.UpdateDefault.(func() time.Time)
  197. // labelrelationshipDescStatus is the schema descriptor for status field.
  198. labelrelationshipDescStatus := labelrelationshipMixinFields1[0].Descriptor()
  199. // labelrelationship.DefaultStatus holds the default value on creation for the status field.
  200. labelrelationship.DefaultStatus = labelrelationshipDescStatus.Default.(uint8)
  201. // labelrelationshipDescLabelID is the schema descriptor for label_id field.
  202. labelrelationshipDescLabelID := labelrelationshipFields[0].Descriptor()
  203. // labelrelationship.DefaultLabelID holds the default value on creation for the label_id field.
  204. labelrelationship.DefaultLabelID = labelrelationshipDescLabelID.Default.(uint64)
  205. // labelrelationshipDescContactID is the schema descriptor for contact_id field.
  206. labelrelationshipDescContactID := labelrelationshipFields[1].Descriptor()
  207. // labelrelationship.DefaultContactID holds the default value on creation for the contact_id field.
  208. labelrelationship.DefaultContactID = labelrelationshipDescContactID.Default.(uint64)
  209. // labelrelationshipDescOrganizationID is the schema descriptor for organization_id field.
  210. labelrelationshipDescOrganizationID := labelrelationshipFields[2].Descriptor()
  211. // labelrelationship.DefaultOrganizationID holds the default value on creation for the organization_id field.
  212. labelrelationship.DefaultOrganizationID = labelrelationshipDescOrganizationID.Default.(uint64)
  213. messageFields := schema.Message{}.Fields()
  214. _ = messageFields
  215. // messageDescWxWxid is the schema descriptor for wx_wxid field.
  216. messageDescWxWxid := messageFields[0].Descriptor()
  217. // message.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  218. message.DefaultWxWxid = messageDescWxWxid.Default.(string)
  219. // messageDescWxid is the schema descriptor for wxid field.
  220. messageDescWxid := messageFields[1].Descriptor()
  221. // message.DefaultWxid holds the default value on creation for the wxid field.
  222. message.DefaultWxid = messageDescWxid.Default.(string)
  223. // messageDescContent is the schema descriptor for content field.
  224. messageDescContent := messageFields[2].Descriptor()
  225. // message.DefaultContent holds the default value on creation for the content field.
  226. message.DefaultContent = messageDescContent.Default.(string)
  227. messagerecordsMixin := schema.MessageRecords{}.Mixin()
  228. messagerecordsMixinHooks2 := messagerecordsMixin[2].Hooks()
  229. messagerecords.Hooks[0] = messagerecordsMixinHooks2[0]
  230. messagerecordsMixinInters2 := messagerecordsMixin[2].Interceptors()
  231. messagerecords.Interceptors[0] = messagerecordsMixinInters2[0]
  232. messagerecordsMixinFields0 := messagerecordsMixin[0].Fields()
  233. _ = messagerecordsMixinFields0
  234. messagerecordsMixinFields1 := messagerecordsMixin[1].Fields()
  235. _ = messagerecordsMixinFields1
  236. messagerecordsFields := schema.MessageRecords{}.Fields()
  237. _ = messagerecordsFields
  238. // messagerecordsDescCreatedAt is the schema descriptor for created_at field.
  239. messagerecordsDescCreatedAt := messagerecordsMixinFields0[1].Descriptor()
  240. // messagerecords.DefaultCreatedAt holds the default value on creation for the created_at field.
  241. messagerecords.DefaultCreatedAt = messagerecordsDescCreatedAt.Default.(func() time.Time)
  242. // messagerecordsDescUpdatedAt is the schema descriptor for updated_at field.
  243. messagerecordsDescUpdatedAt := messagerecordsMixinFields0[2].Descriptor()
  244. // messagerecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  245. messagerecords.DefaultUpdatedAt = messagerecordsDescUpdatedAt.Default.(func() time.Time)
  246. // messagerecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  247. messagerecords.UpdateDefaultUpdatedAt = messagerecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
  248. // messagerecordsDescStatus is the schema descriptor for status field.
  249. messagerecordsDescStatus := messagerecordsMixinFields1[0].Descriptor()
  250. // messagerecords.DefaultStatus holds the default value on creation for the status field.
  251. messagerecords.DefaultStatus = messagerecordsDescStatus.Default.(uint8)
  252. // messagerecordsDescContactType is the schema descriptor for contact_type field.
  253. messagerecordsDescContactType := messagerecordsFields[2].Descriptor()
  254. // messagerecords.DefaultContactType holds the default value on creation for the contact_type field.
  255. messagerecords.DefaultContactType = messagerecordsDescContactType.Default.(int)
  256. // messagerecordsDescContactWxid is the schema descriptor for contact_wxid field.
  257. messagerecordsDescContactWxid := messagerecordsFields[3].Descriptor()
  258. // messagerecords.DefaultContactWxid holds the default value on creation for the contact_wxid field.
  259. messagerecords.DefaultContactWxid = messagerecordsDescContactWxid.Default.(string)
  260. // messagerecordsDescContentType is the schema descriptor for content_type field.
  261. messagerecordsDescContentType := messagerecordsFields[4].Descriptor()
  262. // messagerecords.DefaultContentType holds the default value on creation for the content_type field.
  263. messagerecords.DefaultContentType = messagerecordsDescContentType.Default.(int)
  264. // messagerecordsDescContent is the schema descriptor for content field.
  265. messagerecordsDescContent := messagerecordsFields[5].Descriptor()
  266. // messagerecords.DefaultContent holds the default value on creation for the content field.
  267. messagerecords.DefaultContent = messagerecordsDescContent.Default.(string)
  268. // messagerecordsDescErrorDetail is the schema descriptor for error_detail field.
  269. messagerecordsDescErrorDetail := messagerecordsFields[7].Descriptor()
  270. // messagerecords.DefaultErrorDetail holds the default value on creation for the error_detail field.
  271. messagerecords.DefaultErrorDetail = messagerecordsDescErrorDetail.Default.(string)
  272. // messagerecordsDescSourceType is the schema descriptor for source_type field.
  273. messagerecordsDescSourceType := messagerecordsFields[9].Descriptor()
  274. // messagerecords.DefaultSourceType holds the default value on creation for the source_type field.
  275. messagerecords.DefaultSourceType = messagerecordsDescSourceType.Default.(int)
  276. // messagerecordsDescSourceID is the schema descriptor for source_id field.
  277. messagerecordsDescSourceID := messagerecordsFields[10].Descriptor()
  278. // messagerecords.DefaultSourceID holds the default value on creation for the source_id field.
  279. messagerecords.DefaultSourceID = messagerecordsDescSourceID.Default.(uint64)
  280. // messagerecordsDescSubSourceID is the schema descriptor for sub_source_id field.
  281. messagerecordsDescSubSourceID := messagerecordsFields[11].Descriptor()
  282. // messagerecords.DefaultSubSourceID holds the default value on creation for the sub_source_id field.
  283. messagerecords.DefaultSubSourceID = messagerecordsDescSubSourceID.Default.(uint64)
  284. // messagerecordsDescOrganizationID is the schema descriptor for organization_id field.
  285. messagerecordsDescOrganizationID := messagerecordsFields[12].Descriptor()
  286. // messagerecords.DefaultOrganizationID holds the default value on creation for the organization_id field.
  287. messagerecords.DefaultOrganizationID = messagerecordsDescOrganizationID.Default.(uint64)
  288. msgMixin := schema.Msg{}.Mixin()
  289. msgMixinHooks1 := msgMixin[1].Hooks()
  290. msg.Hooks[0] = msgMixinHooks1[0]
  291. msgMixinInters1 := msgMixin[1].Interceptors()
  292. msg.Interceptors[0] = msgMixinInters1[0]
  293. msgMixinFields0 := msgMixin[0].Fields()
  294. _ = msgMixinFields0
  295. msgFields := schema.Msg{}.Fields()
  296. _ = msgFields
  297. // msgDescCreatedAt is the schema descriptor for created_at field.
  298. msgDescCreatedAt := msgMixinFields0[1].Descriptor()
  299. // msg.DefaultCreatedAt holds the default value on creation for the created_at field.
  300. msg.DefaultCreatedAt = msgDescCreatedAt.Default.(func() time.Time)
  301. // msgDescUpdatedAt is the schema descriptor for updated_at field.
  302. msgDescUpdatedAt := msgMixinFields0[2].Descriptor()
  303. // msg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  304. msg.DefaultUpdatedAt = msgDescUpdatedAt.Default.(func() time.Time)
  305. // msg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  306. msg.UpdateDefaultUpdatedAt = msgDescUpdatedAt.UpdateDefault.(func() time.Time)
  307. serverMixin := schema.Server{}.Mixin()
  308. serverMixinHooks2 := serverMixin[2].Hooks()
  309. server.Hooks[0] = serverMixinHooks2[0]
  310. serverMixinInters2 := serverMixin[2].Interceptors()
  311. server.Interceptors[0] = serverMixinInters2[0]
  312. serverMixinFields0 := serverMixin[0].Fields()
  313. _ = serverMixinFields0
  314. serverMixinFields1 := serverMixin[1].Fields()
  315. _ = serverMixinFields1
  316. serverFields := schema.Server{}.Fields()
  317. _ = serverFields
  318. // serverDescCreatedAt is the schema descriptor for created_at field.
  319. serverDescCreatedAt := serverMixinFields0[1].Descriptor()
  320. // server.DefaultCreatedAt holds the default value on creation for the created_at field.
  321. server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
  322. // serverDescUpdatedAt is the schema descriptor for updated_at field.
  323. serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
  324. // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  325. server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
  326. // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  327. server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
  328. // serverDescStatus is the schema descriptor for status field.
  329. serverDescStatus := serverMixinFields1[0].Descriptor()
  330. // server.DefaultStatus holds the default value on creation for the status field.
  331. server.DefaultStatus = serverDescStatus.Default.(uint8)
  332. sopnodeMixin := schema.SopNode{}.Mixin()
  333. sopnodeMixinHooks2 := sopnodeMixin[2].Hooks()
  334. sopnode.Hooks[0] = sopnodeMixinHooks2[0]
  335. sopnodeMixinInters2 := sopnodeMixin[2].Interceptors()
  336. sopnode.Interceptors[0] = sopnodeMixinInters2[0]
  337. sopnodeMixinFields0 := sopnodeMixin[0].Fields()
  338. _ = sopnodeMixinFields0
  339. sopnodeMixinFields1 := sopnodeMixin[1].Fields()
  340. _ = sopnodeMixinFields1
  341. sopnodeFields := schema.SopNode{}.Fields()
  342. _ = sopnodeFields
  343. // sopnodeDescCreatedAt is the schema descriptor for created_at field.
  344. sopnodeDescCreatedAt := sopnodeMixinFields0[1].Descriptor()
  345. // sopnode.DefaultCreatedAt holds the default value on creation for the created_at field.
  346. sopnode.DefaultCreatedAt = sopnodeDescCreatedAt.Default.(func() time.Time)
  347. // sopnodeDescUpdatedAt is the schema descriptor for updated_at field.
  348. sopnodeDescUpdatedAt := sopnodeMixinFields0[2].Descriptor()
  349. // sopnode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  350. sopnode.DefaultUpdatedAt = sopnodeDescUpdatedAt.Default.(func() time.Time)
  351. // sopnode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  352. sopnode.UpdateDefaultUpdatedAt = sopnodeDescUpdatedAt.UpdateDefault.(func() time.Time)
  353. // sopnodeDescStatus is the schema descriptor for status field.
  354. sopnodeDescStatus := sopnodeMixinFields1[0].Descriptor()
  355. // sopnode.DefaultStatus holds the default value on creation for the status field.
  356. sopnode.DefaultStatus = sopnodeDescStatus.Default.(uint8)
  357. // sopnodeDescName is the schema descriptor for name field.
  358. sopnodeDescName := sopnodeFields[2].Descriptor()
  359. // sopnode.DefaultName holds the default value on creation for the name field.
  360. sopnode.DefaultName = sopnodeDescName.Default.(string)
  361. // sopnodeDescConditionType is the schema descriptor for condition_type field.
  362. sopnodeDescConditionType := sopnodeFields[3].Descriptor()
  363. // sopnode.DefaultConditionType holds the default value on creation for the condition_type field.
  364. sopnode.DefaultConditionType = sopnodeDescConditionType.Default.(int)
  365. // sopnodeDescNoReplyCondition is the schema descriptor for no_reply_condition field.
  366. sopnodeDescNoReplyCondition := sopnodeFields[5].Descriptor()
  367. // sopnode.DefaultNoReplyCondition holds the default value on creation for the no_reply_condition field.
  368. sopnode.DefaultNoReplyCondition = sopnodeDescNoReplyCondition.Default.(uint64)
  369. sopstageMixin := schema.SopStage{}.Mixin()
  370. sopstageMixinHooks2 := sopstageMixin[2].Hooks()
  371. sopstage.Hooks[0] = sopstageMixinHooks2[0]
  372. sopstageMixinInters2 := sopstageMixin[2].Interceptors()
  373. sopstage.Interceptors[0] = sopstageMixinInters2[0]
  374. sopstageMixinFields0 := sopstageMixin[0].Fields()
  375. _ = sopstageMixinFields0
  376. sopstageMixinFields1 := sopstageMixin[1].Fields()
  377. _ = sopstageMixinFields1
  378. sopstageFields := schema.SopStage{}.Fields()
  379. _ = sopstageFields
  380. // sopstageDescCreatedAt is the schema descriptor for created_at field.
  381. sopstageDescCreatedAt := sopstageMixinFields0[1].Descriptor()
  382. // sopstage.DefaultCreatedAt holds the default value on creation for the created_at field.
  383. sopstage.DefaultCreatedAt = sopstageDescCreatedAt.Default.(func() time.Time)
  384. // sopstageDescUpdatedAt is the schema descriptor for updated_at field.
  385. sopstageDescUpdatedAt := sopstageMixinFields0[2].Descriptor()
  386. // sopstage.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  387. sopstage.DefaultUpdatedAt = sopstageDescUpdatedAt.Default.(func() time.Time)
  388. // sopstage.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  389. sopstage.UpdateDefaultUpdatedAt = sopstageDescUpdatedAt.UpdateDefault.(func() time.Time)
  390. // sopstageDescStatus is the schema descriptor for status field.
  391. sopstageDescStatus := sopstageMixinFields1[0].Descriptor()
  392. // sopstage.DefaultStatus holds the default value on creation for the status field.
  393. sopstage.DefaultStatus = sopstageDescStatus.Default.(uint8)
  394. // sopstageDescName is the schema descriptor for name field.
  395. sopstageDescName := sopstageFields[1].Descriptor()
  396. // sopstage.DefaultName holds the default value on creation for the name field.
  397. sopstage.DefaultName = sopstageDescName.Default.(string)
  398. // sopstageDescConditionType is the schema descriptor for condition_type field.
  399. sopstageDescConditionType := sopstageFields[2].Descriptor()
  400. // sopstage.DefaultConditionType holds the default value on creation for the condition_type field.
  401. sopstage.DefaultConditionType = sopstageDescConditionType.Default.(int)
  402. // sopstageDescConditionOperator is the schema descriptor for condition_operator field.
  403. sopstageDescConditionOperator := sopstageFields[3].Descriptor()
  404. // sopstage.DefaultConditionOperator holds the default value on creation for the condition_operator field.
  405. sopstage.DefaultConditionOperator = sopstageDescConditionOperator.Default.(int)
  406. // sopstageDescIndexSort is the schema descriptor for index_sort field.
  407. sopstageDescIndexSort := sopstageFields[7].Descriptor()
  408. // sopstage.DefaultIndexSort holds the default value on creation for the index_sort field.
  409. sopstage.DefaultIndexSort = sopstageDescIndexSort.Default.(int)
  410. soptaskMixin := schema.SopTask{}.Mixin()
  411. soptaskMixinHooks2 := soptaskMixin[2].Hooks()
  412. soptask.Hooks[0] = soptaskMixinHooks2[0]
  413. soptaskMixinInters2 := soptaskMixin[2].Interceptors()
  414. soptask.Interceptors[0] = soptaskMixinInters2[0]
  415. soptaskMixinFields0 := soptaskMixin[0].Fields()
  416. _ = soptaskMixinFields0
  417. soptaskMixinFields1 := soptaskMixin[1].Fields()
  418. _ = soptaskMixinFields1
  419. soptaskFields := schema.SopTask{}.Fields()
  420. _ = soptaskFields
  421. // soptaskDescCreatedAt is the schema descriptor for created_at field.
  422. soptaskDescCreatedAt := soptaskMixinFields0[1].Descriptor()
  423. // soptask.DefaultCreatedAt holds the default value on creation for the created_at field.
  424. soptask.DefaultCreatedAt = soptaskDescCreatedAt.Default.(func() time.Time)
  425. // soptaskDescUpdatedAt is the schema descriptor for updated_at field.
  426. soptaskDescUpdatedAt := soptaskMixinFields0[2].Descriptor()
  427. // soptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  428. soptask.DefaultUpdatedAt = soptaskDescUpdatedAt.Default.(func() time.Time)
  429. // soptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  430. soptask.UpdateDefaultUpdatedAt = soptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
  431. // soptaskDescStatus is the schema descriptor for status field.
  432. soptaskDescStatus := soptaskMixinFields1[0].Descriptor()
  433. // soptask.DefaultStatus holds the default value on creation for the status field.
  434. soptask.DefaultStatus = soptaskDescStatus.Default.(uint8)
  435. // soptaskDescName is the schema descriptor for name field.
  436. soptaskDescName := soptaskFields[0].Descriptor()
  437. // soptask.NameValidator is a validator for the "name" field. It is called by the builders before save.
  438. soptask.NameValidator = soptaskDescName.Validators[0].(func(string) error)
  439. // soptaskDescType is the schema descriptor for type field.
  440. soptaskDescType := soptaskFields[2].Descriptor()
  441. // soptask.DefaultType holds the default value on creation for the type field.
  442. soptask.DefaultType = soptaskDescType.Default.(int)
  443. // soptaskDescOrganizationID is the schema descriptor for organization_id field.
  444. soptaskDescOrganizationID := soptaskFields[6].Descriptor()
  445. // soptask.DefaultOrganizationID holds the default value on creation for the organization_id field.
  446. soptask.DefaultOrganizationID = soptaskDescOrganizationID.Default.(uint64)
  447. wxMixin := schema.Wx{}.Mixin()
  448. wxMixinHooks2 := wxMixin[2].Hooks()
  449. wx.Hooks[0] = wxMixinHooks2[0]
  450. wxMixinInters2 := wxMixin[2].Interceptors()
  451. wx.Interceptors[0] = wxMixinInters2[0]
  452. wxMixinFields0 := wxMixin[0].Fields()
  453. _ = wxMixinFields0
  454. wxMixinFields1 := wxMixin[1].Fields()
  455. _ = wxMixinFields1
  456. wxFields := schema.Wx{}.Fields()
  457. _ = wxFields
  458. // wxDescCreatedAt is the schema descriptor for created_at field.
  459. wxDescCreatedAt := wxMixinFields0[1].Descriptor()
  460. // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
  461. wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
  462. // wxDescUpdatedAt is the schema descriptor for updated_at field.
  463. wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
  464. // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  465. wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
  466. // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  467. wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
  468. // wxDescStatus is the schema descriptor for status field.
  469. wxDescStatus := wxMixinFields1[0].Descriptor()
  470. // wx.DefaultStatus holds the default value on creation for the status field.
  471. wx.DefaultStatus = wxDescStatus.Default.(uint8)
  472. // wxDescServerID is the schema descriptor for server_id field.
  473. wxDescServerID := wxFields[0].Descriptor()
  474. // wx.DefaultServerID holds the default value on creation for the server_id field.
  475. wx.DefaultServerID = wxDescServerID.Default.(uint64)
  476. // wxDescPort is the schema descriptor for port field.
  477. wxDescPort := wxFields[1].Descriptor()
  478. // wx.DefaultPort holds the default value on creation for the port field.
  479. wx.DefaultPort = wxDescPort.Default.(string)
  480. // wxDescProcessID is the schema descriptor for process_id field.
  481. wxDescProcessID := wxFields[2].Descriptor()
  482. // wx.DefaultProcessID holds the default value on creation for the process_id field.
  483. wx.DefaultProcessID = wxDescProcessID.Default.(string)
  484. // wxDescCallback is the schema descriptor for callback field.
  485. wxDescCallback := wxFields[3].Descriptor()
  486. // wx.DefaultCallback holds the default value on creation for the callback field.
  487. wx.DefaultCallback = wxDescCallback.Default.(string)
  488. // wxDescWxid is the schema descriptor for wxid field.
  489. wxDescWxid := wxFields[4].Descriptor()
  490. // wx.DefaultWxid holds the default value on creation for the wxid field.
  491. wx.DefaultWxid = wxDescWxid.Default.(string)
  492. // wxDescAccount is the schema descriptor for account field.
  493. wxDescAccount := wxFields[5].Descriptor()
  494. // wx.DefaultAccount holds the default value on creation for the account field.
  495. wx.DefaultAccount = wxDescAccount.Default.(string)
  496. // wxDescNickname is the schema descriptor for nickname field.
  497. wxDescNickname := wxFields[6].Descriptor()
  498. // wx.DefaultNickname holds the default value on creation for the nickname field.
  499. wx.DefaultNickname = wxDescNickname.Default.(string)
  500. // wxDescTel is the schema descriptor for tel field.
  501. wxDescTel := wxFields[7].Descriptor()
  502. // wx.DefaultTel holds the default value on creation for the tel field.
  503. wx.DefaultTel = wxDescTel.Default.(string)
  504. // wxDescHeadBig is the schema descriptor for head_big field.
  505. wxDescHeadBig := wxFields[8].Descriptor()
  506. // wx.DefaultHeadBig holds the default value on creation for the head_big field.
  507. wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
  508. // wxDescOrganizationID is the schema descriptor for organization_id field.
  509. wxDescOrganizationID := wxFields[9].Descriptor()
  510. // wx.DefaultOrganizationID holds the default value on creation for the organization_id field.
  511. wx.DefaultOrganizationID = wxDescOrganizationID.Default.(uint64)
  512. }
  513. const (
  514. Version = "v0.13.1" // Version of ent codegen.
  515. Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
  516. )