runtime.go 53 KB

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