runtime.go 28 KB

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