runtime.go 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. // Code generated by ent, DO NOT EDIT.
  2. package runtime
  3. import (
  4. "time"
  5. "wechat-api/ent/agent"
  6. "wechat-api/ent/batchmsg"
  7. "wechat-api/ent/contact"
  8. "wechat-api/ent/employee"
  9. "wechat-api/ent/label"
  10. "wechat-api/ent/labelrelationship"
  11. "wechat-api/ent/message"
  12. "wechat-api/ent/messagerecords"
  13. "wechat-api/ent/msg"
  14. "wechat-api/ent/schema"
  15. "wechat-api/ent/server"
  16. "wechat-api/ent/sopnode"
  17. "wechat-api/ent/sopstage"
  18. "wechat-api/ent/soptask"
  19. "wechat-api/ent/token"
  20. "wechat-api/ent/tutorial"
  21. "wechat-api/ent/workexperience"
  22. "wechat-api/ent/wx"
  23. )
  24. // The init function reads all schema descriptors with runtime code
  25. // (default values, validators, hooks and policies) and stitches it
  26. // to their package variables.
  27. func init() {
  28. agentMixin := schema.Agent{}.Mixin()
  29. agentMixinHooks1 := agentMixin[1].Hooks()
  30. agent.Hooks[0] = agentMixinHooks1[0]
  31. agentMixinInters1 := agentMixin[1].Interceptors()
  32. agent.Interceptors[0] = agentMixinInters1[0]
  33. agentMixinFields0 := agentMixin[0].Fields()
  34. _ = agentMixinFields0
  35. agentFields := schema.Agent{}.Fields()
  36. _ = agentFields
  37. // agentDescCreatedAt is the schema descriptor for created_at field.
  38. agentDescCreatedAt := agentMixinFields0[1].Descriptor()
  39. // agent.DefaultCreatedAt holds the default value on creation for the created_at field.
  40. agent.DefaultCreatedAt = agentDescCreatedAt.Default.(func() time.Time)
  41. // agentDescUpdatedAt is the schema descriptor for updated_at field.
  42. agentDescUpdatedAt := agentMixinFields0[2].Descriptor()
  43. // agent.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  44. agent.DefaultUpdatedAt = agentDescUpdatedAt.Default.(func() time.Time)
  45. // agent.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  46. agent.UpdateDefaultUpdatedAt = agentDescUpdatedAt.UpdateDefault.(func() time.Time)
  47. // agentDescName is the schema descriptor for name field.
  48. agentDescName := agentFields[0].Descriptor()
  49. // agent.NameValidator is a validator for the "name" field. It is called by the builders before save.
  50. agent.NameValidator = agentDescName.Validators[0].(func(string) error)
  51. // agentDescRole is the schema descriptor for role field.
  52. agentDescRole := agentFields[1].Descriptor()
  53. // agent.RoleValidator is a validator for the "role" field. It is called by the builders before save.
  54. agent.RoleValidator = agentDescRole.Validators[0].(func(string) error)
  55. // agentDescStatus is the schema descriptor for status field.
  56. agentDescStatus := agentFields[2].Descriptor()
  57. // agent.DefaultStatus holds the default value on creation for the status field.
  58. agent.DefaultStatus = agentDescStatus.Default.(int)
  59. // agent.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  60. agent.StatusValidator = agentDescStatus.Validators[0].(func(int) error)
  61. // agentDescBackground is the schema descriptor for background field.
  62. agentDescBackground := agentFields[3].Descriptor()
  63. // agent.DefaultBackground holds the default value on creation for the background field.
  64. agent.DefaultBackground = agentDescBackground.Default.(string)
  65. // agent.BackgroundValidator is a validator for the "background" field. It is called by the builders before save.
  66. agent.BackgroundValidator = agentDescBackground.Validators[0].(func(string) error)
  67. // agentDescExamples is the schema descriptor for examples field.
  68. agentDescExamples := agentFields[4].Descriptor()
  69. // agent.DefaultExamples holds the default value on creation for the examples field.
  70. agent.DefaultExamples = agentDescExamples.Default.(string)
  71. // agent.ExamplesValidator is a validator for the "examples" field. It is called by the builders before save.
  72. agent.ExamplesValidator = agentDescExamples.Validators[0].(func(string) error)
  73. // agentDescOrganizationID is the schema descriptor for organization_id field.
  74. agentDescOrganizationID := agentFields[5].Descriptor()
  75. // agent.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  76. agent.OrganizationIDValidator = agentDescOrganizationID.Validators[0].(func(uint64) error)
  77. batchmsgMixin := schema.BatchMsg{}.Mixin()
  78. batchmsgMixinHooks1 := batchmsgMixin[1].Hooks()
  79. batchmsg.Hooks[0] = batchmsgMixinHooks1[0]
  80. batchmsgMixinInters1 := batchmsgMixin[1].Interceptors()
  81. batchmsg.Interceptors[0] = batchmsgMixinInters1[0]
  82. batchmsgMixinFields0 := batchmsgMixin[0].Fields()
  83. _ = batchmsgMixinFields0
  84. batchmsgFields := schema.BatchMsg{}.Fields()
  85. _ = batchmsgFields
  86. // batchmsgDescCreatedAt is the schema descriptor for created_at field.
  87. batchmsgDescCreatedAt := batchmsgMixinFields0[1].Descriptor()
  88. // batchmsg.DefaultCreatedAt holds the default value on creation for the created_at field.
  89. batchmsg.DefaultCreatedAt = batchmsgDescCreatedAt.Default.(func() time.Time)
  90. // batchmsgDescUpdatedAt is the schema descriptor for updated_at field.
  91. batchmsgDescUpdatedAt := batchmsgMixinFields0[2].Descriptor()
  92. // batchmsg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  93. batchmsg.DefaultUpdatedAt = batchmsgDescUpdatedAt.Default.(func() time.Time)
  94. // batchmsg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  95. batchmsg.UpdateDefaultUpdatedAt = batchmsgDescUpdatedAt.UpdateDefault.(func() time.Time)
  96. // batchmsgDescTaskName is the schema descriptor for task_name field.
  97. batchmsgDescTaskName := batchmsgFields[2].Descriptor()
  98. // batchmsg.DefaultTaskName holds the default value on creation for the task_name field.
  99. batchmsg.DefaultTaskName = batchmsgDescTaskName.Default.(string)
  100. contactMixin := schema.Contact{}.Mixin()
  101. contactMixinHooks2 := contactMixin[2].Hooks()
  102. contact.Hooks[0] = contactMixinHooks2[0]
  103. contactMixinInters2 := contactMixin[2].Interceptors()
  104. contact.Interceptors[0] = contactMixinInters2[0]
  105. contactMixinFields0 := contactMixin[0].Fields()
  106. _ = contactMixinFields0
  107. contactMixinFields1 := contactMixin[1].Fields()
  108. _ = contactMixinFields1
  109. contactFields := schema.Contact{}.Fields()
  110. _ = contactFields
  111. // contactDescCreatedAt is the schema descriptor for created_at field.
  112. contactDescCreatedAt := contactMixinFields0[1].Descriptor()
  113. // contact.DefaultCreatedAt holds the default value on creation for the created_at field.
  114. contact.DefaultCreatedAt = contactDescCreatedAt.Default.(func() time.Time)
  115. // contactDescUpdatedAt is the schema descriptor for updated_at field.
  116. contactDescUpdatedAt := contactMixinFields0[2].Descriptor()
  117. // contact.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  118. contact.DefaultUpdatedAt = contactDescUpdatedAt.Default.(func() time.Time)
  119. // contact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  120. contact.UpdateDefaultUpdatedAt = contactDescUpdatedAt.UpdateDefault.(func() time.Time)
  121. // contactDescStatus is the schema descriptor for status field.
  122. contactDescStatus := contactMixinFields1[0].Descriptor()
  123. // contact.DefaultStatus holds the default value on creation for the status field.
  124. contact.DefaultStatus = contactDescStatus.Default.(uint8)
  125. // contactDescWxWxid is the schema descriptor for wx_wxid field.
  126. contactDescWxWxid := contactFields[0].Descriptor()
  127. // contact.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  128. contact.DefaultWxWxid = contactDescWxWxid.Default.(string)
  129. // contactDescType is the schema descriptor for type field.
  130. contactDescType := contactFields[1].Descriptor()
  131. // contact.DefaultType holds the default value on creation for the type field.
  132. contact.DefaultType = contactDescType.Default.(int)
  133. // contactDescWxid is the schema descriptor for wxid field.
  134. contactDescWxid := contactFields[2].Descriptor()
  135. // contact.DefaultWxid holds the default value on creation for the wxid field.
  136. contact.DefaultWxid = contactDescWxid.Default.(string)
  137. // contactDescAccount is the schema descriptor for account field.
  138. contactDescAccount := contactFields[3].Descriptor()
  139. // contact.DefaultAccount holds the default value on creation for the account field.
  140. contact.DefaultAccount = contactDescAccount.Default.(string)
  141. // contactDescNickname is the schema descriptor for nickname field.
  142. contactDescNickname := contactFields[4].Descriptor()
  143. // contact.DefaultNickname holds the default value on creation for the nickname field.
  144. contact.DefaultNickname = contactDescNickname.Default.(string)
  145. // contactDescMarkname is the schema descriptor for markname field.
  146. contactDescMarkname := contactFields[5].Descriptor()
  147. // contact.DefaultMarkname holds the default value on creation for the markname field.
  148. contact.DefaultMarkname = contactDescMarkname.Default.(string)
  149. // contactDescHeadimg is the schema descriptor for headimg field.
  150. contactDescHeadimg := contactFields[6].Descriptor()
  151. // contact.DefaultHeadimg holds the default value on creation for the headimg field.
  152. contact.DefaultHeadimg = contactDescHeadimg.Default.(string)
  153. // contactDescSex is the schema descriptor for sex field.
  154. contactDescSex := contactFields[7].Descriptor()
  155. // contact.DefaultSex holds the default value on creation for the sex field.
  156. contact.DefaultSex = contactDescSex.Default.(int)
  157. // contactDescStarrole is the schema descriptor for starrole field.
  158. contactDescStarrole := contactFields[8].Descriptor()
  159. // contact.DefaultStarrole holds the default value on creation for the starrole field.
  160. contact.DefaultStarrole = contactDescStarrole.Default.(string)
  161. // contactDescDontseeit is the schema descriptor for dontseeit field.
  162. contactDescDontseeit := contactFields[9].Descriptor()
  163. // contact.DefaultDontseeit holds the default value on creation for the dontseeit field.
  164. contact.DefaultDontseeit = contactDescDontseeit.Default.(int)
  165. // contactDescDontseeme is the schema descriptor for dontseeme field.
  166. contactDescDontseeme := contactFields[10].Descriptor()
  167. // contact.DefaultDontseeme holds the default value on creation for the dontseeme field.
  168. contact.DefaultDontseeme = contactDescDontseeme.Default.(int)
  169. // contactDescLag is the schema descriptor for lag field.
  170. contactDescLag := contactFields[11].Descriptor()
  171. // contact.DefaultLag holds the default value on creation for the lag field.
  172. contact.DefaultLag = contactDescLag.Default.(string)
  173. // contactDescGid is the schema descriptor for gid field.
  174. contactDescGid := contactFields[12].Descriptor()
  175. // contact.DefaultGid holds the default value on creation for the gid field.
  176. contact.DefaultGid = contactDescGid.Default.(string)
  177. // contactDescGname is the schema descriptor for gname field.
  178. contactDescGname := contactFields[13].Descriptor()
  179. // contact.DefaultGname holds the default value on creation for the gname field.
  180. contact.DefaultGname = contactDescGname.Default.(string)
  181. // contactDescV3 is the schema descriptor for v3 field.
  182. contactDescV3 := contactFields[14].Descriptor()
  183. // contact.DefaultV3 holds the default value on creation for the v3 field.
  184. contact.DefaultV3 = contactDescV3.Default.(string)
  185. // contactDescOrganizationID is the schema descriptor for organization_id field.
  186. contactDescOrganizationID := contactFields[15].Descriptor()
  187. // contact.DefaultOrganizationID holds the default value on creation for the organization_id field.
  188. contact.DefaultOrganizationID = contactDescOrganizationID.Default.(uint64)
  189. employeeMixin := schema.Employee{}.Mixin()
  190. employeeMixinHooks1 := employeeMixin[1].Hooks()
  191. employee.Hooks[0] = employeeMixinHooks1[0]
  192. employeeMixinInters1 := employeeMixin[1].Interceptors()
  193. employee.Interceptors[0] = employeeMixinInters1[0]
  194. employeeMixinFields0 := employeeMixin[0].Fields()
  195. _ = employeeMixinFields0
  196. employeeFields := schema.Employee{}.Fields()
  197. _ = employeeFields
  198. // employeeDescCreatedAt is the schema descriptor for created_at field.
  199. employeeDescCreatedAt := employeeMixinFields0[1].Descriptor()
  200. // employee.DefaultCreatedAt holds the default value on creation for the created_at field.
  201. employee.DefaultCreatedAt = employeeDescCreatedAt.Default.(func() time.Time)
  202. // employeeDescUpdatedAt is the schema descriptor for updated_at field.
  203. employeeDescUpdatedAt := employeeMixinFields0[2].Descriptor()
  204. // employee.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  205. employee.DefaultUpdatedAt = employeeDescUpdatedAt.Default.(func() time.Time)
  206. // employee.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  207. employee.UpdateDefaultUpdatedAt = employeeDescUpdatedAt.UpdateDefault.(func() time.Time)
  208. // employeeDescTitle is the schema descriptor for title field.
  209. employeeDescTitle := employeeFields[0].Descriptor()
  210. // employee.TitleValidator is a validator for the "title" field. It is called by the builders before save.
  211. employee.TitleValidator = employeeDescTitle.Validators[0].(func(string) error)
  212. // employeeDescAvatar is the schema descriptor for avatar field.
  213. employeeDescAvatar := employeeFields[1].Descriptor()
  214. // employee.AvatarValidator is a validator for the "avatar" field. It is called by the builders before save.
  215. employee.AvatarValidator = employeeDescAvatar.Validators[0].(func(string) error)
  216. // employeeDescTags is the schema descriptor for tags field.
  217. employeeDescTags := employeeFields[2].Descriptor()
  218. // employee.TagsValidator is a validator for the "tags" field. It is called by the builders before save.
  219. employee.TagsValidator = employeeDescTags.Validators[0].(func(string) error)
  220. // employeeDescHireCount is the schema descriptor for hire_count field.
  221. employeeDescHireCount := employeeFields[3].Descriptor()
  222. // employee.DefaultHireCount holds the default value on creation for the hire_count field.
  223. employee.DefaultHireCount = employeeDescHireCount.Default.(int)
  224. // employee.HireCountValidator is a validator for the "hire_count" field. It is called by the builders before save.
  225. employee.HireCountValidator = employeeDescHireCount.Validators[0].(func(int) error)
  226. // employeeDescServiceCount is the schema descriptor for service_count field.
  227. employeeDescServiceCount := employeeFields[4].Descriptor()
  228. // employee.DefaultServiceCount holds the default value on creation for the service_count field.
  229. employee.DefaultServiceCount = employeeDescServiceCount.Default.(int)
  230. // employee.ServiceCountValidator is a validator for the "service_count" field. It is called by the builders before save.
  231. employee.ServiceCountValidator = employeeDescServiceCount.Validators[0].(func(int) error)
  232. // employeeDescAchievementCount is the schema descriptor for achievement_count field.
  233. employeeDescAchievementCount := employeeFields[5].Descriptor()
  234. // employee.DefaultAchievementCount holds the default value on creation for the achievement_count field.
  235. employee.DefaultAchievementCount = employeeDescAchievementCount.Default.(int)
  236. // employee.AchievementCountValidator is a validator for the "achievement_count" field. It is called by the builders before save.
  237. employee.AchievementCountValidator = employeeDescAchievementCount.Validators[0].(func(int) error)
  238. // employeeDescIntro is the schema descriptor for intro field.
  239. employeeDescIntro := employeeFields[6].Descriptor()
  240. // employee.DefaultIntro holds the default value on creation for the intro field.
  241. employee.DefaultIntro = employeeDescIntro.Default.(string)
  242. // employee.IntroValidator is a validator for the "intro" field. It is called by the builders before save.
  243. employee.IntroValidator = employeeDescIntro.Validators[0].(func(string) error)
  244. // employeeDescEstimate is the schema descriptor for estimate field.
  245. employeeDescEstimate := employeeFields[7].Descriptor()
  246. // employee.DefaultEstimate holds the default value on creation for the estimate field.
  247. employee.DefaultEstimate = employeeDescEstimate.Default.(string)
  248. // employee.EstimateValidator is a validator for the "estimate" field. It is called by the builders before save.
  249. employee.EstimateValidator = employeeDescEstimate.Validators[0].(func(string) error)
  250. // employeeDescSkill is the schema descriptor for skill field.
  251. employeeDescSkill := employeeFields[8].Descriptor()
  252. // employee.DefaultSkill holds the default value on creation for the skill field.
  253. employee.DefaultSkill = employeeDescSkill.Default.(string)
  254. // employee.SkillValidator is a validator for the "skill" field. It is called by the builders before save.
  255. employee.SkillValidator = employeeDescSkill.Validators[0].(func(string) error)
  256. // employeeDescAbilityType is the schema descriptor for ability_type field.
  257. employeeDescAbilityType := employeeFields[9].Descriptor()
  258. // employee.DefaultAbilityType holds the default value on creation for the ability_type field.
  259. employee.DefaultAbilityType = employeeDescAbilityType.Default.(string)
  260. // employeeDescScene is the schema descriptor for scene field.
  261. employeeDescScene := employeeFields[10].Descriptor()
  262. // employee.DefaultScene holds the default value on creation for the scene field.
  263. employee.DefaultScene = employeeDescScene.Default.(string)
  264. // employeeDescSwitchIn is the schema descriptor for switch_in field.
  265. employeeDescSwitchIn := employeeFields[11].Descriptor()
  266. // employee.DefaultSwitchIn holds the default value on creation for the switch_in field.
  267. employee.DefaultSwitchIn = employeeDescSwitchIn.Default.(string)
  268. // employeeDescVideoURL is the schema descriptor for video_url field.
  269. employeeDescVideoURL := employeeFields[12].Descriptor()
  270. // employee.DefaultVideoURL holds the default value on creation for the video_url field.
  271. employee.DefaultVideoURL = employeeDescVideoURL.Default.(string)
  272. // employee.VideoURLValidator is a validator for the "video_url" field. It is called by the builders before save.
  273. employee.VideoURLValidator = employeeDescVideoURL.Validators[0].(func(string) error)
  274. // employeeDescOrganizationID is the schema descriptor for organization_id field.
  275. employeeDescOrganizationID := employeeFields[13].Descriptor()
  276. // employee.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  277. employee.OrganizationIDValidator = employeeDescOrganizationID.Validators[0].(func(uint64) error)
  278. labelMixin := schema.Label{}.Mixin()
  279. labelMixinFields0 := labelMixin[0].Fields()
  280. _ = labelMixinFields0
  281. labelMixinFields1 := labelMixin[1].Fields()
  282. _ = labelMixinFields1
  283. labelFields := schema.Label{}.Fields()
  284. _ = labelFields
  285. // labelDescCreatedAt is the schema descriptor for created_at field.
  286. labelDescCreatedAt := labelMixinFields0[1].Descriptor()
  287. // label.DefaultCreatedAt holds the default value on creation for the created_at field.
  288. label.DefaultCreatedAt = labelDescCreatedAt.Default.(func() time.Time)
  289. // labelDescUpdatedAt is the schema descriptor for updated_at field.
  290. labelDescUpdatedAt := labelMixinFields0[2].Descriptor()
  291. // label.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  292. label.DefaultUpdatedAt = labelDescUpdatedAt.Default.(func() time.Time)
  293. // label.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  294. label.UpdateDefaultUpdatedAt = labelDescUpdatedAt.UpdateDefault.(func() time.Time)
  295. // labelDescStatus is the schema descriptor for status field.
  296. labelDescStatus := labelMixinFields1[0].Descriptor()
  297. // label.DefaultStatus holds the default value on creation for the status field.
  298. label.DefaultStatus = labelDescStatus.Default.(uint8)
  299. // labelDescType is the schema descriptor for type field.
  300. labelDescType := labelFields[0].Descriptor()
  301. // label.DefaultType holds the default value on creation for the type field.
  302. label.DefaultType = labelDescType.Default.(int)
  303. // labelDescName is the schema descriptor for name field.
  304. labelDescName := labelFields[1].Descriptor()
  305. // label.DefaultName holds the default value on creation for the name field.
  306. label.DefaultName = labelDescName.Default.(string)
  307. // labelDescFrom is the schema descriptor for from field.
  308. labelDescFrom := labelFields[2].Descriptor()
  309. // label.DefaultFrom holds the default value on creation for the from field.
  310. label.DefaultFrom = labelDescFrom.Default.(int)
  311. // labelDescMode is the schema descriptor for mode field.
  312. labelDescMode := labelFields[3].Descriptor()
  313. // label.DefaultMode holds the default value on creation for the mode field.
  314. label.DefaultMode = labelDescMode.Default.(int)
  315. // labelDescConditions is the schema descriptor for conditions field.
  316. labelDescConditions := labelFields[4].Descriptor()
  317. // label.DefaultConditions holds the default value on creation for the conditions field.
  318. label.DefaultConditions = labelDescConditions.Default.(string)
  319. // labelDescOrganizationID is the schema descriptor for organization_id field.
  320. labelDescOrganizationID := labelFields[5].Descriptor()
  321. // label.DefaultOrganizationID holds the default value on creation for the organization_id field.
  322. label.DefaultOrganizationID = labelDescOrganizationID.Default.(uint64)
  323. labelrelationshipMixin := schema.LabelRelationship{}.Mixin()
  324. labelrelationshipMixinHooks2 := labelrelationshipMixin[2].Hooks()
  325. labelrelationship.Hooks[0] = labelrelationshipMixinHooks2[0]
  326. labelrelationshipMixinInters2 := labelrelationshipMixin[2].Interceptors()
  327. labelrelationship.Interceptors[0] = labelrelationshipMixinInters2[0]
  328. labelrelationshipMixinFields0 := labelrelationshipMixin[0].Fields()
  329. _ = labelrelationshipMixinFields0
  330. labelrelationshipMixinFields1 := labelrelationshipMixin[1].Fields()
  331. _ = labelrelationshipMixinFields1
  332. labelrelationshipFields := schema.LabelRelationship{}.Fields()
  333. _ = labelrelationshipFields
  334. // labelrelationshipDescCreatedAt is the schema descriptor for created_at field.
  335. labelrelationshipDescCreatedAt := labelrelationshipMixinFields0[1].Descriptor()
  336. // labelrelationship.DefaultCreatedAt holds the default value on creation for the created_at field.
  337. labelrelationship.DefaultCreatedAt = labelrelationshipDescCreatedAt.Default.(func() time.Time)
  338. // labelrelationshipDescUpdatedAt is the schema descriptor for updated_at field.
  339. labelrelationshipDescUpdatedAt := labelrelationshipMixinFields0[2].Descriptor()
  340. // labelrelationship.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  341. labelrelationship.DefaultUpdatedAt = labelrelationshipDescUpdatedAt.Default.(func() time.Time)
  342. // labelrelationship.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  343. labelrelationship.UpdateDefaultUpdatedAt = labelrelationshipDescUpdatedAt.UpdateDefault.(func() time.Time)
  344. // labelrelationshipDescStatus is the schema descriptor for status field.
  345. labelrelationshipDescStatus := labelrelationshipMixinFields1[0].Descriptor()
  346. // labelrelationship.DefaultStatus holds the default value on creation for the status field.
  347. labelrelationship.DefaultStatus = labelrelationshipDescStatus.Default.(uint8)
  348. // labelrelationshipDescLabelID is the schema descriptor for label_id field.
  349. labelrelationshipDescLabelID := labelrelationshipFields[0].Descriptor()
  350. // labelrelationship.DefaultLabelID holds the default value on creation for the label_id field.
  351. labelrelationship.DefaultLabelID = labelrelationshipDescLabelID.Default.(uint64)
  352. // labelrelationshipDescContactID is the schema descriptor for contact_id field.
  353. labelrelationshipDescContactID := labelrelationshipFields[1].Descriptor()
  354. // labelrelationship.DefaultContactID holds the default value on creation for the contact_id field.
  355. labelrelationship.DefaultContactID = labelrelationshipDescContactID.Default.(uint64)
  356. // labelrelationshipDescOrganizationID is the schema descriptor for organization_id field.
  357. labelrelationshipDescOrganizationID := labelrelationshipFields[2].Descriptor()
  358. // labelrelationship.DefaultOrganizationID holds the default value on creation for the organization_id field.
  359. labelrelationship.DefaultOrganizationID = labelrelationshipDescOrganizationID.Default.(uint64)
  360. messageFields := schema.Message{}.Fields()
  361. _ = messageFields
  362. // messageDescWxWxid is the schema descriptor for wx_wxid field.
  363. messageDescWxWxid := messageFields[0].Descriptor()
  364. // message.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  365. message.DefaultWxWxid = messageDescWxWxid.Default.(string)
  366. // messageDescWxid is the schema descriptor for wxid field.
  367. messageDescWxid := messageFields[1].Descriptor()
  368. // message.DefaultWxid holds the default value on creation for the wxid field.
  369. message.DefaultWxid = messageDescWxid.Default.(string)
  370. // messageDescContent is the schema descriptor for content field.
  371. messageDescContent := messageFields[2].Descriptor()
  372. // message.DefaultContent holds the default value on creation for the content field.
  373. message.DefaultContent = messageDescContent.Default.(string)
  374. messagerecordsMixin := schema.MessageRecords{}.Mixin()
  375. messagerecordsMixinHooks2 := messagerecordsMixin[2].Hooks()
  376. messagerecords.Hooks[0] = messagerecordsMixinHooks2[0]
  377. messagerecordsMixinInters2 := messagerecordsMixin[2].Interceptors()
  378. messagerecords.Interceptors[0] = messagerecordsMixinInters2[0]
  379. messagerecordsMixinFields0 := messagerecordsMixin[0].Fields()
  380. _ = messagerecordsMixinFields0
  381. messagerecordsMixinFields1 := messagerecordsMixin[1].Fields()
  382. _ = messagerecordsMixinFields1
  383. messagerecordsFields := schema.MessageRecords{}.Fields()
  384. _ = messagerecordsFields
  385. // messagerecordsDescCreatedAt is the schema descriptor for created_at field.
  386. messagerecordsDescCreatedAt := messagerecordsMixinFields0[1].Descriptor()
  387. // messagerecords.DefaultCreatedAt holds the default value on creation for the created_at field.
  388. messagerecords.DefaultCreatedAt = messagerecordsDescCreatedAt.Default.(func() time.Time)
  389. // messagerecordsDescUpdatedAt is the schema descriptor for updated_at field.
  390. messagerecordsDescUpdatedAt := messagerecordsMixinFields0[2].Descriptor()
  391. // messagerecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  392. messagerecords.DefaultUpdatedAt = messagerecordsDescUpdatedAt.Default.(func() time.Time)
  393. // messagerecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  394. messagerecords.UpdateDefaultUpdatedAt = messagerecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
  395. // messagerecordsDescStatus is the schema descriptor for status field.
  396. messagerecordsDescStatus := messagerecordsMixinFields1[0].Descriptor()
  397. // messagerecords.DefaultStatus holds the default value on creation for the status field.
  398. messagerecords.DefaultStatus = messagerecordsDescStatus.Default.(uint8)
  399. // messagerecordsDescContactType is the schema descriptor for contact_type field.
  400. messagerecordsDescContactType := messagerecordsFields[2].Descriptor()
  401. // messagerecords.DefaultContactType holds the default value on creation for the contact_type field.
  402. messagerecords.DefaultContactType = messagerecordsDescContactType.Default.(int)
  403. // messagerecordsDescContactWxid is the schema descriptor for contact_wxid field.
  404. messagerecordsDescContactWxid := messagerecordsFields[3].Descriptor()
  405. // messagerecords.DefaultContactWxid holds the default value on creation for the contact_wxid field.
  406. messagerecords.DefaultContactWxid = messagerecordsDescContactWxid.Default.(string)
  407. // messagerecordsDescContentType is the schema descriptor for content_type field.
  408. messagerecordsDescContentType := messagerecordsFields[4].Descriptor()
  409. // messagerecords.DefaultContentType holds the default value on creation for the content_type field.
  410. messagerecords.DefaultContentType = messagerecordsDescContentType.Default.(int)
  411. // messagerecordsDescContent is the schema descriptor for content field.
  412. messagerecordsDescContent := messagerecordsFields[5].Descriptor()
  413. // messagerecords.DefaultContent holds the default value on creation for the content field.
  414. messagerecords.DefaultContent = messagerecordsDescContent.Default.(string)
  415. // messagerecordsDescErrorDetail is the schema descriptor for error_detail field.
  416. messagerecordsDescErrorDetail := messagerecordsFields[7].Descriptor()
  417. // messagerecords.DefaultErrorDetail holds the default value on creation for the error_detail field.
  418. messagerecords.DefaultErrorDetail = messagerecordsDescErrorDetail.Default.(string)
  419. // messagerecordsDescSourceType is the schema descriptor for source_type field.
  420. messagerecordsDescSourceType := messagerecordsFields[9].Descriptor()
  421. // messagerecords.DefaultSourceType holds the default value on creation for the source_type field.
  422. messagerecords.DefaultSourceType = messagerecordsDescSourceType.Default.(int)
  423. // messagerecordsDescSourceID is the schema descriptor for source_id field.
  424. messagerecordsDescSourceID := messagerecordsFields[10].Descriptor()
  425. // messagerecords.DefaultSourceID holds the default value on creation for the source_id field.
  426. messagerecords.DefaultSourceID = messagerecordsDescSourceID.Default.(uint64)
  427. // messagerecordsDescSubSourceID is the schema descriptor for sub_source_id field.
  428. messagerecordsDescSubSourceID := messagerecordsFields[11].Descriptor()
  429. // messagerecords.DefaultSubSourceID holds the default value on creation for the sub_source_id field.
  430. messagerecords.DefaultSubSourceID = messagerecordsDescSubSourceID.Default.(uint64)
  431. // messagerecordsDescOrganizationID is the schema descriptor for organization_id field.
  432. messagerecordsDescOrganizationID := messagerecordsFields[12].Descriptor()
  433. // messagerecords.DefaultOrganizationID holds the default value on creation for the organization_id field.
  434. messagerecords.DefaultOrganizationID = messagerecordsDescOrganizationID.Default.(uint64)
  435. msgMixin := schema.Msg{}.Mixin()
  436. msgMixinHooks1 := msgMixin[1].Hooks()
  437. msg.Hooks[0] = msgMixinHooks1[0]
  438. msgMixinInters1 := msgMixin[1].Interceptors()
  439. msg.Interceptors[0] = msgMixinInters1[0]
  440. msgMixinFields0 := msgMixin[0].Fields()
  441. _ = msgMixinFields0
  442. msgFields := schema.Msg{}.Fields()
  443. _ = msgFields
  444. // msgDescCreatedAt is the schema descriptor for created_at field.
  445. msgDescCreatedAt := msgMixinFields0[1].Descriptor()
  446. // msg.DefaultCreatedAt holds the default value on creation for the created_at field.
  447. msg.DefaultCreatedAt = msgDescCreatedAt.Default.(func() time.Time)
  448. // msgDescUpdatedAt is the schema descriptor for updated_at field.
  449. msgDescUpdatedAt := msgMixinFields0[2].Descriptor()
  450. // msg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  451. msg.DefaultUpdatedAt = msgDescUpdatedAt.Default.(func() time.Time)
  452. // msg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  453. msg.UpdateDefaultUpdatedAt = msgDescUpdatedAt.UpdateDefault.(func() time.Time)
  454. serverMixin := schema.Server{}.Mixin()
  455. serverMixinHooks2 := serverMixin[2].Hooks()
  456. server.Hooks[0] = serverMixinHooks2[0]
  457. serverMixinInters2 := serverMixin[2].Interceptors()
  458. server.Interceptors[0] = serverMixinInters2[0]
  459. serverMixinFields0 := serverMixin[0].Fields()
  460. _ = serverMixinFields0
  461. serverMixinFields1 := serverMixin[1].Fields()
  462. _ = serverMixinFields1
  463. serverFields := schema.Server{}.Fields()
  464. _ = serverFields
  465. // serverDescCreatedAt is the schema descriptor for created_at field.
  466. serverDescCreatedAt := serverMixinFields0[1].Descriptor()
  467. // server.DefaultCreatedAt holds the default value on creation for the created_at field.
  468. server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
  469. // serverDescUpdatedAt is the schema descriptor for updated_at field.
  470. serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
  471. // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  472. server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
  473. // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  474. server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
  475. // serverDescStatus is the schema descriptor for status field.
  476. serverDescStatus := serverMixinFields1[0].Descriptor()
  477. // server.DefaultStatus holds the default value on creation for the status field.
  478. server.DefaultStatus = serverDescStatus.Default.(uint8)
  479. sopnodeMixin := schema.SopNode{}.Mixin()
  480. sopnodeMixinHooks2 := sopnodeMixin[2].Hooks()
  481. sopnode.Hooks[0] = sopnodeMixinHooks2[0]
  482. sopnodeMixinInters2 := sopnodeMixin[2].Interceptors()
  483. sopnode.Interceptors[0] = sopnodeMixinInters2[0]
  484. sopnodeMixinFields0 := sopnodeMixin[0].Fields()
  485. _ = sopnodeMixinFields0
  486. sopnodeMixinFields1 := sopnodeMixin[1].Fields()
  487. _ = sopnodeMixinFields1
  488. sopnodeFields := schema.SopNode{}.Fields()
  489. _ = sopnodeFields
  490. // sopnodeDescCreatedAt is the schema descriptor for created_at field.
  491. sopnodeDescCreatedAt := sopnodeMixinFields0[1].Descriptor()
  492. // sopnode.DefaultCreatedAt holds the default value on creation for the created_at field.
  493. sopnode.DefaultCreatedAt = sopnodeDescCreatedAt.Default.(func() time.Time)
  494. // sopnodeDescUpdatedAt is the schema descriptor for updated_at field.
  495. sopnodeDescUpdatedAt := sopnodeMixinFields0[2].Descriptor()
  496. // sopnode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  497. sopnode.DefaultUpdatedAt = sopnodeDescUpdatedAt.Default.(func() time.Time)
  498. // sopnode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  499. sopnode.UpdateDefaultUpdatedAt = sopnodeDescUpdatedAt.UpdateDefault.(func() time.Time)
  500. // sopnodeDescStatus is the schema descriptor for status field.
  501. sopnodeDescStatus := sopnodeMixinFields1[0].Descriptor()
  502. // sopnode.DefaultStatus holds the default value on creation for the status field.
  503. sopnode.DefaultStatus = sopnodeDescStatus.Default.(uint8)
  504. // sopnodeDescName is the schema descriptor for name field.
  505. sopnodeDescName := sopnodeFields[2].Descriptor()
  506. // sopnode.DefaultName holds the default value on creation for the name field.
  507. sopnode.DefaultName = sopnodeDescName.Default.(string)
  508. // sopnodeDescConditionType is the schema descriptor for condition_type field.
  509. sopnodeDescConditionType := sopnodeFields[3].Descriptor()
  510. // sopnode.DefaultConditionType holds the default value on creation for the condition_type field.
  511. sopnode.DefaultConditionType = sopnodeDescConditionType.Default.(int)
  512. // sopnodeDescNoReplyCondition is the schema descriptor for no_reply_condition field.
  513. sopnodeDescNoReplyCondition := sopnodeFields[5].Descriptor()
  514. // sopnode.DefaultNoReplyCondition holds the default value on creation for the no_reply_condition field.
  515. sopnode.DefaultNoReplyCondition = sopnodeDescNoReplyCondition.Default.(uint64)
  516. sopstageMixin := schema.SopStage{}.Mixin()
  517. sopstageMixinHooks2 := sopstageMixin[2].Hooks()
  518. sopstage.Hooks[0] = sopstageMixinHooks2[0]
  519. sopstageMixinInters2 := sopstageMixin[2].Interceptors()
  520. sopstage.Interceptors[0] = sopstageMixinInters2[0]
  521. sopstageMixinFields0 := sopstageMixin[0].Fields()
  522. _ = sopstageMixinFields0
  523. sopstageMixinFields1 := sopstageMixin[1].Fields()
  524. _ = sopstageMixinFields1
  525. sopstageFields := schema.SopStage{}.Fields()
  526. _ = sopstageFields
  527. // sopstageDescCreatedAt is the schema descriptor for created_at field.
  528. sopstageDescCreatedAt := sopstageMixinFields0[1].Descriptor()
  529. // sopstage.DefaultCreatedAt holds the default value on creation for the created_at field.
  530. sopstage.DefaultCreatedAt = sopstageDescCreatedAt.Default.(func() time.Time)
  531. // sopstageDescUpdatedAt is the schema descriptor for updated_at field.
  532. sopstageDescUpdatedAt := sopstageMixinFields0[2].Descriptor()
  533. // sopstage.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  534. sopstage.DefaultUpdatedAt = sopstageDescUpdatedAt.Default.(func() time.Time)
  535. // sopstage.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  536. sopstage.UpdateDefaultUpdatedAt = sopstageDescUpdatedAt.UpdateDefault.(func() time.Time)
  537. // sopstageDescStatus is the schema descriptor for status field.
  538. sopstageDescStatus := sopstageMixinFields1[0].Descriptor()
  539. // sopstage.DefaultStatus holds the default value on creation for the status field.
  540. sopstage.DefaultStatus = sopstageDescStatus.Default.(uint8)
  541. // sopstageDescName is the schema descriptor for name field.
  542. sopstageDescName := sopstageFields[1].Descriptor()
  543. // sopstage.DefaultName holds the default value on creation for the name field.
  544. sopstage.DefaultName = sopstageDescName.Default.(string)
  545. // sopstageDescConditionType is the schema descriptor for condition_type field.
  546. sopstageDescConditionType := sopstageFields[2].Descriptor()
  547. // sopstage.DefaultConditionType holds the default value on creation for the condition_type field.
  548. sopstage.DefaultConditionType = sopstageDescConditionType.Default.(int)
  549. // sopstageDescConditionOperator is the schema descriptor for condition_operator field.
  550. sopstageDescConditionOperator := sopstageFields[3].Descriptor()
  551. // sopstage.DefaultConditionOperator holds the default value on creation for the condition_operator field.
  552. sopstage.DefaultConditionOperator = sopstageDescConditionOperator.Default.(int)
  553. // sopstageDescIndexSort is the schema descriptor for index_sort field.
  554. sopstageDescIndexSort := sopstageFields[7].Descriptor()
  555. // sopstage.DefaultIndexSort holds the default value on creation for the index_sort field.
  556. sopstage.DefaultIndexSort = sopstageDescIndexSort.Default.(int)
  557. soptaskMixin := schema.SopTask{}.Mixin()
  558. soptaskMixinHooks2 := soptaskMixin[2].Hooks()
  559. soptask.Hooks[0] = soptaskMixinHooks2[0]
  560. soptaskMixinInters2 := soptaskMixin[2].Interceptors()
  561. soptask.Interceptors[0] = soptaskMixinInters2[0]
  562. soptaskMixinFields0 := soptaskMixin[0].Fields()
  563. _ = soptaskMixinFields0
  564. soptaskMixinFields1 := soptaskMixin[1].Fields()
  565. _ = soptaskMixinFields1
  566. soptaskFields := schema.SopTask{}.Fields()
  567. _ = soptaskFields
  568. // soptaskDescCreatedAt is the schema descriptor for created_at field.
  569. soptaskDescCreatedAt := soptaskMixinFields0[1].Descriptor()
  570. // soptask.DefaultCreatedAt holds the default value on creation for the created_at field.
  571. soptask.DefaultCreatedAt = soptaskDescCreatedAt.Default.(func() time.Time)
  572. // soptaskDescUpdatedAt is the schema descriptor for updated_at field.
  573. soptaskDescUpdatedAt := soptaskMixinFields0[2].Descriptor()
  574. // soptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  575. soptask.DefaultUpdatedAt = soptaskDescUpdatedAt.Default.(func() time.Time)
  576. // soptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  577. soptask.UpdateDefaultUpdatedAt = soptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
  578. // soptaskDescStatus is the schema descriptor for status field.
  579. soptaskDescStatus := soptaskMixinFields1[0].Descriptor()
  580. // soptask.DefaultStatus holds the default value on creation for the status field.
  581. soptask.DefaultStatus = soptaskDescStatus.Default.(uint8)
  582. // soptaskDescName is the schema descriptor for name field.
  583. soptaskDescName := soptaskFields[0].Descriptor()
  584. // soptask.NameValidator is a validator for the "name" field. It is called by the builders before save.
  585. soptask.NameValidator = soptaskDescName.Validators[0].(func(string) error)
  586. // soptaskDescType is the schema descriptor for type field.
  587. soptaskDescType := soptaskFields[2].Descriptor()
  588. // soptask.DefaultType holds the default value on creation for the type field.
  589. soptask.DefaultType = soptaskDescType.Default.(int)
  590. // soptaskDescOrganizationID is the schema descriptor for organization_id field.
  591. soptaskDescOrganizationID := soptaskFields[6].Descriptor()
  592. // soptask.DefaultOrganizationID holds the default value on creation for the organization_id field.
  593. soptask.DefaultOrganizationID = soptaskDescOrganizationID.Default.(uint64)
  594. tokenMixin := schema.Token{}.Mixin()
  595. tokenMixinHooks1 := tokenMixin[1].Hooks()
  596. token.Hooks[0] = tokenMixinHooks1[0]
  597. tokenMixinInters1 := tokenMixin[1].Interceptors()
  598. token.Interceptors[0] = tokenMixinInters1[0]
  599. tokenMixinFields0 := tokenMixin[0].Fields()
  600. _ = tokenMixinFields0
  601. tokenFields := schema.Token{}.Fields()
  602. _ = tokenFields
  603. // tokenDescCreatedAt is the schema descriptor for created_at field.
  604. tokenDescCreatedAt := tokenMixinFields0[1].Descriptor()
  605. // token.DefaultCreatedAt holds the default value on creation for the created_at field.
  606. token.DefaultCreatedAt = tokenDescCreatedAt.Default.(func() time.Time)
  607. // tokenDescUpdatedAt is the schema descriptor for updated_at field.
  608. tokenDescUpdatedAt := tokenMixinFields0[2].Descriptor()
  609. // token.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  610. token.DefaultUpdatedAt = tokenDescUpdatedAt.Default.(func() time.Time)
  611. // token.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  612. token.UpdateDefaultUpdatedAt = tokenDescUpdatedAt.UpdateDefault.(func() time.Time)
  613. // tokenDescToken is the schema descriptor for token field.
  614. tokenDescToken := tokenFields[1].Descriptor()
  615. // token.DefaultToken holds the default value on creation for the token field.
  616. token.DefaultToken = tokenDescToken.Default.(string)
  617. // tokenDescMAC is the schema descriptor for mac field.
  618. tokenDescMAC := tokenFields[2].Descriptor()
  619. // token.DefaultMAC holds the default value on creation for the mac field.
  620. token.DefaultMAC = tokenDescMAC.Default.(string)
  621. tutorialMixin := schema.Tutorial{}.Mixin()
  622. tutorialMixinHooks1 := tutorialMixin[1].Hooks()
  623. tutorial.Hooks[0] = tutorialMixinHooks1[0]
  624. tutorialMixinInters1 := tutorialMixin[1].Interceptors()
  625. tutorial.Interceptors[0] = tutorialMixinInters1[0]
  626. tutorialMixinFields0 := tutorialMixin[0].Fields()
  627. _ = tutorialMixinFields0
  628. tutorialFields := schema.Tutorial{}.Fields()
  629. _ = tutorialFields
  630. // tutorialDescCreatedAt is the schema descriptor for created_at field.
  631. tutorialDescCreatedAt := tutorialMixinFields0[1].Descriptor()
  632. // tutorial.DefaultCreatedAt holds the default value on creation for the created_at field.
  633. tutorial.DefaultCreatedAt = tutorialDescCreatedAt.Default.(func() time.Time)
  634. // tutorialDescUpdatedAt is the schema descriptor for updated_at field.
  635. tutorialDescUpdatedAt := tutorialMixinFields0[2].Descriptor()
  636. // tutorial.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  637. tutorial.DefaultUpdatedAt = tutorialDescUpdatedAt.Default.(func() time.Time)
  638. // tutorial.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  639. tutorial.UpdateDefaultUpdatedAt = tutorialDescUpdatedAt.UpdateDefault.(func() time.Time)
  640. // tutorialDescEmployeeID is the schema descriptor for employee_id field.
  641. tutorialDescEmployeeID := tutorialFields[0].Descriptor()
  642. // tutorial.EmployeeIDValidator is a validator for the "employee_id" field. It is called by the builders before save.
  643. tutorial.EmployeeIDValidator = tutorialDescEmployeeID.Validators[0].(func(uint64) error)
  644. // tutorialDescOrganizationID is the schema descriptor for organization_id field.
  645. tutorialDescOrganizationID := tutorialFields[4].Descriptor()
  646. // tutorial.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  647. tutorial.OrganizationIDValidator = tutorialDescOrganizationID.Validators[0].(func(uint64) error)
  648. workexperienceMixin := schema.WorkExperience{}.Mixin()
  649. workexperienceMixinHooks1 := workexperienceMixin[1].Hooks()
  650. workexperience.Hooks[0] = workexperienceMixinHooks1[0]
  651. workexperienceMixinInters1 := workexperienceMixin[1].Interceptors()
  652. workexperience.Interceptors[0] = workexperienceMixinInters1[0]
  653. workexperienceMixinFields0 := workexperienceMixin[0].Fields()
  654. _ = workexperienceMixinFields0
  655. workexperienceFields := schema.WorkExperience{}.Fields()
  656. _ = workexperienceFields
  657. // workexperienceDescCreatedAt is the schema descriptor for created_at field.
  658. workexperienceDescCreatedAt := workexperienceMixinFields0[1].Descriptor()
  659. // workexperience.DefaultCreatedAt holds the default value on creation for the created_at field.
  660. workexperience.DefaultCreatedAt = workexperienceDescCreatedAt.Default.(func() time.Time)
  661. // workexperienceDescUpdatedAt is the schema descriptor for updated_at field.
  662. workexperienceDescUpdatedAt := workexperienceMixinFields0[2].Descriptor()
  663. // workexperience.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  664. workexperience.DefaultUpdatedAt = workexperienceDescUpdatedAt.Default.(func() time.Time)
  665. // workexperience.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  666. workexperience.UpdateDefaultUpdatedAt = workexperienceDescUpdatedAt.UpdateDefault.(func() time.Time)
  667. wxMixin := schema.Wx{}.Mixin()
  668. wxMixinHooks2 := wxMixin[2].Hooks()
  669. wx.Hooks[0] = wxMixinHooks2[0]
  670. wxMixinInters2 := wxMixin[2].Interceptors()
  671. wx.Interceptors[0] = wxMixinInters2[0]
  672. wxMixinFields0 := wxMixin[0].Fields()
  673. _ = wxMixinFields0
  674. wxMixinFields1 := wxMixin[1].Fields()
  675. _ = wxMixinFields1
  676. wxFields := schema.Wx{}.Fields()
  677. _ = wxFields
  678. // wxDescCreatedAt is the schema descriptor for created_at field.
  679. wxDescCreatedAt := wxMixinFields0[1].Descriptor()
  680. // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
  681. wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
  682. // wxDescUpdatedAt is the schema descriptor for updated_at field.
  683. wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
  684. // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  685. wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
  686. // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  687. wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
  688. // wxDescStatus is the schema descriptor for status field.
  689. wxDescStatus := wxMixinFields1[0].Descriptor()
  690. // wx.DefaultStatus holds the default value on creation for the status field.
  691. wx.DefaultStatus = wxDescStatus.Default.(uint8)
  692. // wxDescServerID is the schema descriptor for server_id field.
  693. wxDescServerID := wxFields[0].Descriptor()
  694. // wx.DefaultServerID holds the default value on creation for the server_id field.
  695. wx.DefaultServerID = wxDescServerID.Default.(uint64)
  696. // wxDescPort is the schema descriptor for port field.
  697. wxDescPort := wxFields[1].Descriptor()
  698. // wx.DefaultPort holds the default value on creation for the port field.
  699. wx.DefaultPort = wxDescPort.Default.(string)
  700. // wxDescProcessID is the schema descriptor for process_id field.
  701. wxDescProcessID := wxFields[2].Descriptor()
  702. // wx.DefaultProcessID holds the default value on creation for the process_id field.
  703. wx.DefaultProcessID = wxDescProcessID.Default.(string)
  704. // wxDescCallback is the schema descriptor for callback field.
  705. wxDescCallback := wxFields[3].Descriptor()
  706. // wx.DefaultCallback holds the default value on creation for the callback field.
  707. wx.DefaultCallback = wxDescCallback.Default.(string)
  708. // wxDescWxid is the schema descriptor for wxid field.
  709. wxDescWxid := wxFields[4].Descriptor()
  710. // wx.DefaultWxid holds the default value on creation for the wxid field.
  711. wx.DefaultWxid = wxDescWxid.Default.(string)
  712. // wxDescAccount is the schema descriptor for account field.
  713. wxDescAccount := wxFields[5].Descriptor()
  714. // wx.DefaultAccount holds the default value on creation for the account field.
  715. wx.DefaultAccount = wxDescAccount.Default.(string)
  716. // wxDescNickname is the schema descriptor for nickname field.
  717. wxDescNickname := wxFields[6].Descriptor()
  718. // wx.DefaultNickname holds the default value on creation for the nickname field.
  719. wx.DefaultNickname = wxDescNickname.Default.(string)
  720. // wxDescTel is the schema descriptor for tel field.
  721. wxDescTel := wxFields[7].Descriptor()
  722. // wx.DefaultTel holds the default value on creation for the tel field.
  723. wx.DefaultTel = wxDescTel.Default.(string)
  724. // wxDescHeadBig is the schema descriptor for head_big field.
  725. wxDescHeadBig := wxFields[8].Descriptor()
  726. // wx.DefaultHeadBig holds the default value on creation for the head_big field.
  727. wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
  728. // wxDescOrganizationID is the schema descriptor for organization_id field.
  729. wxDescOrganizationID := wxFields[9].Descriptor()
  730. // wx.DefaultOrganizationID holds the default value on creation for the organization_id field.
  731. wx.DefaultOrganizationID = wxDescOrganizationID.Default.(uint64)
  732. // wxDescAgentID is the schema descriptor for agent_id field.
  733. wxDescAgentID := wxFields[10].Descriptor()
  734. // wx.DefaultAgentID holds the default value on creation for the agent_id field.
  735. wx.DefaultAgentID = wxDescAgentID.Default.(uint64)
  736. }
  737. const (
  738. Version = "v0.13.1" // Version of ent codegen.
  739. Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
  740. )