runtime.go 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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. labelMixin := schema.Label{}.Mixin()
  128. labelMixinHooks2 := labelMixin[2].Hooks()
  129. label.Hooks[0] = labelMixinHooks2[0]
  130. labelMixinInters2 := labelMixin[2].Interceptors()
  131. label.Interceptors[0] = labelMixinInters2[0]
  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. labelrelationshipMixin := schema.LabelRelationship{}.Mixin()
  173. labelrelationshipMixinHooks2 := labelrelationshipMixin[2].Hooks()
  174. labelrelationship.Hooks[0] = labelrelationshipMixinHooks2[0]
  175. labelrelationshipMixinInters2 := labelrelationshipMixin[2].Interceptors()
  176. labelrelationship.Interceptors[0] = labelrelationshipMixinInters2[0]
  177. labelrelationshipMixinFields0 := labelrelationshipMixin[0].Fields()
  178. _ = labelrelationshipMixinFields0
  179. labelrelationshipMixinFields1 := labelrelationshipMixin[1].Fields()
  180. _ = labelrelationshipMixinFields1
  181. labelrelationshipFields := schema.LabelRelationship{}.Fields()
  182. _ = labelrelationshipFields
  183. // labelrelationshipDescCreatedAt is the schema descriptor for created_at field.
  184. labelrelationshipDescCreatedAt := labelrelationshipMixinFields0[1].Descriptor()
  185. // labelrelationship.DefaultCreatedAt holds the default value on creation for the created_at field.
  186. labelrelationship.DefaultCreatedAt = labelrelationshipDescCreatedAt.Default.(func() time.Time)
  187. // labelrelationshipDescUpdatedAt is the schema descriptor for updated_at field.
  188. labelrelationshipDescUpdatedAt := labelrelationshipMixinFields0[2].Descriptor()
  189. // labelrelationship.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  190. labelrelationship.DefaultUpdatedAt = labelrelationshipDescUpdatedAt.Default.(func() time.Time)
  191. // labelrelationship.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  192. labelrelationship.UpdateDefaultUpdatedAt = labelrelationshipDescUpdatedAt.UpdateDefault.(func() time.Time)
  193. // labelrelationshipDescStatus is the schema descriptor for status field.
  194. labelrelationshipDescStatus := labelrelationshipMixinFields1[0].Descriptor()
  195. // labelrelationship.DefaultStatus holds the default value on creation for the status field.
  196. labelrelationship.DefaultStatus = labelrelationshipDescStatus.Default.(uint8)
  197. // labelrelationshipDescLabelID is the schema descriptor for label_id field.
  198. labelrelationshipDescLabelID := labelrelationshipFields[0].Descriptor()
  199. // labelrelationship.DefaultLabelID holds the default value on creation for the label_id field.
  200. labelrelationship.DefaultLabelID = labelrelationshipDescLabelID.Default.(uint64)
  201. // labelrelationshipDescContactID is the schema descriptor for contact_id field.
  202. labelrelationshipDescContactID := labelrelationshipFields[1].Descriptor()
  203. // labelrelationship.DefaultContactID holds the default value on creation for the contact_id field.
  204. labelrelationship.DefaultContactID = labelrelationshipDescContactID.Default.(uint64)
  205. messageFields := schema.Message{}.Fields()
  206. _ = messageFields
  207. // messageDescWxWxid is the schema descriptor for wx_wxid field.
  208. messageDescWxWxid := messageFields[0].Descriptor()
  209. // message.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  210. message.DefaultWxWxid = messageDescWxWxid.Default.(string)
  211. // messageDescWxid is the schema descriptor for wxid field.
  212. messageDescWxid := messageFields[1].Descriptor()
  213. // message.DefaultWxid holds the default value on creation for the wxid field.
  214. message.DefaultWxid = messageDescWxid.Default.(string)
  215. // messageDescContent is the schema descriptor for content field.
  216. messageDescContent := messageFields[2].Descriptor()
  217. // message.DefaultContent holds the default value on creation for the content field.
  218. message.DefaultContent = messageDescContent.Default.(string)
  219. messagerecordsMixin := schema.MessageRecords{}.Mixin()
  220. messagerecordsMixinHooks2 := messagerecordsMixin[2].Hooks()
  221. messagerecords.Hooks[0] = messagerecordsMixinHooks2[0]
  222. messagerecordsMixinInters2 := messagerecordsMixin[2].Interceptors()
  223. messagerecords.Interceptors[0] = messagerecordsMixinInters2[0]
  224. messagerecordsMixinFields0 := messagerecordsMixin[0].Fields()
  225. _ = messagerecordsMixinFields0
  226. messagerecordsMixinFields1 := messagerecordsMixin[1].Fields()
  227. _ = messagerecordsMixinFields1
  228. messagerecordsFields := schema.MessageRecords{}.Fields()
  229. _ = messagerecordsFields
  230. // messagerecordsDescCreatedAt is the schema descriptor for created_at field.
  231. messagerecordsDescCreatedAt := messagerecordsMixinFields0[1].Descriptor()
  232. // messagerecords.DefaultCreatedAt holds the default value on creation for the created_at field.
  233. messagerecords.DefaultCreatedAt = messagerecordsDescCreatedAt.Default.(func() time.Time)
  234. // messagerecordsDescUpdatedAt is the schema descriptor for updated_at field.
  235. messagerecordsDescUpdatedAt := messagerecordsMixinFields0[2].Descriptor()
  236. // messagerecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  237. messagerecords.DefaultUpdatedAt = messagerecordsDescUpdatedAt.Default.(func() time.Time)
  238. // messagerecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  239. messagerecords.UpdateDefaultUpdatedAt = messagerecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
  240. // messagerecordsDescStatus is the schema descriptor for status field.
  241. messagerecordsDescStatus := messagerecordsMixinFields1[0].Descriptor()
  242. // messagerecords.DefaultStatus holds the default value on creation for the status field.
  243. messagerecords.DefaultStatus = messagerecordsDescStatus.Default.(uint8)
  244. // messagerecordsDescContactType is the schema descriptor for contact_type field.
  245. messagerecordsDescContactType := messagerecordsFields[2].Descriptor()
  246. // messagerecords.DefaultContactType holds the default value on creation for the contact_type field.
  247. messagerecords.DefaultContactType = messagerecordsDescContactType.Default.(int)
  248. // messagerecordsDescContactWxid is the schema descriptor for contact_wxid field.
  249. messagerecordsDescContactWxid := messagerecordsFields[3].Descriptor()
  250. // messagerecords.DefaultContactWxid holds the default value on creation for the contact_wxid field.
  251. messagerecords.DefaultContactWxid = messagerecordsDescContactWxid.Default.(string)
  252. // messagerecordsDescContentType is the schema descriptor for content_type field.
  253. messagerecordsDescContentType := messagerecordsFields[4].Descriptor()
  254. // messagerecords.DefaultContentType holds the default value on creation for the content_type field.
  255. messagerecords.DefaultContentType = messagerecordsDescContentType.Default.(int)
  256. // messagerecordsDescContent is the schema descriptor for content field.
  257. messagerecordsDescContent := messagerecordsFields[5].Descriptor()
  258. // messagerecords.DefaultContent holds the default value on creation for the content field.
  259. messagerecords.DefaultContent = messagerecordsDescContent.Default.(string)
  260. // messagerecordsDescErrorDetail is the schema descriptor for error_detail field.
  261. messagerecordsDescErrorDetail := messagerecordsFields[7].Descriptor()
  262. // messagerecords.DefaultErrorDetail holds the default value on creation for the error_detail field.
  263. messagerecords.DefaultErrorDetail = messagerecordsDescErrorDetail.Default.(string)
  264. // messagerecordsDescSourceType is the schema descriptor for source_type field.
  265. messagerecordsDescSourceType := messagerecordsFields[9].Descriptor()
  266. // messagerecords.DefaultSourceType holds the default value on creation for the source_type field.
  267. messagerecords.DefaultSourceType = messagerecordsDescSourceType.Default.(int)
  268. // messagerecordsDescSourceID is the schema descriptor for source_id field.
  269. messagerecordsDescSourceID := messagerecordsFields[10].Descriptor()
  270. // messagerecords.DefaultSourceID holds the default value on creation for the source_id field.
  271. messagerecords.DefaultSourceID = messagerecordsDescSourceID.Default.(uint64)
  272. // messagerecordsDescSubSourceID is the schema descriptor for sub_source_id field.
  273. messagerecordsDescSubSourceID := messagerecordsFields[11].Descriptor()
  274. // messagerecords.DefaultSubSourceID holds the default value on creation for the sub_source_id field.
  275. messagerecords.DefaultSubSourceID = messagerecordsDescSubSourceID.Default.(uint64)
  276. msgMixin := schema.Msg{}.Mixin()
  277. msgMixinHooks1 := msgMixin[1].Hooks()
  278. msg.Hooks[0] = msgMixinHooks1[0]
  279. msgMixinInters1 := msgMixin[1].Interceptors()
  280. msg.Interceptors[0] = msgMixinInters1[0]
  281. msgMixinFields0 := msgMixin[0].Fields()
  282. _ = msgMixinFields0
  283. msgFields := schema.Msg{}.Fields()
  284. _ = msgFields
  285. // msgDescCreatedAt is the schema descriptor for created_at field.
  286. msgDescCreatedAt := msgMixinFields0[1].Descriptor()
  287. // msg.DefaultCreatedAt holds the default value on creation for the created_at field.
  288. msg.DefaultCreatedAt = msgDescCreatedAt.Default.(func() time.Time)
  289. // msgDescUpdatedAt is the schema descriptor for updated_at field.
  290. msgDescUpdatedAt := msgMixinFields0[2].Descriptor()
  291. // msg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  292. msg.DefaultUpdatedAt = msgDescUpdatedAt.Default.(func() time.Time)
  293. // msg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  294. msg.UpdateDefaultUpdatedAt = msgDescUpdatedAt.UpdateDefault.(func() time.Time)
  295. serverMixin := schema.Server{}.Mixin()
  296. serverMixinHooks2 := serverMixin[2].Hooks()
  297. server.Hooks[0] = serverMixinHooks2[0]
  298. serverMixinInters2 := serverMixin[2].Interceptors()
  299. server.Interceptors[0] = serverMixinInters2[0]
  300. serverMixinFields0 := serverMixin[0].Fields()
  301. _ = serverMixinFields0
  302. serverMixinFields1 := serverMixin[1].Fields()
  303. _ = serverMixinFields1
  304. serverFields := schema.Server{}.Fields()
  305. _ = serverFields
  306. // serverDescCreatedAt is the schema descriptor for created_at field.
  307. serverDescCreatedAt := serverMixinFields0[1].Descriptor()
  308. // server.DefaultCreatedAt holds the default value on creation for the created_at field.
  309. server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
  310. // serverDescUpdatedAt is the schema descriptor for updated_at field.
  311. serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
  312. // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  313. server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
  314. // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  315. server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
  316. // serverDescStatus is the schema descriptor for status field.
  317. serverDescStatus := serverMixinFields1[0].Descriptor()
  318. // server.DefaultStatus holds the default value on creation for the status field.
  319. server.DefaultStatus = serverDescStatus.Default.(uint8)
  320. sopnodeMixin := schema.SopNode{}.Mixin()
  321. sopnodeMixinHooks2 := sopnodeMixin[2].Hooks()
  322. sopnode.Hooks[0] = sopnodeMixinHooks2[0]
  323. sopnodeMixinInters2 := sopnodeMixin[2].Interceptors()
  324. sopnode.Interceptors[0] = sopnodeMixinInters2[0]
  325. sopnodeMixinFields0 := sopnodeMixin[0].Fields()
  326. _ = sopnodeMixinFields0
  327. sopnodeMixinFields1 := sopnodeMixin[1].Fields()
  328. _ = sopnodeMixinFields1
  329. sopnodeFields := schema.SopNode{}.Fields()
  330. _ = sopnodeFields
  331. // sopnodeDescCreatedAt is the schema descriptor for created_at field.
  332. sopnodeDescCreatedAt := sopnodeMixinFields0[1].Descriptor()
  333. // sopnode.DefaultCreatedAt holds the default value on creation for the created_at field.
  334. sopnode.DefaultCreatedAt = sopnodeDescCreatedAt.Default.(func() time.Time)
  335. // sopnodeDescUpdatedAt is the schema descriptor for updated_at field.
  336. sopnodeDescUpdatedAt := sopnodeMixinFields0[2].Descriptor()
  337. // sopnode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  338. sopnode.DefaultUpdatedAt = sopnodeDescUpdatedAt.Default.(func() time.Time)
  339. // sopnode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  340. sopnode.UpdateDefaultUpdatedAt = sopnodeDescUpdatedAt.UpdateDefault.(func() time.Time)
  341. // sopnodeDescStatus is the schema descriptor for status field.
  342. sopnodeDescStatus := sopnodeMixinFields1[0].Descriptor()
  343. // sopnode.DefaultStatus holds the default value on creation for the status field.
  344. sopnode.DefaultStatus = sopnodeDescStatus.Default.(uint8)
  345. // sopnodeDescName is the schema descriptor for name field.
  346. sopnodeDescName := sopnodeFields[2].Descriptor()
  347. // sopnode.DefaultName holds the default value on creation for the name field.
  348. sopnode.DefaultName = sopnodeDescName.Default.(string)
  349. // sopnodeDescConditionType is the schema descriptor for condition_type field.
  350. sopnodeDescConditionType := sopnodeFields[3].Descriptor()
  351. // sopnode.DefaultConditionType holds the default value on creation for the condition_type field.
  352. sopnode.DefaultConditionType = sopnodeDescConditionType.Default.(int)
  353. // sopnodeDescNoReplyCondition is the schema descriptor for no_reply_condition field.
  354. sopnodeDescNoReplyCondition := sopnodeFields[5].Descriptor()
  355. // sopnode.DefaultNoReplyCondition holds the default value on creation for the no_reply_condition field.
  356. sopnode.DefaultNoReplyCondition = sopnodeDescNoReplyCondition.Default.(uint64)
  357. sopstageMixin := schema.SopStage{}.Mixin()
  358. sopstageMixinHooks2 := sopstageMixin[2].Hooks()
  359. sopstage.Hooks[0] = sopstageMixinHooks2[0]
  360. sopstageMixinInters2 := sopstageMixin[2].Interceptors()
  361. sopstage.Interceptors[0] = sopstageMixinInters2[0]
  362. sopstageMixinFields0 := sopstageMixin[0].Fields()
  363. _ = sopstageMixinFields0
  364. sopstageMixinFields1 := sopstageMixin[1].Fields()
  365. _ = sopstageMixinFields1
  366. sopstageFields := schema.SopStage{}.Fields()
  367. _ = sopstageFields
  368. // sopstageDescCreatedAt is the schema descriptor for created_at field.
  369. sopstageDescCreatedAt := sopstageMixinFields0[1].Descriptor()
  370. // sopstage.DefaultCreatedAt holds the default value on creation for the created_at field.
  371. sopstage.DefaultCreatedAt = sopstageDescCreatedAt.Default.(func() time.Time)
  372. // sopstageDescUpdatedAt is the schema descriptor for updated_at field.
  373. sopstageDescUpdatedAt := sopstageMixinFields0[2].Descriptor()
  374. // sopstage.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  375. sopstage.DefaultUpdatedAt = sopstageDescUpdatedAt.Default.(func() time.Time)
  376. // sopstage.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  377. sopstage.UpdateDefaultUpdatedAt = sopstageDescUpdatedAt.UpdateDefault.(func() time.Time)
  378. // sopstageDescStatus is the schema descriptor for status field.
  379. sopstageDescStatus := sopstageMixinFields1[0].Descriptor()
  380. // sopstage.DefaultStatus holds the default value on creation for the status field.
  381. sopstage.DefaultStatus = sopstageDescStatus.Default.(uint8)
  382. // sopstageDescName is the schema descriptor for name field.
  383. sopstageDescName := sopstageFields[1].Descriptor()
  384. // sopstage.DefaultName holds the default value on creation for the name field.
  385. sopstage.DefaultName = sopstageDescName.Default.(string)
  386. // sopstageDescConditionType is the schema descriptor for condition_type field.
  387. sopstageDescConditionType := sopstageFields[2].Descriptor()
  388. // sopstage.DefaultConditionType holds the default value on creation for the condition_type field.
  389. sopstage.DefaultConditionType = sopstageDescConditionType.Default.(int)
  390. // sopstageDescConditionOperator is the schema descriptor for condition_operator field.
  391. sopstageDescConditionOperator := sopstageFields[3].Descriptor()
  392. // sopstage.DefaultConditionOperator holds the default value on creation for the condition_operator field.
  393. sopstage.DefaultConditionOperator = sopstageDescConditionOperator.Default.(int)
  394. // sopstageDescIndexSort is the schema descriptor for index_sort field.
  395. sopstageDescIndexSort := sopstageFields[7].Descriptor()
  396. // sopstage.DefaultIndexSort holds the default value on creation for the index_sort field.
  397. sopstage.DefaultIndexSort = sopstageDescIndexSort.Default.(int)
  398. soptaskMixin := schema.SopTask{}.Mixin()
  399. soptaskMixinHooks2 := soptaskMixin[2].Hooks()
  400. soptask.Hooks[0] = soptaskMixinHooks2[0]
  401. soptaskMixinInters2 := soptaskMixin[2].Interceptors()
  402. soptask.Interceptors[0] = soptaskMixinInters2[0]
  403. soptaskMixinFields0 := soptaskMixin[0].Fields()
  404. _ = soptaskMixinFields0
  405. soptaskMixinFields1 := soptaskMixin[1].Fields()
  406. _ = soptaskMixinFields1
  407. soptaskFields := schema.SopTask{}.Fields()
  408. _ = soptaskFields
  409. // soptaskDescCreatedAt is the schema descriptor for created_at field.
  410. soptaskDescCreatedAt := soptaskMixinFields0[1].Descriptor()
  411. // soptask.DefaultCreatedAt holds the default value on creation for the created_at field.
  412. soptask.DefaultCreatedAt = soptaskDescCreatedAt.Default.(func() time.Time)
  413. // soptaskDescUpdatedAt is the schema descriptor for updated_at field.
  414. soptaskDescUpdatedAt := soptaskMixinFields0[2].Descriptor()
  415. // soptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  416. soptask.DefaultUpdatedAt = soptaskDescUpdatedAt.Default.(func() time.Time)
  417. // soptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  418. soptask.UpdateDefaultUpdatedAt = soptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
  419. // soptaskDescStatus is the schema descriptor for status field.
  420. soptaskDescStatus := soptaskMixinFields1[0].Descriptor()
  421. // soptask.DefaultStatus holds the default value on creation for the status field.
  422. soptask.DefaultStatus = soptaskDescStatus.Default.(uint8)
  423. // soptaskDescName is the schema descriptor for name field.
  424. soptaskDescName := soptaskFields[0].Descriptor()
  425. // soptask.NameValidator is a validator for the "name" field. It is called by the builders before save.
  426. soptask.NameValidator = soptaskDescName.Validators[0].(func(string) error)
  427. // soptaskDescType is the schema descriptor for type field.
  428. soptaskDescType := soptaskFields[2].Descriptor()
  429. // soptask.DefaultType holds the default value on creation for the type field.
  430. soptask.DefaultType = soptaskDescType.Default.(int)
  431. wxMixin := schema.Wx{}.Mixin()
  432. wxMixinHooks2 := wxMixin[2].Hooks()
  433. wx.Hooks[0] = wxMixinHooks2[0]
  434. wxMixinInters2 := wxMixin[2].Interceptors()
  435. wx.Interceptors[0] = wxMixinInters2[0]
  436. wxMixinFields0 := wxMixin[0].Fields()
  437. _ = wxMixinFields0
  438. wxMixinFields1 := wxMixin[1].Fields()
  439. _ = wxMixinFields1
  440. wxFields := schema.Wx{}.Fields()
  441. _ = wxFields
  442. // wxDescCreatedAt is the schema descriptor for created_at field.
  443. wxDescCreatedAt := wxMixinFields0[1].Descriptor()
  444. // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
  445. wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
  446. // wxDescUpdatedAt is the schema descriptor for updated_at field.
  447. wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
  448. // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  449. wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
  450. // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  451. wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
  452. // wxDescStatus is the schema descriptor for status field.
  453. wxDescStatus := wxMixinFields1[0].Descriptor()
  454. // wx.DefaultStatus holds the default value on creation for the status field.
  455. wx.DefaultStatus = wxDescStatus.Default.(uint8)
  456. // wxDescServerID is the schema descriptor for server_id field.
  457. wxDescServerID := wxFields[0].Descriptor()
  458. // wx.DefaultServerID holds the default value on creation for the server_id field.
  459. wx.DefaultServerID = wxDescServerID.Default.(uint64)
  460. // wxDescPort is the schema descriptor for port field.
  461. wxDescPort := wxFields[1].Descriptor()
  462. // wx.DefaultPort holds the default value on creation for the port field.
  463. wx.DefaultPort = wxDescPort.Default.(string)
  464. // wxDescProcessID is the schema descriptor for process_id field.
  465. wxDescProcessID := wxFields[2].Descriptor()
  466. // wx.DefaultProcessID holds the default value on creation for the process_id field.
  467. wx.DefaultProcessID = wxDescProcessID.Default.(string)
  468. // wxDescCallback is the schema descriptor for callback field.
  469. wxDescCallback := wxFields[3].Descriptor()
  470. // wx.DefaultCallback holds the default value on creation for the callback field.
  471. wx.DefaultCallback = wxDescCallback.Default.(string)
  472. // wxDescWxid is the schema descriptor for wxid field.
  473. wxDescWxid := wxFields[4].Descriptor()
  474. // wx.DefaultWxid holds the default value on creation for the wxid field.
  475. wx.DefaultWxid = wxDescWxid.Default.(string)
  476. // wxDescAccount is the schema descriptor for account field.
  477. wxDescAccount := wxFields[5].Descriptor()
  478. // wx.DefaultAccount holds the default value on creation for the account field.
  479. wx.DefaultAccount = wxDescAccount.Default.(string)
  480. // wxDescNickname is the schema descriptor for nickname field.
  481. wxDescNickname := wxFields[6].Descriptor()
  482. // wx.DefaultNickname holds the default value on creation for the nickname field.
  483. wx.DefaultNickname = wxDescNickname.Default.(string)
  484. // wxDescTel is the schema descriptor for tel field.
  485. wxDescTel := wxFields[7].Descriptor()
  486. // wx.DefaultTel holds the default value on creation for the tel field.
  487. wx.DefaultTel = wxDescTel.Default.(string)
  488. // wxDescHeadBig is the schema descriptor for head_big field.
  489. wxDescHeadBig := wxFields[8].Descriptor()
  490. // wx.DefaultHeadBig holds the default value on creation for the head_big field.
  491. wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
  492. }
  493. const (
  494. Version = "v0.13.1" // Version of ent codegen.
  495. Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
  496. )