runtime.go 51 KB

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