runtime.go 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115
  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/chatrecords"
  10. "wechat-api/ent/chatsession"
  11. "wechat-api/ent/contact"
  12. "wechat-api/ent/employee"
  13. "wechat-api/ent/employeeconfig"
  14. "wechat-api/ent/label"
  15. "wechat-api/ent/labelrelationship"
  16. "wechat-api/ent/message"
  17. "wechat-api/ent/messagerecords"
  18. "wechat-api/ent/msg"
  19. "wechat-api/ent/schema"
  20. "wechat-api/ent/server"
  21. "wechat-api/ent/sopnode"
  22. "wechat-api/ent/sopstage"
  23. "wechat-api/ent/soptask"
  24. "wechat-api/ent/token"
  25. "wechat-api/ent/tutorial"
  26. "wechat-api/ent/workexperience"
  27. "wechat-api/ent/wx"
  28. "wechat-api/ent/wxcard"
  29. "wechat-api/ent/wxcarduser"
  30. "wechat-api/ent/wxcardvisit"
  31. )
  32. // The init function reads all schema descriptors with runtime code
  33. // (default values, validators, hooks and policies) and stitches it
  34. // to their package variables.
  35. func init() {
  36. agentMixin := schema.Agent{}.Mixin()
  37. agentMixinHooks1 := agentMixin[1].Hooks()
  38. agent.Hooks[0] = agentMixinHooks1[0]
  39. agentMixinInters1 := agentMixin[1].Interceptors()
  40. agent.Interceptors[0] = agentMixinInters1[0]
  41. agentMixinFields0 := agentMixin[0].Fields()
  42. _ = agentMixinFields0
  43. agentFields := schema.Agent{}.Fields()
  44. _ = agentFields
  45. // agentDescCreatedAt is the schema descriptor for created_at field.
  46. agentDescCreatedAt := agentMixinFields0[1].Descriptor()
  47. // agent.DefaultCreatedAt holds the default value on creation for the created_at field.
  48. agent.DefaultCreatedAt = agentDescCreatedAt.Default.(func() time.Time)
  49. // agentDescUpdatedAt is the schema descriptor for updated_at field.
  50. agentDescUpdatedAt := agentMixinFields0[2].Descriptor()
  51. // agent.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  52. agent.DefaultUpdatedAt = agentDescUpdatedAt.Default.(func() time.Time)
  53. // agent.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  54. agent.UpdateDefaultUpdatedAt = agentDescUpdatedAt.UpdateDefault.(func() time.Time)
  55. // agentDescName is the schema descriptor for name field.
  56. agentDescName := agentFields[0].Descriptor()
  57. // agent.NameValidator is a validator for the "name" field. It is called by the builders before save.
  58. agent.NameValidator = agentDescName.Validators[0].(func(string) error)
  59. // agentDescRole is the schema descriptor for role field.
  60. agentDescRole := agentFields[1].Descriptor()
  61. // agent.RoleValidator is a validator for the "role" field. It is called by the builders before save.
  62. agent.RoleValidator = agentDescRole.Validators[0].(func(string) error)
  63. // agentDescStatus is the schema descriptor for status field.
  64. agentDescStatus := agentFields[2].Descriptor()
  65. // agent.DefaultStatus holds the default value on creation for the status field.
  66. agent.DefaultStatus = agentDescStatus.Default.(int)
  67. // agent.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  68. agent.StatusValidator = agentDescStatus.Validators[0].(func(int) error)
  69. // agentDescBackground is the schema descriptor for background field.
  70. agentDescBackground := agentFields[3].Descriptor()
  71. // agent.DefaultBackground holds the default value on creation for the background field.
  72. agent.DefaultBackground = agentDescBackground.Default.(string)
  73. // agent.BackgroundValidator is a validator for the "background" field. It is called by the builders before save.
  74. agent.BackgroundValidator = agentDescBackground.Validators[0].(func(string) error)
  75. // agentDescExamples is the schema descriptor for examples field.
  76. agentDescExamples := agentFields[4].Descriptor()
  77. // agent.DefaultExamples holds the default value on creation for the examples field.
  78. agent.DefaultExamples = agentDescExamples.Default.(string)
  79. // agent.ExamplesValidator is a validator for the "examples" field. It is called by the builders before save.
  80. agent.ExamplesValidator = agentDescExamples.Validators[0].(func(string) error)
  81. // agentDescOrganizationID is the schema descriptor for organization_id field.
  82. agentDescOrganizationID := agentFields[5].Descriptor()
  83. // agent.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  84. agent.OrganizationIDValidator = agentDescOrganizationID.Validators[0].(func(uint64) error)
  85. // agentDescDatasetID is the schema descriptor for dataset_id field.
  86. agentDescDatasetID := agentFields[6].Descriptor()
  87. // agent.DefaultDatasetID holds the default value on creation for the dataset_id field.
  88. agent.DefaultDatasetID = agentDescDatasetID.Default.(string)
  89. // agent.DatasetIDValidator is a validator for the "dataset_id" field. It is called by the builders before save.
  90. agent.DatasetIDValidator = agentDescDatasetID.Validators[0].(func(string) error)
  91. // agentDescCollectionID is the schema descriptor for collection_id field.
  92. agentDescCollectionID := agentFields[7].Descriptor()
  93. // agent.DefaultCollectionID holds the default value on creation for the collection_id field.
  94. agent.DefaultCollectionID = agentDescCollectionID.Default.(string)
  95. // agent.CollectionIDValidator is a validator for the "collection_id" field. It is called by the builders before save.
  96. agent.CollectionIDValidator = agentDescCollectionID.Validators[0].(func(string) error)
  97. agentbaseFields := schema.AgentBase{}.Fields()
  98. _ = agentbaseFields
  99. // agentbaseDescQ is the schema descriptor for q field.
  100. agentbaseDescQ := agentbaseFields[1].Descriptor()
  101. // agentbase.DefaultQ holds the default value on creation for the q field.
  102. agentbase.DefaultQ = agentbaseDescQ.Default.(string)
  103. // agentbaseDescA is the schema descriptor for a field.
  104. agentbaseDescA := agentbaseFields[2].Descriptor()
  105. // agentbase.DefaultA holds the default value on creation for the a field.
  106. agentbase.DefaultA = agentbaseDescA.Default.(string)
  107. // agentbaseDescChunkIndex is the schema descriptor for chunk_index field.
  108. agentbaseDescChunkIndex := agentbaseFields[3].Descriptor()
  109. // agentbase.ChunkIndexValidator is a validator for the "chunk_index" field. It is called by the builders before save.
  110. agentbase.ChunkIndexValidator = agentbaseDescChunkIndex.Validators[0].(func(uint64) error)
  111. // agentbaseDescDatasetID is the schema descriptor for dataset_id field.
  112. agentbaseDescDatasetID := agentbaseFields[5].Descriptor()
  113. // agentbase.DefaultDatasetID holds the default value on creation for the dataset_id field.
  114. agentbase.DefaultDatasetID = agentbaseDescDatasetID.Default.(string)
  115. // agentbaseDescCollectionID is the schema descriptor for collection_id field.
  116. agentbaseDescCollectionID := agentbaseFields[6].Descriptor()
  117. // agentbase.DefaultCollectionID holds the default value on creation for the collection_id field.
  118. agentbase.DefaultCollectionID = agentbaseDescCollectionID.Default.(string)
  119. // agentbaseDescSourceName is the schema descriptor for source_name field.
  120. agentbaseDescSourceName := agentbaseFields[7].Descriptor()
  121. // agentbase.DefaultSourceName holds the default value on creation for the source_name field.
  122. agentbase.DefaultSourceName = agentbaseDescSourceName.Default.(string)
  123. batchmsgMixin := schema.BatchMsg{}.Mixin()
  124. batchmsgMixinHooks1 := batchmsgMixin[1].Hooks()
  125. batchmsg.Hooks[0] = batchmsgMixinHooks1[0]
  126. batchmsgMixinInters1 := batchmsgMixin[1].Interceptors()
  127. batchmsg.Interceptors[0] = batchmsgMixinInters1[0]
  128. batchmsgMixinFields0 := batchmsgMixin[0].Fields()
  129. _ = batchmsgMixinFields0
  130. batchmsgFields := schema.BatchMsg{}.Fields()
  131. _ = batchmsgFields
  132. // batchmsgDescCreatedAt is the schema descriptor for created_at field.
  133. batchmsgDescCreatedAt := batchmsgMixinFields0[1].Descriptor()
  134. // batchmsg.DefaultCreatedAt holds the default value on creation for the created_at field.
  135. batchmsg.DefaultCreatedAt = batchmsgDescCreatedAt.Default.(func() time.Time)
  136. // batchmsgDescUpdatedAt is the schema descriptor for updated_at field.
  137. batchmsgDescUpdatedAt := batchmsgMixinFields0[2].Descriptor()
  138. // batchmsg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  139. batchmsg.DefaultUpdatedAt = batchmsgDescUpdatedAt.Default.(func() time.Time)
  140. // batchmsg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  141. batchmsg.UpdateDefaultUpdatedAt = batchmsgDescUpdatedAt.UpdateDefault.(func() time.Time)
  142. // batchmsgDescTaskName is the schema descriptor for task_name field.
  143. batchmsgDescTaskName := batchmsgFields[2].Descriptor()
  144. // batchmsg.DefaultTaskName holds the default value on creation for the task_name field.
  145. batchmsg.DefaultTaskName = batchmsgDescTaskName.Default.(string)
  146. // batchmsgDescOrganizationID is the schema descriptor for organization_id field.
  147. batchmsgDescOrganizationID := batchmsgFields[14].Descriptor()
  148. // batchmsg.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  149. batchmsg.OrganizationIDValidator = batchmsgDescOrganizationID.Validators[0].(func(uint64) error)
  150. categoryMixin := schema.Category{}.Mixin()
  151. categoryMixinHooks1 := categoryMixin[1].Hooks()
  152. category.Hooks[0] = categoryMixinHooks1[0]
  153. categoryMixinInters1 := categoryMixin[1].Interceptors()
  154. category.Interceptors[0] = categoryMixinInters1[0]
  155. categoryMixinFields0 := categoryMixin[0].Fields()
  156. _ = categoryMixinFields0
  157. categoryFields := schema.Category{}.Fields()
  158. _ = categoryFields
  159. // categoryDescCreatedAt is the schema descriptor for created_at field.
  160. categoryDescCreatedAt := categoryMixinFields0[1].Descriptor()
  161. // category.DefaultCreatedAt holds the default value on creation for the created_at field.
  162. category.DefaultCreatedAt = categoryDescCreatedAt.Default.(func() time.Time)
  163. // categoryDescUpdatedAt is the schema descriptor for updated_at field.
  164. categoryDescUpdatedAt := categoryMixinFields0[2].Descriptor()
  165. // category.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  166. category.DefaultUpdatedAt = categoryDescUpdatedAt.Default.(func() time.Time)
  167. // category.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  168. category.UpdateDefaultUpdatedAt = categoryDescUpdatedAt.UpdateDefault.(func() time.Time)
  169. // categoryDescName is the schema descriptor for name field.
  170. categoryDescName := categoryFields[0].Descriptor()
  171. // category.NameValidator is a validator for the "name" field. It is called by the builders before save.
  172. category.NameValidator = categoryDescName.Validators[0].(func(string) error)
  173. // categoryDescOrganizationID is the schema descriptor for organization_id field.
  174. categoryDescOrganizationID := categoryFields[1].Descriptor()
  175. // category.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  176. category.OrganizationIDValidator = categoryDescOrganizationID.Validators[0].(func(uint64) error)
  177. chatrecordsMixin := schema.ChatRecords{}.Mixin()
  178. chatrecordsMixinHooks1 := chatrecordsMixin[1].Hooks()
  179. chatrecords.Hooks[0] = chatrecordsMixinHooks1[0]
  180. chatrecordsMixinInters1 := chatrecordsMixin[1].Interceptors()
  181. chatrecords.Interceptors[0] = chatrecordsMixinInters1[0]
  182. chatrecordsMixinFields0 := chatrecordsMixin[0].Fields()
  183. _ = chatrecordsMixinFields0
  184. chatrecordsFields := schema.ChatRecords{}.Fields()
  185. _ = chatrecordsFields
  186. // chatrecordsDescCreatedAt is the schema descriptor for created_at field.
  187. chatrecordsDescCreatedAt := chatrecordsMixinFields0[1].Descriptor()
  188. // chatrecords.DefaultCreatedAt holds the default value on creation for the created_at field.
  189. chatrecords.DefaultCreatedAt = chatrecordsDescCreatedAt.Default.(func() time.Time)
  190. // chatrecordsDescUpdatedAt is the schema descriptor for updated_at field.
  191. chatrecordsDescUpdatedAt := chatrecordsMixinFields0[2].Descriptor()
  192. // chatrecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  193. chatrecords.DefaultUpdatedAt = chatrecordsDescUpdatedAt.Default.(func() time.Time)
  194. // chatrecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  195. chatrecords.UpdateDefaultUpdatedAt = chatrecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
  196. // chatrecordsDescContent is the schema descriptor for content field.
  197. chatrecordsDescContent := chatrecordsFields[0].Descriptor()
  198. // chatrecords.DefaultContent holds the default value on creation for the content field.
  199. chatrecords.DefaultContent = chatrecordsDescContent.Default.(string)
  200. // chatrecordsDescContentType is the schema descriptor for content_type field.
  201. chatrecordsDescContentType := chatrecordsFields[1].Descriptor()
  202. // chatrecords.DefaultContentType holds the default value on creation for the content_type field.
  203. chatrecords.DefaultContentType = chatrecordsDescContentType.Default.(uint8)
  204. // chatrecordsDescSessionID is the schema descriptor for session_id field.
  205. chatrecordsDescSessionID := chatrecordsFields[2].Descriptor()
  206. // chatrecords.DefaultSessionID holds the default value on creation for the session_id field.
  207. chatrecords.DefaultSessionID = chatrecordsDescSessionID.Default.(uint64)
  208. // chatrecordsDescUserID is the schema descriptor for user_id field.
  209. chatrecordsDescUserID := chatrecordsFields[3].Descriptor()
  210. // chatrecords.DefaultUserID holds the default value on creation for the user_id field.
  211. chatrecords.DefaultUserID = chatrecordsDescUserID.Default.(uint64)
  212. // chatrecordsDescBotID is the schema descriptor for bot_id field.
  213. chatrecordsDescBotID := chatrecordsFields[4].Descriptor()
  214. // chatrecords.DefaultBotID holds the default value on creation for the bot_id field.
  215. chatrecords.DefaultBotID = chatrecordsDescBotID.Default.(uint64)
  216. // chatrecordsDescBotType is the schema descriptor for bot_type field.
  217. chatrecordsDescBotType := chatrecordsFields[5].Descriptor()
  218. // chatrecords.DefaultBotType holds the default value on creation for the bot_type field.
  219. chatrecords.DefaultBotType = chatrecordsDescBotType.Default.(uint8)
  220. chatsessionMixin := schema.ChatSession{}.Mixin()
  221. chatsessionMixinHooks1 := chatsessionMixin[1].Hooks()
  222. chatsession.Hooks[0] = chatsessionMixinHooks1[0]
  223. chatsessionMixinInters1 := chatsessionMixin[1].Interceptors()
  224. chatsession.Interceptors[0] = chatsessionMixinInters1[0]
  225. chatsessionMixinFields0 := chatsessionMixin[0].Fields()
  226. _ = chatsessionMixinFields0
  227. chatsessionFields := schema.ChatSession{}.Fields()
  228. _ = chatsessionFields
  229. // chatsessionDescCreatedAt is the schema descriptor for created_at field.
  230. chatsessionDescCreatedAt := chatsessionMixinFields0[1].Descriptor()
  231. // chatsession.DefaultCreatedAt holds the default value on creation for the created_at field.
  232. chatsession.DefaultCreatedAt = chatsessionDescCreatedAt.Default.(func() time.Time)
  233. // chatsessionDescUpdatedAt is the schema descriptor for updated_at field.
  234. chatsessionDescUpdatedAt := chatsessionMixinFields0[2].Descriptor()
  235. // chatsession.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  236. chatsession.DefaultUpdatedAt = chatsessionDescUpdatedAt.Default.(func() time.Time)
  237. // chatsession.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  238. chatsession.UpdateDefaultUpdatedAt = chatsessionDescUpdatedAt.UpdateDefault.(func() time.Time)
  239. // chatsessionDescName is the schema descriptor for name field.
  240. chatsessionDescName := chatsessionFields[0].Descriptor()
  241. // chatsession.DefaultName holds the default value on creation for the name field.
  242. chatsession.DefaultName = chatsessionDescName.Default.(string)
  243. // chatsessionDescUserID is the schema descriptor for user_id field.
  244. chatsessionDescUserID := chatsessionFields[1].Descriptor()
  245. // chatsession.DefaultUserID holds the default value on creation for the user_id field.
  246. chatsession.DefaultUserID = chatsessionDescUserID.Default.(uint64)
  247. // chatsessionDescBotID is the schema descriptor for bot_id field.
  248. chatsessionDescBotID := chatsessionFields[2].Descriptor()
  249. // chatsession.DefaultBotID holds the default value on creation for the bot_id field.
  250. chatsession.DefaultBotID = chatsessionDescBotID.Default.(uint64)
  251. // chatsessionDescBotType is the schema descriptor for bot_type field.
  252. chatsessionDescBotType := chatsessionFields[3].Descriptor()
  253. // chatsession.DefaultBotType holds the default value on creation for the bot_type field.
  254. chatsession.DefaultBotType = chatsessionDescBotType.Default.(uint8)
  255. contactMixin := schema.Contact{}.Mixin()
  256. contactMixinHooks2 := contactMixin[2].Hooks()
  257. contact.Hooks[0] = contactMixinHooks2[0]
  258. contactMixinInters2 := contactMixin[2].Interceptors()
  259. contact.Interceptors[0] = contactMixinInters2[0]
  260. contactMixinFields0 := contactMixin[0].Fields()
  261. _ = contactMixinFields0
  262. contactMixinFields1 := contactMixin[1].Fields()
  263. _ = contactMixinFields1
  264. contactFields := schema.Contact{}.Fields()
  265. _ = contactFields
  266. // contactDescCreatedAt is the schema descriptor for created_at field.
  267. contactDescCreatedAt := contactMixinFields0[1].Descriptor()
  268. // contact.DefaultCreatedAt holds the default value on creation for the created_at field.
  269. contact.DefaultCreatedAt = contactDescCreatedAt.Default.(func() time.Time)
  270. // contactDescUpdatedAt is the schema descriptor for updated_at field.
  271. contactDescUpdatedAt := contactMixinFields0[2].Descriptor()
  272. // contact.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  273. contact.DefaultUpdatedAt = contactDescUpdatedAt.Default.(func() time.Time)
  274. // contact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  275. contact.UpdateDefaultUpdatedAt = contactDescUpdatedAt.UpdateDefault.(func() time.Time)
  276. // contactDescStatus is the schema descriptor for status field.
  277. contactDescStatus := contactMixinFields1[0].Descriptor()
  278. // contact.DefaultStatus holds the default value on creation for the status field.
  279. contact.DefaultStatus = contactDescStatus.Default.(uint8)
  280. // contactDescWxWxid is the schema descriptor for wx_wxid field.
  281. contactDescWxWxid := contactFields[0].Descriptor()
  282. // contact.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  283. contact.DefaultWxWxid = contactDescWxWxid.Default.(string)
  284. // contactDescType is the schema descriptor for type field.
  285. contactDescType := contactFields[1].Descriptor()
  286. // contact.DefaultType holds the default value on creation for the type field.
  287. contact.DefaultType = contactDescType.Default.(int)
  288. // contactDescWxid is the schema descriptor for wxid field.
  289. contactDescWxid := contactFields[2].Descriptor()
  290. // contact.DefaultWxid holds the default value on creation for the wxid field.
  291. contact.DefaultWxid = contactDescWxid.Default.(string)
  292. // contactDescAccount is the schema descriptor for account field.
  293. contactDescAccount := contactFields[3].Descriptor()
  294. // contact.DefaultAccount holds the default value on creation for the account field.
  295. contact.DefaultAccount = contactDescAccount.Default.(string)
  296. // contactDescNickname is the schema descriptor for nickname field.
  297. contactDescNickname := contactFields[4].Descriptor()
  298. // contact.DefaultNickname holds the default value on creation for the nickname field.
  299. contact.DefaultNickname = contactDescNickname.Default.(string)
  300. // contactDescMarkname is the schema descriptor for markname field.
  301. contactDescMarkname := contactFields[5].Descriptor()
  302. // contact.DefaultMarkname holds the default value on creation for the markname field.
  303. contact.DefaultMarkname = contactDescMarkname.Default.(string)
  304. // contactDescHeadimg is the schema descriptor for headimg field.
  305. contactDescHeadimg := contactFields[6].Descriptor()
  306. // contact.DefaultHeadimg holds the default value on creation for the headimg field.
  307. contact.DefaultHeadimg = contactDescHeadimg.Default.(string)
  308. // contactDescSex is the schema descriptor for sex field.
  309. contactDescSex := contactFields[7].Descriptor()
  310. // contact.DefaultSex holds the default value on creation for the sex field.
  311. contact.DefaultSex = contactDescSex.Default.(int)
  312. // contactDescStarrole is the schema descriptor for starrole field.
  313. contactDescStarrole := contactFields[8].Descriptor()
  314. // contact.DefaultStarrole holds the default value on creation for the starrole field.
  315. contact.DefaultStarrole = contactDescStarrole.Default.(string)
  316. // contactDescDontseeit is the schema descriptor for dontseeit field.
  317. contactDescDontseeit := contactFields[9].Descriptor()
  318. // contact.DefaultDontseeit holds the default value on creation for the dontseeit field.
  319. contact.DefaultDontseeit = contactDescDontseeit.Default.(int)
  320. // contactDescDontseeme is the schema descriptor for dontseeme field.
  321. contactDescDontseeme := contactFields[10].Descriptor()
  322. // contact.DefaultDontseeme holds the default value on creation for the dontseeme field.
  323. contact.DefaultDontseeme = contactDescDontseeme.Default.(int)
  324. // contactDescLag is the schema descriptor for lag field.
  325. contactDescLag := contactFields[11].Descriptor()
  326. // contact.DefaultLag holds the default value on creation for the lag field.
  327. contact.DefaultLag = contactDescLag.Default.(string)
  328. // contactDescGid is the schema descriptor for gid field.
  329. contactDescGid := contactFields[12].Descriptor()
  330. // contact.DefaultGid holds the default value on creation for the gid field.
  331. contact.DefaultGid = contactDescGid.Default.(string)
  332. // contactDescGname is the schema descriptor for gname field.
  333. contactDescGname := contactFields[13].Descriptor()
  334. // contact.DefaultGname holds the default value on creation for the gname field.
  335. contact.DefaultGname = contactDescGname.Default.(string)
  336. // contactDescV3 is the schema descriptor for v3 field.
  337. contactDescV3 := contactFields[14].Descriptor()
  338. // contact.DefaultV3 holds the default value on creation for the v3 field.
  339. contact.DefaultV3 = contactDescV3.Default.(string)
  340. // contactDescOrganizationID is the schema descriptor for organization_id field.
  341. contactDescOrganizationID := contactFields[15].Descriptor()
  342. // contact.DefaultOrganizationID holds the default value on creation for the organization_id field.
  343. contact.DefaultOrganizationID = contactDescOrganizationID.Default.(uint64)
  344. employeeMixin := schema.Employee{}.Mixin()
  345. employeeMixinHooks1 := employeeMixin[1].Hooks()
  346. employee.Hooks[0] = employeeMixinHooks1[0]
  347. employeeMixinInters1 := employeeMixin[1].Interceptors()
  348. employee.Interceptors[0] = employeeMixinInters1[0]
  349. employeeMixinFields0 := employeeMixin[0].Fields()
  350. _ = employeeMixinFields0
  351. employeeFields := schema.Employee{}.Fields()
  352. _ = employeeFields
  353. // employeeDescCreatedAt is the schema descriptor for created_at field.
  354. employeeDescCreatedAt := employeeMixinFields0[1].Descriptor()
  355. // employee.DefaultCreatedAt holds the default value on creation for the created_at field.
  356. employee.DefaultCreatedAt = employeeDescCreatedAt.Default.(func() time.Time)
  357. // employeeDescUpdatedAt is the schema descriptor for updated_at field.
  358. employeeDescUpdatedAt := employeeMixinFields0[2].Descriptor()
  359. // employee.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  360. employee.DefaultUpdatedAt = employeeDescUpdatedAt.Default.(func() time.Time)
  361. // employee.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  362. employee.UpdateDefaultUpdatedAt = employeeDescUpdatedAt.UpdateDefault.(func() time.Time)
  363. // employeeDescTitle is the schema descriptor for title field.
  364. employeeDescTitle := employeeFields[0].Descriptor()
  365. // employee.TitleValidator is a validator for the "title" field. It is called by the builders before save.
  366. employee.TitleValidator = employeeDescTitle.Validators[0].(func(string) error)
  367. // employeeDescAvatar is the schema descriptor for avatar field.
  368. employeeDescAvatar := employeeFields[1].Descriptor()
  369. // employee.AvatarValidator is a validator for the "avatar" field. It is called by the builders before save.
  370. employee.AvatarValidator = employeeDescAvatar.Validators[0].(func(string) error)
  371. // employeeDescTags is the schema descriptor for tags field.
  372. employeeDescTags := employeeFields[2].Descriptor()
  373. // employee.TagsValidator is a validator for the "tags" field. It is called by the builders before save.
  374. employee.TagsValidator = employeeDescTags.Validators[0].(func(string) error)
  375. // employeeDescHireCount is the schema descriptor for hire_count field.
  376. employeeDescHireCount := employeeFields[3].Descriptor()
  377. // employee.DefaultHireCount holds the default value on creation for the hire_count field.
  378. employee.DefaultHireCount = employeeDescHireCount.Default.(int)
  379. // employee.HireCountValidator is a validator for the "hire_count" field. It is called by the builders before save.
  380. employee.HireCountValidator = employeeDescHireCount.Validators[0].(func(int) error)
  381. // employeeDescServiceCount is the schema descriptor for service_count field.
  382. employeeDescServiceCount := employeeFields[4].Descriptor()
  383. // employee.DefaultServiceCount holds the default value on creation for the service_count field.
  384. employee.DefaultServiceCount = employeeDescServiceCount.Default.(int)
  385. // employee.ServiceCountValidator is a validator for the "service_count" field. It is called by the builders before save.
  386. employee.ServiceCountValidator = employeeDescServiceCount.Validators[0].(func(int) error)
  387. // employeeDescAchievementCount is the schema descriptor for achievement_count field.
  388. employeeDescAchievementCount := employeeFields[5].Descriptor()
  389. // employee.DefaultAchievementCount holds the default value on creation for the achievement_count field.
  390. employee.DefaultAchievementCount = employeeDescAchievementCount.Default.(int)
  391. // employee.AchievementCountValidator is a validator for the "achievement_count" field. It is called by the builders before save.
  392. employee.AchievementCountValidator = employeeDescAchievementCount.Validators[0].(func(int) error)
  393. // employeeDescIntro is the schema descriptor for intro field.
  394. employeeDescIntro := employeeFields[6].Descriptor()
  395. // employee.DefaultIntro holds the default value on creation for the intro field.
  396. employee.DefaultIntro = employeeDescIntro.Default.(string)
  397. // employee.IntroValidator is a validator for the "intro" field. It is called by the builders before save.
  398. employee.IntroValidator = employeeDescIntro.Validators[0].(func(string) error)
  399. // employeeDescEstimate is the schema descriptor for estimate field.
  400. employeeDescEstimate := employeeFields[7].Descriptor()
  401. // employee.DefaultEstimate holds the default value on creation for the estimate field.
  402. employee.DefaultEstimate = employeeDescEstimate.Default.(string)
  403. // employee.EstimateValidator is a validator for the "estimate" field. It is called by the builders before save.
  404. employee.EstimateValidator = employeeDescEstimate.Validators[0].(func(string) error)
  405. // employeeDescSkill is the schema descriptor for skill field.
  406. employeeDescSkill := employeeFields[8].Descriptor()
  407. // employee.DefaultSkill holds the default value on creation for the skill field.
  408. employee.DefaultSkill = employeeDescSkill.Default.(string)
  409. // employee.SkillValidator is a validator for the "skill" field. It is called by the builders before save.
  410. employee.SkillValidator = employeeDescSkill.Validators[0].(func(string) error)
  411. // employeeDescAbilityType is the schema descriptor for ability_type field.
  412. employeeDescAbilityType := employeeFields[9].Descriptor()
  413. // employee.DefaultAbilityType holds the default value on creation for the ability_type field.
  414. employee.DefaultAbilityType = employeeDescAbilityType.Default.(string)
  415. // employeeDescScene is the schema descriptor for scene field.
  416. employeeDescScene := employeeFields[10].Descriptor()
  417. // employee.DefaultScene holds the default value on creation for the scene field.
  418. employee.DefaultScene = employeeDescScene.Default.(string)
  419. // employeeDescSwitchIn is the schema descriptor for switch_in field.
  420. employeeDescSwitchIn := employeeFields[11].Descriptor()
  421. // employee.DefaultSwitchIn holds the default value on creation for the switch_in field.
  422. employee.DefaultSwitchIn = employeeDescSwitchIn.Default.(string)
  423. // employeeDescVideoURL is the schema descriptor for video_url field.
  424. employeeDescVideoURL := employeeFields[12].Descriptor()
  425. // employee.DefaultVideoURL holds the default value on creation for the video_url field.
  426. employee.DefaultVideoURL = employeeDescVideoURL.Default.(string)
  427. // employee.VideoURLValidator is a validator for the "video_url" field. It is called by the builders before save.
  428. employee.VideoURLValidator = employeeDescVideoURL.Validators[0].(func(string) error)
  429. // employeeDescOrganizationID is the schema descriptor for organization_id field.
  430. employeeDescOrganizationID := employeeFields[13].Descriptor()
  431. // employee.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  432. employee.OrganizationIDValidator = employeeDescOrganizationID.Validators[0].(func(uint64) error)
  433. // employeeDescCategoryID is the schema descriptor for category_id field.
  434. employeeDescCategoryID := employeeFields[14].Descriptor()
  435. // employee.CategoryIDValidator is a validator for the "category_id" field. It is called by the builders before save.
  436. employee.CategoryIDValidator = employeeDescCategoryID.Validators[0].(func(uint64) error)
  437. // employeeDescAPIBase is the schema descriptor for api_base field.
  438. employeeDescAPIBase := employeeFields[15].Descriptor()
  439. // employee.DefaultAPIBase holds the default value on creation for the api_base field.
  440. employee.DefaultAPIBase = employeeDescAPIBase.Default.(string)
  441. // employeeDescAPIKey is the schema descriptor for api_key field.
  442. employeeDescAPIKey := employeeFields[16].Descriptor()
  443. // employee.DefaultAPIKey holds the default value on creation for the api_key field.
  444. employee.DefaultAPIKey = employeeDescAPIKey.Default.(string)
  445. // employeeDescIsVip is the schema descriptor for is_vip field.
  446. employeeDescIsVip := employeeFields[18].Descriptor()
  447. // employee.DefaultIsVip holds the default value on creation for the is_vip field.
  448. employee.DefaultIsVip = employeeDescIsVip.Default.(int)
  449. employeeconfigMixin := schema.EmployeeConfig{}.Mixin()
  450. employeeconfigMixinHooks1 := employeeconfigMixin[1].Hooks()
  451. employeeconfig.Hooks[0] = employeeconfigMixinHooks1[0]
  452. employeeconfigMixinInters1 := employeeconfigMixin[1].Interceptors()
  453. employeeconfig.Interceptors[0] = employeeconfigMixinInters1[0]
  454. employeeconfigMixinFields0 := employeeconfigMixin[0].Fields()
  455. _ = employeeconfigMixinFields0
  456. employeeconfigFields := schema.EmployeeConfig{}.Fields()
  457. _ = employeeconfigFields
  458. // employeeconfigDescCreatedAt is the schema descriptor for created_at field.
  459. employeeconfigDescCreatedAt := employeeconfigMixinFields0[1].Descriptor()
  460. // employeeconfig.DefaultCreatedAt holds the default value on creation for the created_at field.
  461. employeeconfig.DefaultCreatedAt = employeeconfigDescCreatedAt.Default.(func() time.Time)
  462. // employeeconfigDescUpdatedAt is the schema descriptor for updated_at field.
  463. employeeconfigDescUpdatedAt := employeeconfigMixinFields0[2].Descriptor()
  464. // employeeconfig.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  465. employeeconfig.DefaultUpdatedAt = employeeconfigDescUpdatedAt.Default.(func() time.Time)
  466. // employeeconfig.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  467. employeeconfig.UpdateDefaultUpdatedAt = employeeconfigDescUpdatedAt.UpdateDefault.(func() time.Time)
  468. // employeeconfigDescStype is the schema descriptor for stype field.
  469. employeeconfigDescStype := employeeconfigFields[0].Descriptor()
  470. // employeeconfig.DefaultStype holds the default value on creation for the stype field.
  471. employeeconfig.DefaultStype = employeeconfigDescStype.Default.(string)
  472. // employeeconfigDescTitle is the schema descriptor for title field.
  473. employeeconfigDescTitle := employeeconfigFields[1].Descriptor()
  474. // employeeconfig.DefaultTitle holds the default value on creation for the title field.
  475. employeeconfig.DefaultTitle = employeeconfigDescTitle.Default.(string)
  476. // employeeconfigDescPhoto is the schema descriptor for photo field.
  477. employeeconfigDescPhoto := employeeconfigFields[2].Descriptor()
  478. // employeeconfig.DefaultPhoto holds the default value on creation for the photo field.
  479. employeeconfig.DefaultPhoto = employeeconfigDescPhoto.Default.(string)
  480. // employeeconfigDescOrganizationID is the schema descriptor for organization_id field.
  481. employeeconfigDescOrganizationID := employeeconfigFields[3].Descriptor()
  482. // employeeconfig.DefaultOrganizationID holds the default value on creation for the organization_id field.
  483. employeeconfig.DefaultOrganizationID = employeeconfigDescOrganizationID.Default.(uint64)
  484. labelMixin := schema.Label{}.Mixin()
  485. labelMixinFields0 := labelMixin[0].Fields()
  486. _ = labelMixinFields0
  487. labelMixinFields1 := labelMixin[1].Fields()
  488. _ = labelMixinFields1
  489. labelFields := schema.Label{}.Fields()
  490. _ = labelFields
  491. // labelDescCreatedAt is the schema descriptor for created_at field.
  492. labelDescCreatedAt := labelMixinFields0[1].Descriptor()
  493. // label.DefaultCreatedAt holds the default value on creation for the created_at field.
  494. label.DefaultCreatedAt = labelDescCreatedAt.Default.(func() time.Time)
  495. // labelDescUpdatedAt is the schema descriptor for updated_at field.
  496. labelDescUpdatedAt := labelMixinFields0[2].Descriptor()
  497. // label.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  498. label.DefaultUpdatedAt = labelDescUpdatedAt.Default.(func() time.Time)
  499. // label.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  500. label.UpdateDefaultUpdatedAt = labelDescUpdatedAt.UpdateDefault.(func() time.Time)
  501. // labelDescStatus is the schema descriptor for status field.
  502. labelDescStatus := labelMixinFields1[0].Descriptor()
  503. // label.DefaultStatus holds the default value on creation for the status field.
  504. label.DefaultStatus = labelDescStatus.Default.(uint8)
  505. // labelDescType is the schema descriptor for type field.
  506. labelDescType := labelFields[0].Descriptor()
  507. // label.DefaultType holds the default value on creation for the type field.
  508. label.DefaultType = labelDescType.Default.(int)
  509. // labelDescName is the schema descriptor for name field.
  510. labelDescName := labelFields[1].Descriptor()
  511. // label.DefaultName holds the default value on creation for the name field.
  512. label.DefaultName = labelDescName.Default.(string)
  513. // labelDescFrom is the schema descriptor for from field.
  514. labelDescFrom := labelFields[2].Descriptor()
  515. // label.DefaultFrom holds the default value on creation for the from field.
  516. label.DefaultFrom = labelDescFrom.Default.(int)
  517. // labelDescMode is the schema descriptor for mode field.
  518. labelDescMode := labelFields[3].Descriptor()
  519. // label.DefaultMode holds the default value on creation for the mode field.
  520. label.DefaultMode = labelDescMode.Default.(int)
  521. // labelDescConditions is the schema descriptor for conditions field.
  522. labelDescConditions := labelFields[4].Descriptor()
  523. // label.DefaultConditions holds the default value on creation for the conditions field.
  524. label.DefaultConditions = labelDescConditions.Default.(string)
  525. // labelDescOrganizationID is the schema descriptor for organization_id field.
  526. labelDescOrganizationID := labelFields[5].Descriptor()
  527. // label.DefaultOrganizationID holds the default value on creation for the organization_id field.
  528. label.DefaultOrganizationID = labelDescOrganizationID.Default.(uint64)
  529. labelrelationshipMixin := schema.LabelRelationship{}.Mixin()
  530. labelrelationshipMixinHooks2 := labelrelationshipMixin[2].Hooks()
  531. labelrelationship.Hooks[0] = labelrelationshipMixinHooks2[0]
  532. labelrelationshipMixinInters2 := labelrelationshipMixin[2].Interceptors()
  533. labelrelationship.Interceptors[0] = labelrelationshipMixinInters2[0]
  534. labelrelationshipMixinFields0 := labelrelationshipMixin[0].Fields()
  535. _ = labelrelationshipMixinFields0
  536. labelrelationshipMixinFields1 := labelrelationshipMixin[1].Fields()
  537. _ = labelrelationshipMixinFields1
  538. labelrelationshipFields := schema.LabelRelationship{}.Fields()
  539. _ = labelrelationshipFields
  540. // labelrelationshipDescCreatedAt is the schema descriptor for created_at field.
  541. labelrelationshipDescCreatedAt := labelrelationshipMixinFields0[1].Descriptor()
  542. // labelrelationship.DefaultCreatedAt holds the default value on creation for the created_at field.
  543. labelrelationship.DefaultCreatedAt = labelrelationshipDescCreatedAt.Default.(func() time.Time)
  544. // labelrelationshipDescUpdatedAt is the schema descriptor for updated_at field.
  545. labelrelationshipDescUpdatedAt := labelrelationshipMixinFields0[2].Descriptor()
  546. // labelrelationship.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  547. labelrelationship.DefaultUpdatedAt = labelrelationshipDescUpdatedAt.Default.(func() time.Time)
  548. // labelrelationship.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  549. labelrelationship.UpdateDefaultUpdatedAt = labelrelationshipDescUpdatedAt.UpdateDefault.(func() time.Time)
  550. // labelrelationshipDescStatus is the schema descriptor for status field.
  551. labelrelationshipDescStatus := labelrelationshipMixinFields1[0].Descriptor()
  552. // labelrelationship.DefaultStatus holds the default value on creation for the status field.
  553. labelrelationship.DefaultStatus = labelrelationshipDescStatus.Default.(uint8)
  554. // labelrelationshipDescLabelID is the schema descriptor for label_id field.
  555. labelrelationshipDescLabelID := labelrelationshipFields[0].Descriptor()
  556. // labelrelationship.DefaultLabelID holds the default value on creation for the label_id field.
  557. labelrelationship.DefaultLabelID = labelrelationshipDescLabelID.Default.(uint64)
  558. // labelrelationshipDescContactID is the schema descriptor for contact_id field.
  559. labelrelationshipDescContactID := labelrelationshipFields[1].Descriptor()
  560. // labelrelationship.DefaultContactID holds the default value on creation for the contact_id field.
  561. labelrelationship.DefaultContactID = labelrelationshipDescContactID.Default.(uint64)
  562. // labelrelationshipDescOrganizationID is the schema descriptor for organization_id field.
  563. labelrelationshipDescOrganizationID := labelrelationshipFields[2].Descriptor()
  564. // labelrelationship.DefaultOrganizationID holds the default value on creation for the organization_id field.
  565. labelrelationship.DefaultOrganizationID = labelrelationshipDescOrganizationID.Default.(uint64)
  566. messageFields := schema.Message{}.Fields()
  567. _ = messageFields
  568. // messageDescWxWxid is the schema descriptor for wx_wxid field.
  569. messageDescWxWxid := messageFields[0].Descriptor()
  570. // message.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  571. message.DefaultWxWxid = messageDescWxWxid.Default.(string)
  572. // messageDescWxid is the schema descriptor for wxid field.
  573. messageDescWxid := messageFields[1].Descriptor()
  574. // message.DefaultWxid holds the default value on creation for the wxid field.
  575. message.DefaultWxid = messageDescWxid.Default.(string)
  576. // messageDescContent is the schema descriptor for content field.
  577. messageDescContent := messageFields[2].Descriptor()
  578. // message.DefaultContent holds the default value on creation for the content field.
  579. message.DefaultContent = messageDescContent.Default.(string)
  580. messagerecordsMixin := schema.MessageRecords{}.Mixin()
  581. messagerecordsMixinFields0 := messagerecordsMixin[0].Fields()
  582. _ = messagerecordsMixinFields0
  583. messagerecordsMixinFields1 := messagerecordsMixin[1].Fields()
  584. _ = messagerecordsMixinFields1
  585. messagerecordsFields := schema.MessageRecords{}.Fields()
  586. _ = messagerecordsFields
  587. // messagerecordsDescCreatedAt is the schema descriptor for created_at field.
  588. messagerecordsDescCreatedAt := messagerecordsMixinFields0[1].Descriptor()
  589. // messagerecords.DefaultCreatedAt holds the default value on creation for the created_at field.
  590. messagerecords.DefaultCreatedAt = messagerecordsDescCreatedAt.Default.(func() time.Time)
  591. // messagerecordsDescUpdatedAt is the schema descriptor for updated_at field.
  592. messagerecordsDescUpdatedAt := messagerecordsMixinFields0[2].Descriptor()
  593. // messagerecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  594. messagerecords.DefaultUpdatedAt = messagerecordsDescUpdatedAt.Default.(func() time.Time)
  595. // messagerecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  596. messagerecords.UpdateDefaultUpdatedAt = messagerecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
  597. // messagerecordsDescStatus is the schema descriptor for status field.
  598. messagerecordsDescStatus := messagerecordsMixinFields1[0].Descriptor()
  599. // messagerecords.DefaultStatus holds the default value on creation for the status field.
  600. messagerecords.DefaultStatus = messagerecordsDescStatus.Default.(uint8)
  601. // messagerecordsDescContactType is the schema descriptor for contact_type field.
  602. messagerecordsDescContactType := messagerecordsFields[2].Descriptor()
  603. // messagerecords.DefaultContactType holds the default value on creation for the contact_type field.
  604. messagerecords.DefaultContactType = messagerecordsDescContactType.Default.(int)
  605. // messagerecordsDescContactWxid is the schema descriptor for contact_wxid field.
  606. messagerecordsDescContactWxid := messagerecordsFields[3].Descriptor()
  607. // messagerecords.DefaultContactWxid holds the default value on creation for the contact_wxid field.
  608. messagerecords.DefaultContactWxid = messagerecordsDescContactWxid.Default.(string)
  609. // messagerecordsDescContentType is the schema descriptor for content_type field.
  610. messagerecordsDescContentType := messagerecordsFields[4].Descriptor()
  611. // messagerecords.DefaultContentType holds the default value on creation for the content_type field.
  612. messagerecords.DefaultContentType = messagerecordsDescContentType.Default.(int)
  613. // messagerecordsDescContent is the schema descriptor for content field.
  614. messagerecordsDescContent := messagerecordsFields[5].Descriptor()
  615. // messagerecords.DefaultContent holds the default value on creation for the content field.
  616. messagerecords.DefaultContent = messagerecordsDescContent.Default.(string)
  617. // messagerecordsDescErrorDetail is the schema descriptor for error_detail field.
  618. messagerecordsDescErrorDetail := messagerecordsFields[7].Descriptor()
  619. // messagerecords.DefaultErrorDetail holds the default value on creation for the error_detail field.
  620. messagerecords.DefaultErrorDetail = messagerecordsDescErrorDetail.Default.(string)
  621. // messagerecordsDescSourceType is the schema descriptor for source_type field.
  622. messagerecordsDescSourceType := messagerecordsFields[9].Descriptor()
  623. // messagerecords.DefaultSourceType holds the default value on creation for the source_type field.
  624. messagerecords.DefaultSourceType = messagerecordsDescSourceType.Default.(int)
  625. // messagerecordsDescSourceID is the schema descriptor for source_id field.
  626. messagerecordsDescSourceID := messagerecordsFields[10].Descriptor()
  627. // messagerecords.DefaultSourceID holds the default value on creation for the source_id field.
  628. messagerecords.DefaultSourceID = messagerecordsDescSourceID.Default.(uint64)
  629. // messagerecordsDescSubSourceID is the schema descriptor for sub_source_id field.
  630. messagerecordsDescSubSourceID := messagerecordsFields[11].Descriptor()
  631. // messagerecords.DefaultSubSourceID holds the default value on creation for the sub_source_id field.
  632. messagerecords.DefaultSubSourceID = messagerecordsDescSubSourceID.Default.(uint64)
  633. // messagerecordsDescOrganizationID is the schema descriptor for organization_id field.
  634. messagerecordsDescOrganizationID := messagerecordsFields[12].Descriptor()
  635. // messagerecords.DefaultOrganizationID holds the default value on creation for the organization_id field.
  636. messagerecords.DefaultOrganizationID = messagerecordsDescOrganizationID.Default.(uint64)
  637. msgMixin := schema.Msg{}.Mixin()
  638. msgMixinHooks1 := msgMixin[1].Hooks()
  639. msg.Hooks[0] = msgMixinHooks1[0]
  640. msgMixinInters1 := msgMixin[1].Interceptors()
  641. msg.Interceptors[0] = msgMixinInters1[0]
  642. msgMixinFields0 := msgMixin[0].Fields()
  643. _ = msgMixinFields0
  644. msgFields := schema.Msg{}.Fields()
  645. _ = msgFields
  646. // msgDescCreatedAt is the schema descriptor for created_at field.
  647. msgDescCreatedAt := msgMixinFields0[1].Descriptor()
  648. // msg.DefaultCreatedAt holds the default value on creation for the created_at field.
  649. msg.DefaultCreatedAt = msgDescCreatedAt.Default.(func() time.Time)
  650. // msgDescUpdatedAt is the schema descriptor for updated_at field.
  651. msgDescUpdatedAt := msgMixinFields0[2].Descriptor()
  652. // msg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  653. msg.DefaultUpdatedAt = msgDescUpdatedAt.Default.(func() time.Time)
  654. // msg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  655. msg.UpdateDefaultUpdatedAt = msgDescUpdatedAt.UpdateDefault.(func() time.Time)
  656. serverMixin := schema.Server{}.Mixin()
  657. serverMixinHooks2 := serverMixin[2].Hooks()
  658. server.Hooks[0] = serverMixinHooks2[0]
  659. serverMixinInters2 := serverMixin[2].Interceptors()
  660. server.Interceptors[0] = serverMixinInters2[0]
  661. serverMixinFields0 := serverMixin[0].Fields()
  662. _ = serverMixinFields0
  663. serverMixinFields1 := serverMixin[1].Fields()
  664. _ = serverMixinFields1
  665. serverFields := schema.Server{}.Fields()
  666. _ = serverFields
  667. // serverDescCreatedAt is the schema descriptor for created_at field.
  668. serverDescCreatedAt := serverMixinFields0[1].Descriptor()
  669. // server.DefaultCreatedAt holds the default value on creation for the created_at field.
  670. server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
  671. // serverDescUpdatedAt is the schema descriptor for updated_at field.
  672. serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
  673. // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  674. server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
  675. // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  676. server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
  677. // serverDescStatus is the schema descriptor for status field.
  678. serverDescStatus := serverMixinFields1[0].Descriptor()
  679. // server.DefaultStatus holds the default value on creation for the status field.
  680. server.DefaultStatus = serverDescStatus.Default.(uint8)
  681. sopnodeMixin := schema.SopNode{}.Mixin()
  682. sopnodeMixinHooks2 := sopnodeMixin[2].Hooks()
  683. sopnode.Hooks[0] = sopnodeMixinHooks2[0]
  684. sopnodeMixinInters2 := sopnodeMixin[2].Interceptors()
  685. sopnode.Interceptors[0] = sopnodeMixinInters2[0]
  686. sopnodeMixinFields0 := sopnodeMixin[0].Fields()
  687. _ = sopnodeMixinFields0
  688. sopnodeMixinFields1 := sopnodeMixin[1].Fields()
  689. _ = sopnodeMixinFields1
  690. sopnodeFields := schema.SopNode{}.Fields()
  691. _ = sopnodeFields
  692. // sopnodeDescCreatedAt is the schema descriptor for created_at field.
  693. sopnodeDescCreatedAt := sopnodeMixinFields0[1].Descriptor()
  694. // sopnode.DefaultCreatedAt holds the default value on creation for the created_at field.
  695. sopnode.DefaultCreatedAt = sopnodeDescCreatedAt.Default.(func() time.Time)
  696. // sopnodeDescUpdatedAt is the schema descriptor for updated_at field.
  697. sopnodeDescUpdatedAt := sopnodeMixinFields0[2].Descriptor()
  698. // sopnode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  699. sopnode.DefaultUpdatedAt = sopnodeDescUpdatedAt.Default.(func() time.Time)
  700. // sopnode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  701. sopnode.UpdateDefaultUpdatedAt = sopnodeDescUpdatedAt.UpdateDefault.(func() time.Time)
  702. // sopnodeDescStatus is the schema descriptor for status field.
  703. sopnodeDescStatus := sopnodeMixinFields1[0].Descriptor()
  704. // sopnode.DefaultStatus holds the default value on creation for the status field.
  705. sopnode.DefaultStatus = sopnodeDescStatus.Default.(uint8)
  706. // sopnodeDescName is the schema descriptor for name field.
  707. sopnodeDescName := sopnodeFields[2].Descriptor()
  708. // sopnode.DefaultName holds the default value on creation for the name field.
  709. sopnode.DefaultName = sopnodeDescName.Default.(string)
  710. // sopnodeDescConditionType is the schema descriptor for condition_type field.
  711. sopnodeDescConditionType := sopnodeFields[3].Descriptor()
  712. // sopnode.DefaultConditionType holds the default value on creation for the condition_type field.
  713. sopnode.DefaultConditionType = sopnodeDescConditionType.Default.(int)
  714. // sopnodeDescNoReplyCondition is the schema descriptor for no_reply_condition field.
  715. sopnodeDescNoReplyCondition := sopnodeFields[5].Descriptor()
  716. // sopnode.DefaultNoReplyCondition holds the default value on creation for the no_reply_condition field.
  717. sopnode.DefaultNoReplyCondition = sopnodeDescNoReplyCondition.Default.(uint64)
  718. // sopnodeDescNoReplyUnit is the schema descriptor for no_reply_unit field.
  719. sopnodeDescNoReplyUnit := sopnodeFields[6].Descriptor()
  720. // sopnode.DefaultNoReplyUnit holds the default value on creation for the no_reply_unit field.
  721. sopnode.DefaultNoReplyUnit = sopnodeDescNoReplyUnit.Default.(string)
  722. sopstageMixin := schema.SopStage{}.Mixin()
  723. sopstageMixinHooks2 := sopstageMixin[2].Hooks()
  724. sopstage.Hooks[0] = sopstageMixinHooks2[0]
  725. sopstageMixinInters2 := sopstageMixin[2].Interceptors()
  726. sopstage.Interceptors[0] = sopstageMixinInters2[0]
  727. sopstageMixinFields0 := sopstageMixin[0].Fields()
  728. _ = sopstageMixinFields0
  729. sopstageMixinFields1 := sopstageMixin[1].Fields()
  730. _ = sopstageMixinFields1
  731. sopstageFields := schema.SopStage{}.Fields()
  732. _ = sopstageFields
  733. // sopstageDescCreatedAt is the schema descriptor for created_at field.
  734. sopstageDescCreatedAt := sopstageMixinFields0[1].Descriptor()
  735. // sopstage.DefaultCreatedAt holds the default value on creation for the created_at field.
  736. sopstage.DefaultCreatedAt = sopstageDescCreatedAt.Default.(func() time.Time)
  737. // sopstageDescUpdatedAt is the schema descriptor for updated_at field.
  738. sopstageDescUpdatedAt := sopstageMixinFields0[2].Descriptor()
  739. // sopstage.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  740. sopstage.DefaultUpdatedAt = sopstageDescUpdatedAt.Default.(func() time.Time)
  741. // sopstage.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  742. sopstage.UpdateDefaultUpdatedAt = sopstageDescUpdatedAt.UpdateDefault.(func() time.Time)
  743. // sopstageDescStatus is the schema descriptor for status field.
  744. sopstageDescStatus := sopstageMixinFields1[0].Descriptor()
  745. // sopstage.DefaultStatus holds the default value on creation for the status field.
  746. sopstage.DefaultStatus = sopstageDescStatus.Default.(uint8)
  747. // sopstageDescName is the schema descriptor for name field.
  748. sopstageDescName := sopstageFields[1].Descriptor()
  749. // sopstage.DefaultName holds the default value on creation for the name field.
  750. sopstage.DefaultName = sopstageDescName.Default.(string)
  751. // sopstageDescConditionType is the schema descriptor for condition_type field.
  752. sopstageDescConditionType := sopstageFields[2].Descriptor()
  753. // sopstage.DefaultConditionType holds the default value on creation for the condition_type field.
  754. sopstage.DefaultConditionType = sopstageDescConditionType.Default.(int)
  755. // sopstageDescConditionOperator is the schema descriptor for condition_operator field.
  756. sopstageDescConditionOperator := sopstageFields[3].Descriptor()
  757. // sopstage.DefaultConditionOperator holds the default value on creation for the condition_operator field.
  758. sopstage.DefaultConditionOperator = sopstageDescConditionOperator.Default.(int)
  759. // sopstageDescIndexSort is the schema descriptor for index_sort field.
  760. sopstageDescIndexSort := sopstageFields[9].Descriptor()
  761. // sopstage.DefaultIndexSort holds the default value on creation for the index_sort field.
  762. sopstage.DefaultIndexSort = sopstageDescIndexSort.Default.(int)
  763. soptaskMixin := schema.SopTask{}.Mixin()
  764. soptaskMixinHooks2 := soptaskMixin[2].Hooks()
  765. soptask.Hooks[0] = soptaskMixinHooks2[0]
  766. soptaskMixinInters2 := soptaskMixin[2].Interceptors()
  767. soptask.Interceptors[0] = soptaskMixinInters2[0]
  768. soptaskMixinFields0 := soptaskMixin[0].Fields()
  769. _ = soptaskMixinFields0
  770. soptaskMixinFields1 := soptaskMixin[1].Fields()
  771. _ = soptaskMixinFields1
  772. soptaskFields := schema.SopTask{}.Fields()
  773. _ = soptaskFields
  774. // soptaskDescCreatedAt is the schema descriptor for created_at field.
  775. soptaskDescCreatedAt := soptaskMixinFields0[1].Descriptor()
  776. // soptask.DefaultCreatedAt holds the default value on creation for the created_at field.
  777. soptask.DefaultCreatedAt = soptaskDescCreatedAt.Default.(func() time.Time)
  778. // soptaskDescUpdatedAt is the schema descriptor for updated_at field.
  779. soptaskDescUpdatedAt := soptaskMixinFields0[2].Descriptor()
  780. // soptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  781. soptask.DefaultUpdatedAt = soptaskDescUpdatedAt.Default.(func() time.Time)
  782. // soptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  783. soptask.UpdateDefaultUpdatedAt = soptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
  784. // soptaskDescStatus is the schema descriptor for status field.
  785. soptaskDescStatus := soptaskMixinFields1[0].Descriptor()
  786. // soptask.DefaultStatus holds the default value on creation for the status field.
  787. soptask.DefaultStatus = soptaskDescStatus.Default.(uint8)
  788. // soptaskDescName is the schema descriptor for name field.
  789. soptaskDescName := soptaskFields[0].Descriptor()
  790. // soptask.NameValidator is a validator for the "name" field. It is called by the builders before save.
  791. soptask.NameValidator = soptaskDescName.Validators[0].(func(string) error)
  792. // soptaskDescType is the schema descriptor for type field.
  793. soptaskDescType := soptaskFields[2].Descriptor()
  794. // soptask.DefaultType holds the default value on creation for the type field.
  795. soptask.DefaultType = soptaskDescType.Default.(int)
  796. // soptaskDescOrganizationID is the schema descriptor for organization_id field.
  797. soptaskDescOrganizationID := soptaskFields[6].Descriptor()
  798. // soptask.DefaultOrganizationID holds the default value on creation for the organization_id field.
  799. soptask.DefaultOrganizationID = soptaskDescOrganizationID.Default.(uint64)
  800. tokenMixin := schema.Token{}.Mixin()
  801. tokenMixinHooks1 := tokenMixin[1].Hooks()
  802. token.Hooks[0] = tokenMixinHooks1[0]
  803. tokenMixinInters1 := tokenMixin[1].Interceptors()
  804. token.Interceptors[0] = tokenMixinInters1[0]
  805. tokenMixinFields0 := tokenMixin[0].Fields()
  806. _ = tokenMixinFields0
  807. tokenFields := schema.Token{}.Fields()
  808. _ = tokenFields
  809. // tokenDescCreatedAt is the schema descriptor for created_at field.
  810. tokenDescCreatedAt := tokenMixinFields0[1].Descriptor()
  811. // token.DefaultCreatedAt holds the default value on creation for the created_at field.
  812. token.DefaultCreatedAt = tokenDescCreatedAt.Default.(func() time.Time)
  813. // tokenDescUpdatedAt is the schema descriptor for updated_at field.
  814. tokenDescUpdatedAt := tokenMixinFields0[2].Descriptor()
  815. // token.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  816. token.DefaultUpdatedAt = tokenDescUpdatedAt.Default.(func() time.Time)
  817. // token.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  818. token.UpdateDefaultUpdatedAt = tokenDescUpdatedAt.UpdateDefault.(func() time.Time)
  819. // tokenDescToken is the schema descriptor for token field.
  820. tokenDescToken := tokenFields[1].Descriptor()
  821. // token.DefaultToken holds the default value on creation for the token field.
  822. token.DefaultToken = tokenDescToken.Default.(string)
  823. // tokenDescMAC is the schema descriptor for mac field.
  824. tokenDescMAC := tokenFields[2].Descriptor()
  825. // token.DefaultMAC holds the default value on creation for the mac field.
  826. token.DefaultMAC = tokenDescMAC.Default.(string)
  827. tutorialMixin := schema.Tutorial{}.Mixin()
  828. tutorialMixinHooks1 := tutorialMixin[1].Hooks()
  829. tutorial.Hooks[0] = tutorialMixinHooks1[0]
  830. tutorialMixinInters1 := tutorialMixin[1].Interceptors()
  831. tutorial.Interceptors[0] = tutorialMixinInters1[0]
  832. tutorialMixinFields0 := tutorialMixin[0].Fields()
  833. _ = tutorialMixinFields0
  834. tutorialFields := schema.Tutorial{}.Fields()
  835. _ = tutorialFields
  836. // tutorialDescCreatedAt is the schema descriptor for created_at field.
  837. tutorialDescCreatedAt := tutorialMixinFields0[1].Descriptor()
  838. // tutorial.DefaultCreatedAt holds the default value on creation for the created_at field.
  839. tutorial.DefaultCreatedAt = tutorialDescCreatedAt.Default.(func() time.Time)
  840. // tutorialDescUpdatedAt is the schema descriptor for updated_at field.
  841. tutorialDescUpdatedAt := tutorialMixinFields0[2].Descriptor()
  842. // tutorial.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  843. tutorial.DefaultUpdatedAt = tutorialDescUpdatedAt.Default.(func() time.Time)
  844. // tutorial.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  845. tutorial.UpdateDefaultUpdatedAt = tutorialDescUpdatedAt.UpdateDefault.(func() time.Time)
  846. // tutorialDescEmployeeID is the schema descriptor for employee_id field.
  847. tutorialDescEmployeeID := tutorialFields[0].Descriptor()
  848. // tutorial.EmployeeIDValidator is a validator for the "employee_id" field. It is called by the builders before save.
  849. tutorial.EmployeeIDValidator = tutorialDescEmployeeID.Validators[0].(func(uint64) error)
  850. // tutorialDescOrganizationID is the schema descriptor for organization_id field.
  851. tutorialDescOrganizationID := tutorialFields[4].Descriptor()
  852. // tutorial.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  853. tutorial.OrganizationIDValidator = tutorialDescOrganizationID.Validators[0].(func(uint64) error)
  854. workexperienceMixin := schema.WorkExperience{}.Mixin()
  855. workexperienceMixinHooks1 := workexperienceMixin[1].Hooks()
  856. workexperience.Hooks[0] = workexperienceMixinHooks1[0]
  857. workexperienceMixinInters1 := workexperienceMixin[1].Interceptors()
  858. workexperience.Interceptors[0] = workexperienceMixinInters1[0]
  859. workexperienceMixinFields0 := workexperienceMixin[0].Fields()
  860. _ = workexperienceMixinFields0
  861. workexperienceFields := schema.WorkExperience{}.Fields()
  862. _ = workexperienceFields
  863. // workexperienceDescCreatedAt is the schema descriptor for created_at field.
  864. workexperienceDescCreatedAt := workexperienceMixinFields0[1].Descriptor()
  865. // workexperience.DefaultCreatedAt holds the default value on creation for the created_at field.
  866. workexperience.DefaultCreatedAt = workexperienceDescCreatedAt.Default.(func() time.Time)
  867. // workexperienceDescUpdatedAt is the schema descriptor for updated_at field.
  868. workexperienceDescUpdatedAt := workexperienceMixinFields0[2].Descriptor()
  869. // workexperience.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  870. workexperience.DefaultUpdatedAt = workexperienceDescUpdatedAt.Default.(func() time.Time)
  871. // workexperience.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  872. workexperience.UpdateDefaultUpdatedAt = workexperienceDescUpdatedAt.UpdateDefault.(func() time.Time)
  873. wxMixin := schema.Wx{}.Mixin()
  874. wxMixinHooks2 := wxMixin[2].Hooks()
  875. wx.Hooks[0] = wxMixinHooks2[0]
  876. wxMixinInters2 := wxMixin[2].Interceptors()
  877. wx.Interceptors[0] = wxMixinInters2[0]
  878. wxMixinFields0 := wxMixin[0].Fields()
  879. _ = wxMixinFields0
  880. wxMixinFields1 := wxMixin[1].Fields()
  881. _ = wxMixinFields1
  882. wxFields := schema.Wx{}.Fields()
  883. _ = wxFields
  884. // wxDescCreatedAt is the schema descriptor for created_at field.
  885. wxDescCreatedAt := wxMixinFields0[1].Descriptor()
  886. // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
  887. wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
  888. // wxDescUpdatedAt is the schema descriptor for updated_at field.
  889. wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
  890. // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  891. wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
  892. // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  893. wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
  894. // wxDescStatus is the schema descriptor for status field.
  895. wxDescStatus := wxMixinFields1[0].Descriptor()
  896. // wx.DefaultStatus holds the default value on creation for the status field.
  897. wx.DefaultStatus = wxDescStatus.Default.(uint8)
  898. // wxDescServerID is the schema descriptor for server_id field.
  899. wxDescServerID := wxFields[0].Descriptor()
  900. // wx.DefaultServerID holds the default value on creation for the server_id field.
  901. wx.DefaultServerID = wxDescServerID.Default.(uint64)
  902. // wxDescPort is the schema descriptor for port field.
  903. wxDescPort := wxFields[1].Descriptor()
  904. // wx.DefaultPort holds the default value on creation for the port field.
  905. wx.DefaultPort = wxDescPort.Default.(string)
  906. // wxDescProcessID is the schema descriptor for process_id field.
  907. wxDescProcessID := wxFields[2].Descriptor()
  908. // wx.DefaultProcessID holds the default value on creation for the process_id field.
  909. wx.DefaultProcessID = wxDescProcessID.Default.(string)
  910. // wxDescCallback is the schema descriptor for callback field.
  911. wxDescCallback := wxFields[3].Descriptor()
  912. // wx.DefaultCallback holds the default value on creation for the callback field.
  913. wx.DefaultCallback = wxDescCallback.Default.(string)
  914. // wxDescWxid is the schema descriptor for wxid field.
  915. wxDescWxid := wxFields[4].Descriptor()
  916. // wx.DefaultWxid holds the default value on creation for the wxid field.
  917. wx.DefaultWxid = wxDescWxid.Default.(string)
  918. // wxDescAccount is the schema descriptor for account field.
  919. wxDescAccount := wxFields[5].Descriptor()
  920. // wx.DefaultAccount holds the default value on creation for the account field.
  921. wx.DefaultAccount = wxDescAccount.Default.(string)
  922. // wxDescNickname is the schema descriptor for nickname field.
  923. wxDescNickname := wxFields[6].Descriptor()
  924. // wx.DefaultNickname holds the default value on creation for the nickname field.
  925. wx.DefaultNickname = wxDescNickname.Default.(string)
  926. // wxDescTel is the schema descriptor for tel field.
  927. wxDescTel := wxFields[7].Descriptor()
  928. // wx.DefaultTel holds the default value on creation for the tel field.
  929. wx.DefaultTel = wxDescTel.Default.(string)
  930. // wxDescHeadBig is the schema descriptor for head_big field.
  931. wxDescHeadBig := wxFields[8].Descriptor()
  932. // wx.DefaultHeadBig holds the default value on creation for the head_big field.
  933. wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
  934. // wxDescOrganizationID is the schema descriptor for organization_id field.
  935. wxDescOrganizationID := wxFields[9].Descriptor()
  936. // wx.DefaultOrganizationID holds the default value on creation for the organization_id field.
  937. wx.DefaultOrganizationID = wxDescOrganizationID.Default.(uint64)
  938. // wxDescAgentID is the schema descriptor for agent_id field.
  939. wxDescAgentID := wxFields[10].Descriptor()
  940. // wx.DefaultAgentID holds the default value on creation for the agent_id field.
  941. wx.DefaultAgentID = wxDescAgentID.Default.(uint64)
  942. // wxDescAPIBase is the schema descriptor for api_base field.
  943. wxDescAPIBase := wxFields[11].Descriptor()
  944. // wx.DefaultAPIBase holds the default value on creation for the api_base field.
  945. wx.DefaultAPIBase = wxDescAPIBase.Default.(string)
  946. // wxDescAPIKey is the schema descriptor for api_key field.
  947. wxDescAPIKey := wxFields[12].Descriptor()
  948. // wx.DefaultAPIKey holds the default value on creation for the api_key field.
  949. wx.DefaultAPIKey = wxDescAPIKey.Default.(string)
  950. wxcardMixin := schema.WxCard{}.Mixin()
  951. wxcardMixinHooks1 := wxcardMixin[1].Hooks()
  952. wxcard.Hooks[0] = wxcardMixinHooks1[0]
  953. wxcardMixinInters1 := wxcardMixin[1].Interceptors()
  954. wxcard.Interceptors[0] = wxcardMixinInters1[0]
  955. wxcardMixinFields0 := wxcardMixin[0].Fields()
  956. _ = wxcardMixinFields0
  957. wxcardFields := schema.WxCard{}.Fields()
  958. _ = wxcardFields
  959. // wxcardDescCreatedAt is the schema descriptor for created_at field.
  960. wxcardDescCreatedAt := wxcardMixinFields0[1].Descriptor()
  961. // wxcard.DefaultCreatedAt holds the default value on creation for the created_at field.
  962. wxcard.DefaultCreatedAt = wxcardDescCreatedAt.Default.(func() time.Time)
  963. // wxcardDescUpdatedAt is the schema descriptor for updated_at field.
  964. wxcardDescUpdatedAt := wxcardMixinFields0[2].Descriptor()
  965. // wxcard.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  966. wxcard.DefaultUpdatedAt = wxcardDescUpdatedAt.Default.(func() time.Time)
  967. // wxcard.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  968. wxcard.UpdateDefaultUpdatedAt = wxcardDescUpdatedAt.UpdateDefault.(func() time.Time)
  969. // wxcardDescUserID is the schema descriptor for user_id field.
  970. wxcardDescUserID := wxcardFields[0].Descriptor()
  971. // wxcard.DefaultUserID holds the default value on creation for the user_id field.
  972. wxcard.DefaultUserID = wxcardDescUserID.Default.(uint64)
  973. // wxcardDescWxUserID is the schema descriptor for wx_user_id field.
  974. wxcardDescWxUserID := wxcardFields[1].Descriptor()
  975. // wxcard.DefaultWxUserID holds the default value on creation for the wx_user_id field.
  976. wxcard.DefaultWxUserID = wxcardDescWxUserID.Default.(uint64)
  977. // wxcardDescAvatar is the schema descriptor for avatar field.
  978. wxcardDescAvatar := wxcardFields[2].Descriptor()
  979. // wxcard.DefaultAvatar holds the default value on creation for the avatar field.
  980. wxcard.DefaultAvatar = wxcardDescAvatar.Default.(string)
  981. // wxcardDescLogo is the schema descriptor for logo field.
  982. wxcardDescLogo := wxcardFields[3].Descriptor()
  983. // wxcard.DefaultLogo holds the default value on creation for the logo field.
  984. wxcard.DefaultLogo = wxcardDescLogo.Default.(string)
  985. // wxcardDescName is the schema descriptor for name field.
  986. wxcardDescName := wxcardFields[4].Descriptor()
  987. // wxcard.DefaultName holds the default value on creation for the name field.
  988. wxcard.DefaultName = wxcardDescName.Default.(string)
  989. // wxcardDescCompany is the schema descriptor for company field.
  990. wxcardDescCompany := wxcardFields[5].Descriptor()
  991. // wxcard.DefaultCompany holds the default value on creation for the company field.
  992. wxcard.DefaultCompany = wxcardDescCompany.Default.(string)
  993. // wxcardDescAddress is the schema descriptor for address field.
  994. wxcardDescAddress := wxcardFields[6].Descriptor()
  995. // wxcard.DefaultAddress holds the default value on creation for the address field.
  996. wxcard.DefaultAddress = wxcardDescAddress.Default.(string)
  997. // wxcardDescPhone is the schema descriptor for phone field.
  998. wxcardDescPhone := wxcardFields[7].Descriptor()
  999. // wxcard.DefaultPhone holds the default value on creation for the phone field.
  1000. wxcard.DefaultPhone = wxcardDescPhone.Default.(string)
  1001. // wxcardDescOfficialAccount is the schema descriptor for official_account field.
  1002. wxcardDescOfficialAccount := wxcardFields[8].Descriptor()
  1003. // wxcard.DefaultOfficialAccount holds the default value on creation for the official_account field.
  1004. wxcard.DefaultOfficialAccount = wxcardDescOfficialAccount.Default.(string)
  1005. // wxcardDescWechatAccount is the schema descriptor for wechat_account field.
  1006. wxcardDescWechatAccount := wxcardFields[9].Descriptor()
  1007. // wxcard.DefaultWechatAccount holds the default value on creation for the wechat_account field.
  1008. wxcard.DefaultWechatAccount = wxcardDescWechatAccount.Default.(string)
  1009. // wxcardDescEmail is the schema descriptor for email field.
  1010. wxcardDescEmail := wxcardFields[10].Descriptor()
  1011. // wxcard.DefaultEmail holds the default value on creation for the email field.
  1012. wxcard.DefaultEmail = wxcardDescEmail.Default.(string)
  1013. // wxcardDescIntro is the schema descriptor for intro field.
  1014. wxcardDescIntro := wxcardFields[14].Descriptor()
  1015. // wxcard.DefaultIntro holds the default value on creation for the intro field.
  1016. wxcard.DefaultIntro = wxcardDescIntro.Default.(string)
  1017. wxcarduserMixin := schema.WxCardUser{}.Mixin()
  1018. wxcarduserMixinHooks1 := wxcarduserMixin[1].Hooks()
  1019. wxcarduser.Hooks[0] = wxcarduserMixinHooks1[0]
  1020. wxcarduserMixinInters1 := wxcarduserMixin[1].Interceptors()
  1021. wxcarduser.Interceptors[0] = wxcarduserMixinInters1[0]
  1022. wxcarduserMixinFields0 := wxcarduserMixin[0].Fields()
  1023. _ = wxcarduserMixinFields0
  1024. wxcarduserFields := schema.WxCardUser{}.Fields()
  1025. _ = wxcarduserFields
  1026. // wxcarduserDescCreatedAt is the schema descriptor for created_at field.
  1027. wxcarduserDescCreatedAt := wxcarduserMixinFields0[1].Descriptor()
  1028. // wxcarduser.DefaultCreatedAt holds the default value on creation for the created_at field.
  1029. wxcarduser.DefaultCreatedAt = wxcarduserDescCreatedAt.Default.(func() time.Time)
  1030. // wxcarduserDescUpdatedAt is the schema descriptor for updated_at field.
  1031. wxcarduserDescUpdatedAt := wxcarduserMixinFields0[2].Descriptor()
  1032. // wxcarduser.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1033. wxcarduser.DefaultUpdatedAt = wxcarduserDescUpdatedAt.Default.(func() time.Time)
  1034. // wxcarduser.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1035. wxcarduser.UpdateDefaultUpdatedAt = wxcarduserDescUpdatedAt.UpdateDefault.(func() time.Time)
  1036. // wxcarduserDescWxid is the schema descriptor for wxid field.
  1037. wxcarduserDescWxid := wxcarduserFields[0].Descriptor()
  1038. // wxcarduser.DefaultWxid holds the default value on creation for the wxid field.
  1039. wxcarduser.DefaultWxid = wxcarduserDescWxid.Default.(string)
  1040. // wxcarduserDescAccount is the schema descriptor for account field.
  1041. wxcarduserDescAccount := wxcarduserFields[1].Descriptor()
  1042. // wxcarduser.DefaultAccount holds the default value on creation for the account field.
  1043. wxcarduser.DefaultAccount = wxcarduserDescAccount.Default.(string)
  1044. // wxcarduserDescAvatar is the schema descriptor for avatar field.
  1045. wxcarduserDescAvatar := wxcarduserFields[2].Descriptor()
  1046. // wxcarduser.DefaultAvatar holds the default value on creation for the avatar field.
  1047. wxcarduser.DefaultAvatar = wxcarduserDescAvatar.Default.(string)
  1048. // wxcarduserDescNickname is the schema descriptor for nickname field.
  1049. wxcarduserDescNickname := wxcarduserFields[3].Descriptor()
  1050. // wxcarduser.DefaultNickname holds the default value on creation for the nickname field.
  1051. wxcarduser.DefaultNickname = wxcarduserDescNickname.Default.(string)
  1052. // wxcarduserDescRemark is the schema descriptor for remark field.
  1053. wxcarduserDescRemark := wxcarduserFields[4].Descriptor()
  1054. // wxcarduser.DefaultRemark holds the default value on creation for the remark field.
  1055. wxcarduser.DefaultRemark = wxcarduserDescRemark.Default.(string)
  1056. // wxcarduserDescPhone is the schema descriptor for phone field.
  1057. wxcarduserDescPhone := wxcarduserFields[5].Descriptor()
  1058. // wxcarduser.DefaultPhone holds the default value on creation for the phone field.
  1059. wxcarduser.DefaultPhone = wxcarduserDescPhone.Default.(string)
  1060. // wxcarduserDescOpenID is the schema descriptor for open_id field.
  1061. wxcarduserDescOpenID := wxcarduserFields[6].Descriptor()
  1062. // wxcarduser.DefaultOpenID holds the default value on creation for the open_id field.
  1063. wxcarduser.DefaultOpenID = wxcarduserDescOpenID.Default.(string)
  1064. // wxcarduserDescUnionID is the schema descriptor for union_id field.
  1065. wxcarduserDescUnionID := wxcarduserFields[7].Descriptor()
  1066. // wxcarduser.DefaultUnionID holds the default value on creation for the union_id field.
  1067. wxcarduser.DefaultUnionID = wxcarduserDescUnionID.Default.(string)
  1068. // wxcarduserDescSessionKey is the schema descriptor for session_key field.
  1069. wxcarduserDescSessionKey := wxcarduserFields[8].Descriptor()
  1070. // wxcarduser.DefaultSessionKey holds the default value on creation for the session_key field.
  1071. wxcarduser.DefaultSessionKey = wxcarduserDescSessionKey.Default.(string)
  1072. // wxcarduserDescIsVip is the schema descriptor for is_vip field.
  1073. wxcarduserDescIsVip := wxcarduserFields[9].Descriptor()
  1074. // wxcarduser.DefaultIsVip holds the default value on creation for the is_vip field.
  1075. wxcarduser.DefaultIsVip = wxcarduserDescIsVip.Default.(int)
  1076. wxcardvisitMixin := schema.WxCardVisit{}.Mixin()
  1077. wxcardvisitMixinHooks1 := wxcardvisitMixin[1].Hooks()
  1078. wxcardvisit.Hooks[0] = wxcardvisitMixinHooks1[0]
  1079. wxcardvisitMixinInters1 := wxcardvisitMixin[1].Interceptors()
  1080. wxcardvisit.Interceptors[0] = wxcardvisitMixinInters1[0]
  1081. wxcardvisitMixinFields0 := wxcardvisitMixin[0].Fields()
  1082. _ = wxcardvisitMixinFields0
  1083. wxcardvisitFields := schema.WxCardVisit{}.Fields()
  1084. _ = wxcardvisitFields
  1085. // wxcardvisitDescCreatedAt is the schema descriptor for created_at field.
  1086. wxcardvisitDescCreatedAt := wxcardvisitMixinFields0[1].Descriptor()
  1087. // wxcardvisit.DefaultCreatedAt holds the default value on creation for the created_at field.
  1088. wxcardvisit.DefaultCreatedAt = wxcardvisitDescCreatedAt.Default.(func() time.Time)
  1089. // wxcardvisitDescUpdatedAt is the schema descriptor for updated_at field.
  1090. wxcardvisitDescUpdatedAt := wxcardvisitMixinFields0[2].Descriptor()
  1091. // wxcardvisit.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1092. wxcardvisit.DefaultUpdatedAt = wxcardvisitDescUpdatedAt.Default.(func() time.Time)
  1093. // wxcardvisit.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1094. wxcardvisit.UpdateDefaultUpdatedAt = wxcardvisitDescUpdatedAt.UpdateDefault.(func() time.Time)
  1095. // wxcardvisitDescUserID is the schema descriptor for user_id field.
  1096. wxcardvisitDescUserID := wxcardvisitFields[0].Descriptor()
  1097. // wxcardvisit.DefaultUserID holds the default value on creation for the user_id field.
  1098. wxcardvisit.DefaultUserID = wxcardvisitDescUserID.Default.(uint64)
  1099. // wxcardvisitDescBotID is the schema descriptor for bot_id field.
  1100. wxcardvisitDescBotID := wxcardvisitFields[1].Descriptor()
  1101. // wxcardvisit.DefaultBotID holds the default value on creation for the bot_id field.
  1102. wxcardvisit.DefaultBotID = wxcardvisitDescBotID.Default.(uint64)
  1103. // wxcardvisitDescBotType is the schema descriptor for bot_type field.
  1104. wxcardvisitDescBotType := wxcardvisitFields[2].Descriptor()
  1105. // wxcardvisit.DefaultBotType holds the default value on creation for the bot_type field.
  1106. wxcardvisit.DefaultBotType = wxcardvisitDescBotType.Default.(uint8)
  1107. }
  1108. const (
  1109. Version = "v0.13.1" // Version of ent codegen.
  1110. Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
  1111. )