runtime.go 53 KB

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