runtime.go 55 KB

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