runtime.go 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451
  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/aliyunavatar"
  8. "wechat-api/ent/batchmsg"
  9. "wechat-api/ent/category"
  10. "wechat-api/ent/chatrecords"
  11. "wechat-api/ent/chatsession"
  12. "wechat-api/ent/contact"
  13. "wechat-api/ent/employee"
  14. "wechat-api/ent/employeeconfig"
  15. "wechat-api/ent/label"
  16. "wechat-api/ent/labelrelationship"
  17. "wechat-api/ent/labeltagging"
  18. "wechat-api/ent/message"
  19. "wechat-api/ent/messagerecords"
  20. "wechat-api/ent/msg"
  21. "wechat-api/ent/schema"
  22. "wechat-api/ent/server"
  23. "wechat-api/ent/sopnode"
  24. "wechat-api/ent/sopstage"
  25. "wechat-api/ent/soptask"
  26. "wechat-api/ent/token"
  27. "wechat-api/ent/tutorial"
  28. "wechat-api/ent/usagedetail"
  29. "wechat-api/ent/usagestatisticday"
  30. "wechat-api/ent/usagestatistichour"
  31. "wechat-api/ent/usagestatisticmonth"
  32. "wechat-api/ent/usagetotal"
  33. "wechat-api/ent/workexperience"
  34. "wechat-api/ent/wpchatroom"
  35. "wechat-api/ent/wpchatroommember"
  36. "wechat-api/ent/wx"
  37. "wechat-api/ent/wxcard"
  38. "wechat-api/ent/wxcarduser"
  39. "wechat-api/ent/wxcardvisit"
  40. )
  41. // The init function reads all schema descriptors with runtime code
  42. // (default values, validators, hooks and policies) and stitches it
  43. // to their package variables.
  44. func init() {
  45. agentMixin := schema.Agent{}.Mixin()
  46. agentMixinHooks1 := agentMixin[1].Hooks()
  47. agent.Hooks[0] = agentMixinHooks1[0]
  48. agentMixinInters1 := agentMixin[1].Interceptors()
  49. agent.Interceptors[0] = agentMixinInters1[0]
  50. agentMixinFields0 := agentMixin[0].Fields()
  51. _ = agentMixinFields0
  52. agentFields := schema.Agent{}.Fields()
  53. _ = agentFields
  54. // agentDescCreatedAt is the schema descriptor for created_at field.
  55. agentDescCreatedAt := agentMixinFields0[1].Descriptor()
  56. // agent.DefaultCreatedAt holds the default value on creation for the created_at field.
  57. agent.DefaultCreatedAt = agentDescCreatedAt.Default.(func() time.Time)
  58. // agentDescUpdatedAt is the schema descriptor for updated_at field.
  59. agentDescUpdatedAt := agentMixinFields0[2].Descriptor()
  60. // agent.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  61. agent.DefaultUpdatedAt = agentDescUpdatedAt.Default.(func() time.Time)
  62. // agent.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  63. agent.UpdateDefaultUpdatedAt = agentDescUpdatedAt.UpdateDefault.(func() time.Time)
  64. // agentDescName is the schema descriptor for name field.
  65. agentDescName := agentFields[0].Descriptor()
  66. // agent.NameValidator is a validator for the "name" field. It is called by the builders before save.
  67. agent.NameValidator = agentDescName.Validators[0].(func(string) error)
  68. // agentDescStatus is the schema descriptor for status field.
  69. agentDescStatus := agentFields[2].Descriptor()
  70. // agent.DefaultStatus holds the default value on creation for the status field.
  71. agent.DefaultStatus = agentDescStatus.Default.(int)
  72. // agent.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  73. agent.StatusValidator = agentDescStatus.Validators[0].(func(int) error)
  74. // agentDescBackground is the schema descriptor for background field.
  75. agentDescBackground := agentFields[3].Descriptor()
  76. // agent.DefaultBackground holds the default value on creation for the background field.
  77. agent.DefaultBackground = agentDescBackground.Default.(string)
  78. // agentDescExamples is the schema descriptor for examples field.
  79. agentDescExamples := agentFields[4].Descriptor()
  80. // agent.DefaultExamples holds the default value on creation for the examples field.
  81. agent.DefaultExamples = agentDescExamples.Default.(string)
  82. // agentDescOrganizationID is the schema descriptor for organization_id field.
  83. agentDescOrganizationID := agentFields[5].Descriptor()
  84. // agent.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  85. agent.OrganizationIDValidator = agentDescOrganizationID.Validators[0].(func(uint64) error)
  86. // agentDescDatasetID is the schema descriptor for dataset_id field.
  87. agentDescDatasetID := agentFields[6].Descriptor()
  88. // agent.DefaultDatasetID holds the default value on creation for the dataset_id field.
  89. agent.DefaultDatasetID = agentDescDatasetID.Default.(string)
  90. // agent.DatasetIDValidator is a validator for the "dataset_id" field. It is called by the builders before save.
  91. agent.DatasetIDValidator = agentDescDatasetID.Validators[0].(func(string) error)
  92. // agentDescCollectionID is the schema descriptor for collection_id field.
  93. agentDescCollectionID := agentFields[7].Descriptor()
  94. // agent.DefaultCollectionID holds the default value on creation for the collection_id field.
  95. agent.DefaultCollectionID = agentDescCollectionID.Default.(string)
  96. // agent.CollectionIDValidator is a validator for the "collection_id" field. It is called by the builders before save.
  97. agent.CollectionIDValidator = agentDescCollectionID.Validators[0].(func(string) error)
  98. agentbaseFields := schema.AgentBase{}.Fields()
  99. _ = agentbaseFields
  100. // agentbaseDescQ is the schema descriptor for q field.
  101. agentbaseDescQ := agentbaseFields[1].Descriptor()
  102. // agentbase.DefaultQ holds the default value on creation for the q field.
  103. agentbase.DefaultQ = agentbaseDescQ.Default.(string)
  104. // agentbaseDescA is the schema descriptor for a field.
  105. agentbaseDescA := agentbaseFields[2].Descriptor()
  106. // agentbase.DefaultA holds the default value on creation for the a field.
  107. agentbase.DefaultA = agentbaseDescA.Default.(string)
  108. // agentbaseDescChunkIndex is the schema descriptor for chunk_index field.
  109. agentbaseDescChunkIndex := agentbaseFields[3].Descriptor()
  110. // agentbase.ChunkIndexValidator is a validator for the "chunk_index" field. It is called by the builders before save.
  111. agentbase.ChunkIndexValidator = agentbaseDescChunkIndex.Validators[0].(func(uint64) error)
  112. // agentbaseDescDatasetID is the schema descriptor for dataset_id field.
  113. agentbaseDescDatasetID := agentbaseFields[5].Descriptor()
  114. // agentbase.DefaultDatasetID holds the default value on creation for the dataset_id field.
  115. agentbase.DefaultDatasetID = agentbaseDescDatasetID.Default.(string)
  116. // agentbaseDescCollectionID is the schema descriptor for collection_id field.
  117. agentbaseDescCollectionID := agentbaseFields[6].Descriptor()
  118. // agentbase.DefaultCollectionID holds the default value on creation for the collection_id field.
  119. agentbase.DefaultCollectionID = agentbaseDescCollectionID.Default.(string)
  120. // agentbaseDescSourceName is the schema descriptor for source_name field.
  121. agentbaseDescSourceName := agentbaseFields[7].Descriptor()
  122. // agentbase.DefaultSourceName holds the default value on creation for the source_name field.
  123. agentbase.DefaultSourceName = agentbaseDescSourceName.Default.(string)
  124. aliyunavatarMixin := schema.AliyunAvatar{}.Mixin()
  125. aliyunavatarMixinHooks1 := aliyunavatarMixin[1].Hooks()
  126. aliyunavatar.Hooks[0] = aliyunavatarMixinHooks1[0]
  127. aliyunavatarMixinInters1 := aliyunavatarMixin[1].Interceptors()
  128. aliyunavatar.Interceptors[0] = aliyunavatarMixinInters1[0]
  129. aliyunavatarMixinFields0 := aliyunavatarMixin[0].Fields()
  130. _ = aliyunavatarMixinFields0
  131. aliyunavatarFields := schema.AliyunAvatar{}.Fields()
  132. _ = aliyunavatarFields
  133. // aliyunavatarDescCreatedAt is the schema descriptor for created_at field.
  134. aliyunavatarDescCreatedAt := aliyunavatarMixinFields0[1].Descriptor()
  135. // aliyunavatar.DefaultCreatedAt holds the default value on creation for the created_at field.
  136. aliyunavatar.DefaultCreatedAt = aliyunavatarDescCreatedAt.Default.(func() time.Time)
  137. // aliyunavatarDescUpdatedAt is the schema descriptor for updated_at field.
  138. aliyunavatarDescUpdatedAt := aliyunavatarMixinFields0[2].Descriptor()
  139. // aliyunavatar.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  140. aliyunavatar.DefaultUpdatedAt = aliyunavatarDescUpdatedAt.Default.(func() time.Time)
  141. // aliyunavatar.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  142. aliyunavatar.UpdateDefaultUpdatedAt = aliyunavatarDescUpdatedAt.UpdateDefault.(func() time.Time)
  143. // aliyunavatarDescToken is the schema descriptor for token field.
  144. aliyunavatarDescToken := aliyunavatarFields[7].Descriptor()
  145. // aliyunavatar.DefaultToken holds the default value on creation for the token field.
  146. aliyunavatar.DefaultToken = aliyunavatarDescToken.Default.(string)
  147. // aliyunavatarDescSessionID is the schema descriptor for session_id field.
  148. aliyunavatarDescSessionID := aliyunavatarFields[8].Descriptor()
  149. // aliyunavatar.DefaultSessionID holds the default value on creation for the session_id field.
  150. aliyunavatar.DefaultSessionID = aliyunavatarDescSessionID.Default.(string)
  151. batchmsgMixin := schema.BatchMsg{}.Mixin()
  152. batchmsgMixinHooks1 := batchmsgMixin[1].Hooks()
  153. batchmsg.Hooks[0] = batchmsgMixinHooks1[0]
  154. batchmsgMixinInters1 := batchmsgMixin[1].Interceptors()
  155. batchmsg.Interceptors[0] = batchmsgMixinInters1[0]
  156. batchmsgMixinFields0 := batchmsgMixin[0].Fields()
  157. _ = batchmsgMixinFields0
  158. batchmsgFields := schema.BatchMsg{}.Fields()
  159. _ = batchmsgFields
  160. // batchmsgDescCreatedAt is the schema descriptor for created_at field.
  161. batchmsgDescCreatedAt := batchmsgMixinFields0[1].Descriptor()
  162. // batchmsg.DefaultCreatedAt holds the default value on creation for the created_at field.
  163. batchmsg.DefaultCreatedAt = batchmsgDescCreatedAt.Default.(func() time.Time)
  164. // batchmsgDescUpdatedAt is the schema descriptor for updated_at field.
  165. batchmsgDescUpdatedAt := batchmsgMixinFields0[2].Descriptor()
  166. // batchmsg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  167. batchmsg.DefaultUpdatedAt = batchmsgDescUpdatedAt.Default.(func() time.Time)
  168. // batchmsg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  169. batchmsg.UpdateDefaultUpdatedAt = batchmsgDescUpdatedAt.UpdateDefault.(func() time.Time)
  170. // batchmsgDescTaskName is the schema descriptor for task_name field.
  171. batchmsgDescTaskName := batchmsgFields[2].Descriptor()
  172. // batchmsg.DefaultTaskName holds the default value on creation for the task_name field.
  173. batchmsg.DefaultTaskName = batchmsgDescTaskName.Default.(string)
  174. // batchmsgDescOrganizationID is the schema descriptor for organization_id field.
  175. batchmsgDescOrganizationID := batchmsgFields[14].Descriptor()
  176. // batchmsg.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  177. batchmsg.OrganizationIDValidator = batchmsgDescOrganizationID.Validators[0].(func(uint64) error)
  178. categoryMixin := schema.Category{}.Mixin()
  179. categoryMixinHooks1 := categoryMixin[1].Hooks()
  180. category.Hooks[0] = categoryMixinHooks1[0]
  181. categoryMixinInters1 := categoryMixin[1].Interceptors()
  182. category.Interceptors[0] = categoryMixinInters1[0]
  183. categoryMixinFields0 := categoryMixin[0].Fields()
  184. _ = categoryMixinFields0
  185. categoryFields := schema.Category{}.Fields()
  186. _ = categoryFields
  187. // categoryDescCreatedAt is the schema descriptor for created_at field.
  188. categoryDescCreatedAt := categoryMixinFields0[1].Descriptor()
  189. // category.DefaultCreatedAt holds the default value on creation for the created_at field.
  190. category.DefaultCreatedAt = categoryDescCreatedAt.Default.(func() time.Time)
  191. // categoryDescUpdatedAt is the schema descriptor for updated_at field.
  192. categoryDescUpdatedAt := categoryMixinFields0[2].Descriptor()
  193. // category.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  194. category.DefaultUpdatedAt = categoryDescUpdatedAt.Default.(func() time.Time)
  195. // category.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  196. category.UpdateDefaultUpdatedAt = categoryDescUpdatedAt.UpdateDefault.(func() time.Time)
  197. // categoryDescName is the schema descriptor for name field.
  198. categoryDescName := categoryFields[0].Descriptor()
  199. // category.NameValidator is a validator for the "name" field. It is called by the builders before save.
  200. category.NameValidator = categoryDescName.Validators[0].(func(string) error)
  201. // categoryDescOrganizationID is the schema descriptor for organization_id field.
  202. categoryDescOrganizationID := categoryFields[1].Descriptor()
  203. // category.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  204. category.OrganizationIDValidator = categoryDescOrganizationID.Validators[0].(func(uint64) error)
  205. chatrecordsMixin := schema.ChatRecords{}.Mixin()
  206. chatrecordsMixinHooks1 := chatrecordsMixin[1].Hooks()
  207. chatrecords.Hooks[0] = chatrecordsMixinHooks1[0]
  208. chatrecordsMixinInters1 := chatrecordsMixin[1].Interceptors()
  209. chatrecords.Interceptors[0] = chatrecordsMixinInters1[0]
  210. chatrecordsMixinFields0 := chatrecordsMixin[0].Fields()
  211. _ = chatrecordsMixinFields0
  212. chatrecordsFields := schema.ChatRecords{}.Fields()
  213. _ = chatrecordsFields
  214. // chatrecordsDescCreatedAt is the schema descriptor for created_at field.
  215. chatrecordsDescCreatedAt := chatrecordsMixinFields0[1].Descriptor()
  216. // chatrecords.DefaultCreatedAt holds the default value on creation for the created_at field.
  217. chatrecords.DefaultCreatedAt = chatrecordsDescCreatedAt.Default.(func() time.Time)
  218. // chatrecordsDescUpdatedAt is the schema descriptor for updated_at field.
  219. chatrecordsDescUpdatedAt := chatrecordsMixinFields0[2].Descriptor()
  220. // chatrecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  221. chatrecords.DefaultUpdatedAt = chatrecordsDescUpdatedAt.Default.(func() time.Time)
  222. // chatrecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  223. chatrecords.UpdateDefaultUpdatedAt = chatrecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
  224. // chatrecordsDescContent is the schema descriptor for content field.
  225. chatrecordsDescContent := chatrecordsFields[0].Descriptor()
  226. // chatrecords.DefaultContent holds the default value on creation for the content field.
  227. chatrecords.DefaultContent = chatrecordsDescContent.Default.(string)
  228. // chatrecordsDescContentType is the schema descriptor for content_type field.
  229. chatrecordsDescContentType := chatrecordsFields[1].Descriptor()
  230. // chatrecords.DefaultContentType holds the default value on creation for the content_type field.
  231. chatrecords.DefaultContentType = chatrecordsDescContentType.Default.(uint8)
  232. // chatrecordsDescSessionID is the schema descriptor for session_id field.
  233. chatrecordsDescSessionID := chatrecordsFields[2].Descriptor()
  234. // chatrecords.DefaultSessionID holds the default value on creation for the session_id field.
  235. chatrecords.DefaultSessionID = chatrecordsDescSessionID.Default.(uint64)
  236. // chatrecordsDescUserID is the schema descriptor for user_id field.
  237. chatrecordsDescUserID := chatrecordsFields[3].Descriptor()
  238. // chatrecords.DefaultUserID holds the default value on creation for the user_id field.
  239. chatrecords.DefaultUserID = chatrecordsDescUserID.Default.(uint64)
  240. // chatrecordsDescBotID is the schema descriptor for bot_id field.
  241. chatrecordsDescBotID := chatrecordsFields[4].Descriptor()
  242. // chatrecords.DefaultBotID holds the default value on creation for the bot_id field.
  243. chatrecords.DefaultBotID = chatrecordsDescBotID.Default.(uint64)
  244. // chatrecordsDescBotType is the schema descriptor for bot_type field.
  245. chatrecordsDescBotType := chatrecordsFields[5].Descriptor()
  246. // chatrecords.DefaultBotType holds the default value on creation for the bot_type field.
  247. chatrecords.DefaultBotType = chatrecordsDescBotType.Default.(uint8)
  248. chatsessionMixin := schema.ChatSession{}.Mixin()
  249. chatsessionMixinHooks1 := chatsessionMixin[1].Hooks()
  250. chatsession.Hooks[0] = chatsessionMixinHooks1[0]
  251. chatsessionMixinInters1 := chatsessionMixin[1].Interceptors()
  252. chatsession.Interceptors[0] = chatsessionMixinInters1[0]
  253. chatsessionMixinFields0 := chatsessionMixin[0].Fields()
  254. _ = chatsessionMixinFields0
  255. chatsessionFields := schema.ChatSession{}.Fields()
  256. _ = chatsessionFields
  257. // chatsessionDescCreatedAt is the schema descriptor for created_at field.
  258. chatsessionDescCreatedAt := chatsessionMixinFields0[1].Descriptor()
  259. // chatsession.DefaultCreatedAt holds the default value on creation for the created_at field.
  260. chatsession.DefaultCreatedAt = chatsessionDescCreatedAt.Default.(func() time.Time)
  261. // chatsessionDescUpdatedAt is the schema descriptor for updated_at field.
  262. chatsessionDescUpdatedAt := chatsessionMixinFields0[2].Descriptor()
  263. // chatsession.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  264. chatsession.DefaultUpdatedAt = chatsessionDescUpdatedAt.Default.(func() time.Time)
  265. // chatsession.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  266. chatsession.UpdateDefaultUpdatedAt = chatsessionDescUpdatedAt.UpdateDefault.(func() time.Time)
  267. // chatsessionDescName is the schema descriptor for name field.
  268. chatsessionDescName := chatsessionFields[0].Descriptor()
  269. // chatsession.DefaultName holds the default value on creation for the name field.
  270. chatsession.DefaultName = chatsessionDescName.Default.(string)
  271. // chatsessionDescUserID is the schema descriptor for user_id field.
  272. chatsessionDescUserID := chatsessionFields[1].Descriptor()
  273. // chatsession.DefaultUserID holds the default value on creation for the user_id field.
  274. chatsession.DefaultUserID = chatsessionDescUserID.Default.(uint64)
  275. // chatsessionDescBotID is the schema descriptor for bot_id field.
  276. chatsessionDescBotID := chatsessionFields[2].Descriptor()
  277. // chatsession.DefaultBotID holds the default value on creation for the bot_id field.
  278. chatsession.DefaultBotID = chatsessionDescBotID.Default.(uint64)
  279. // chatsessionDescBotType is the schema descriptor for bot_type field.
  280. chatsessionDescBotType := chatsessionFields[3].Descriptor()
  281. // chatsession.DefaultBotType holds the default value on creation for the bot_type field.
  282. chatsession.DefaultBotType = chatsessionDescBotType.Default.(uint8)
  283. contactMixin := schema.Contact{}.Mixin()
  284. contactMixinHooks2 := contactMixin[2].Hooks()
  285. contact.Hooks[0] = contactMixinHooks2[0]
  286. contactMixinInters2 := contactMixin[2].Interceptors()
  287. contact.Interceptors[0] = contactMixinInters2[0]
  288. contactMixinFields0 := contactMixin[0].Fields()
  289. _ = contactMixinFields0
  290. contactMixinFields1 := contactMixin[1].Fields()
  291. _ = contactMixinFields1
  292. contactFields := schema.Contact{}.Fields()
  293. _ = contactFields
  294. // contactDescCreatedAt is the schema descriptor for created_at field.
  295. contactDescCreatedAt := contactMixinFields0[1].Descriptor()
  296. // contact.DefaultCreatedAt holds the default value on creation for the created_at field.
  297. contact.DefaultCreatedAt = contactDescCreatedAt.Default.(func() time.Time)
  298. // contactDescUpdatedAt is the schema descriptor for updated_at field.
  299. contactDescUpdatedAt := contactMixinFields0[2].Descriptor()
  300. // contact.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  301. contact.DefaultUpdatedAt = contactDescUpdatedAt.Default.(func() time.Time)
  302. // contact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  303. contact.UpdateDefaultUpdatedAt = contactDescUpdatedAt.UpdateDefault.(func() time.Time)
  304. // contactDescStatus is the schema descriptor for status field.
  305. contactDescStatus := contactMixinFields1[0].Descriptor()
  306. // contact.DefaultStatus holds the default value on creation for the status field.
  307. contact.DefaultStatus = contactDescStatus.Default.(uint8)
  308. // contactDescWxWxid is the schema descriptor for wx_wxid field.
  309. contactDescWxWxid := contactFields[0].Descriptor()
  310. // contact.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  311. contact.DefaultWxWxid = contactDescWxWxid.Default.(string)
  312. // contactDescType is the schema descriptor for type field.
  313. contactDescType := contactFields[1].Descriptor()
  314. // contact.DefaultType holds the default value on creation for the type field.
  315. contact.DefaultType = contactDescType.Default.(int)
  316. // contactDescWxid is the schema descriptor for wxid field.
  317. contactDescWxid := contactFields[2].Descriptor()
  318. // contact.DefaultWxid holds the default value on creation for the wxid field.
  319. contact.DefaultWxid = contactDescWxid.Default.(string)
  320. // contactDescAccount is the schema descriptor for account field.
  321. contactDescAccount := contactFields[3].Descriptor()
  322. // contact.DefaultAccount holds the default value on creation for the account field.
  323. contact.DefaultAccount = contactDescAccount.Default.(string)
  324. // contactDescNickname is the schema descriptor for nickname field.
  325. contactDescNickname := contactFields[4].Descriptor()
  326. // contact.DefaultNickname holds the default value on creation for the nickname field.
  327. contact.DefaultNickname = contactDescNickname.Default.(string)
  328. // contactDescMarkname is the schema descriptor for markname field.
  329. contactDescMarkname := contactFields[5].Descriptor()
  330. // contact.DefaultMarkname holds the default value on creation for the markname field.
  331. contact.DefaultMarkname = contactDescMarkname.Default.(string)
  332. // contactDescHeadimg is the schema descriptor for headimg field.
  333. contactDescHeadimg := contactFields[6].Descriptor()
  334. // contact.DefaultHeadimg holds the default value on creation for the headimg field.
  335. contact.DefaultHeadimg = contactDescHeadimg.Default.(string)
  336. // contactDescSex is the schema descriptor for sex field.
  337. contactDescSex := contactFields[7].Descriptor()
  338. // contact.DefaultSex holds the default value on creation for the sex field.
  339. contact.DefaultSex = contactDescSex.Default.(int)
  340. // contactDescStarrole is the schema descriptor for starrole field.
  341. contactDescStarrole := contactFields[8].Descriptor()
  342. // contact.DefaultStarrole holds the default value on creation for the starrole field.
  343. contact.DefaultStarrole = contactDescStarrole.Default.(string)
  344. // contactDescDontseeit is the schema descriptor for dontseeit field.
  345. contactDescDontseeit := contactFields[9].Descriptor()
  346. // contact.DefaultDontseeit holds the default value on creation for the dontseeit field.
  347. contact.DefaultDontseeit = contactDescDontseeit.Default.(int)
  348. // contactDescDontseeme is the schema descriptor for dontseeme field.
  349. contactDescDontseeme := contactFields[10].Descriptor()
  350. // contact.DefaultDontseeme holds the default value on creation for the dontseeme field.
  351. contact.DefaultDontseeme = contactDescDontseeme.Default.(int)
  352. // contactDescLag is the schema descriptor for lag field.
  353. contactDescLag := contactFields[11].Descriptor()
  354. // contact.DefaultLag holds the default value on creation for the lag field.
  355. contact.DefaultLag = contactDescLag.Default.(string)
  356. // contactDescGid is the schema descriptor for gid field.
  357. contactDescGid := contactFields[12].Descriptor()
  358. // contact.DefaultGid holds the default value on creation for the gid field.
  359. contact.DefaultGid = contactDescGid.Default.(string)
  360. // contactDescGname is the schema descriptor for gname field.
  361. contactDescGname := contactFields[13].Descriptor()
  362. // contact.DefaultGname holds the default value on creation for the gname field.
  363. contact.DefaultGname = contactDescGname.Default.(string)
  364. // contactDescV3 is the schema descriptor for v3 field.
  365. contactDescV3 := contactFields[14].Descriptor()
  366. // contact.DefaultV3 holds the default value on creation for the v3 field.
  367. contact.DefaultV3 = contactDescV3.Default.(string)
  368. // contactDescOrganizationID is the schema descriptor for organization_id field.
  369. contactDescOrganizationID := contactFields[15].Descriptor()
  370. // contact.DefaultOrganizationID holds the default value on creation for the organization_id field.
  371. contact.DefaultOrganizationID = contactDescOrganizationID.Default.(uint64)
  372. employeeMixin := schema.Employee{}.Mixin()
  373. employeeMixinHooks1 := employeeMixin[1].Hooks()
  374. employee.Hooks[0] = employeeMixinHooks1[0]
  375. employeeMixinInters1 := employeeMixin[1].Interceptors()
  376. employee.Interceptors[0] = employeeMixinInters1[0]
  377. employeeMixinFields0 := employeeMixin[0].Fields()
  378. _ = employeeMixinFields0
  379. employeeFields := schema.Employee{}.Fields()
  380. _ = employeeFields
  381. // employeeDescCreatedAt is the schema descriptor for created_at field.
  382. employeeDescCreatedAt := employeeMixinFields0[1].Descriptor()
  383. // employee.DefaultCreatedAt holds the default value on creation for the created_at field.
  384. employee.DefaultCreatedAt = employeeDescCreatedAt.Default.(func() time.Time)
  385. // employeeDescUpdatedAt is the schema descriptor for updated_at field.
  386. employeeDescUpdatedAt := employeeMixinFields0[2].Descriptor()
  387. // employee.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  388. employee.DefaultUpdatedAt = employeeDescUpdatedAt.Default.(func() time.Time)
  389. // employee.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  390. employee.UpdateDefaultUpdatedAt = employeeDescUpdatedAt.UpdateDefault.(func() time.Time)
  391. // employeeDescTitle is the schema descriptor for title field.
  392. employeeDescTitle := employeeFields[0].Descriptor()
  393. // employee.TitleValidator is a validator for the "title" field. It is called by the builders before save.
  394. employee.TitleValidator = employeeDescTitle.Validators[0].(func(string) error)
  395. // employeeDescHireCount is the schema descriptor for hire_count field.
  396. employeeDescHireCount := employeeFields[3].Descriptor()
  397. // employee.DefaultHireCount holds the default value on creation for the hire_count field.
  398. employee.DefaultHireCount = employeeDescHireCount.Default.(int)
  399. // employee.HireCountValidator is a validator for the "hire_count" field. It is called by the builders before save.
  400. employee.HireCountValidator = employeeDescHireCount.Validators[0].(func(int) error)
  401. // employeeDescServiceCount is the schema descriptor for service_count field.
  402. employeeDescServiceCount := employeeFields[4].Descriptor()
  403. // employee.DefaultServiceCount holds the default value on creation for the service_count field.
  404. employee.DefaultServiceCount = employeeDescServiceCount.Default.(int)
  405. // employee.ServiceCountValidator is a validator for the "service_count" field. It is called by the builders before save.
  406. employee.ServiceCountValidator = employeeDescServiceCount.Validators[0].(func(int) error)
  407. // employeeDescAchievementCount is the schema descriptor for achievement_count field.
  408. employeeDescAchievementCount := employeeFields[5].Descriptor()
  409. // employee.DefaultAchievementCount holds the default value on creation for the achievement_count field.
  410. employee.DefaultAchievementCount = employeeDescAchievementCount.Default.(int)
  411. // employee.AchievementCountValidator is a validator for the "achievement_count" field. It is called by the builders before save.
  412. employee.AchievementCountValidator = employeeDescAchievementCount.Validators[0].(func(int) error)
  413. // employeeDescIntro is the schema descriptor for intro field.
  414. employeeDescIntro := employeeFields[6].Descriptor()
  415. // employee.DefaultIntro holds the default value on creation for the intro field.
  416. employee.DefaultIntro = employeeDescIntro.Default.(string)
  417. // employeeDescEstimate is the schema descriptor for estimate field.
  418. employeeDescEstimate := employeeFields[7].Descriptor()
  419. // employee.DefaultEstimate holds the default value on creation for the estimate field.
  420. employee.DefaultEstimate = employeeDescEstimate.Default.(string)
  421. // employeeDescSkill is the schema descriptor for skill field.
  422. employeeDescSkill := employeeFields[8].Descriptor()
  423. // employee.DefaultSkill holds the default value on creation for the skill field.
  424. employee.DefaultSkill = employeeDescSkill.Default.(string)
  425. // employeeDescAbilityType is the schema descriptor for ability_type field.
  426. employeeDescAbilityType := employeeFields[9].Descriptor()
  427. // employee.DefaultAbilityType holds the default value on creation for the ability_type field.
  428. employee.DefaultAbilityType = employeeDescAbilityType.Default.(string)
  429. // employeeDescScene is the schema descriptor for scene field.
  430. employeeDescScene := employeeFields[10].Descriptor()
  431. // employee.DefaultScene holds the default value on creation for the scene field.
  432. employee.DefaultScene = employeeDescScene.Default.(string)
  433. // employeeDescSwitchIn is the schema descriptor for switch_in field.
  434. employeeDescSwitchIn := employeeFields[11].Descriptor()
  435. // employee.DefaultSwitchIn holds the default value on creation for the switch_in field.
  436. employee.DefaultSwitchIn = employeeDescSwitchIn.Default.(string)
  437. // employeeDescVideoURL is the schema descriptor for video_url field.
  438. employeeDescVideoURL := employeeFields[12].Descriptor()
  439. // employee.DefaultVideoURL holds the default value on creation for the video_url field.
  440. employee.DefaultVideoURL = employeeDescVideoURL.Default.(string)
  441. // employeeDescOrganizationID is the schema descriptor for organization_id field.
  442. employeeDescOrganizationID := employeeFields[13].Descriptor()
  443. // employee.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  444. employee.OrganizationIDValidator = employeeDescOrganizationID.Validators[0].(func(uint64) error)
  445. // employeeDescCategoryID is the schema descriptor for category_id field.
  446. employeeDescCategoryID := employeeFields[14].Descriptor()
  447. // employee.CategoryIDValidator is a validator for the "category_id" field. It is called by the builders before save.
  448. employee.CategoryIDValidator = employeeDescCategoryID.Validators[0].(func(uint64) error)
  449. // employeeDescAPIBase is the schema descriptor for api_base field.
  450. employeeDescAPIBase := employeeFields[15].Descriptor()
  451. // employee.DefaultAPIBase holds the default value on creation for the api_base field.
  452. employee.DefaultAPIBase = employeeDescAPIBase.Default.(string)
  453. // employeeDescAPIKey is the schema descriptor for api_key field.
  454. employeeDescAPIKey := employeeFields[16].Descriptor()
  455. // employee.DefaultAPIKey holds the default value on creation for the api_key field.
  456. employee.DefaultAPIKey = employeeDescAPIKey.Default.(string)
  457. // employeeDescIsVip is the schema descriptor for is_vip field.
  458. employeeDescIsVip := employeeFields[18].Descriptor()
  459. // employee.DefaultIsVip holds the default value on creation for the is_vip field.
  460. employee.DefaultIsVip = employeeDescIsVip.Default.(int)
  461. employeeconfigMixin := schema.EmployeeConfig{}.Mixin()
  462. employeeconfigMixinHooks1 := employeeconfigMixin[1].Hooks()
  463. employeeconfig.Hooks[0] = employeeconfigMixinHooks1[0]
  464. employeeconfigMixinInters1 := employeeconfigMixin[1].Interceptors()
  465. employeeconfig.Interceptors[0] = employeeconfigMixinInters1[0]
  466. employeeconfigMixinFields0 := employeeconfigMixin[0].Fields()
  467. _ = employeeconfigMixinFields0
  468. employeeconfigFields := schema.EmployeeConfig{}.Fields()
  469. _ = employeeconfigFields
  470. // employeeconfigDescCreatedAt is the schema descriptor for created_at field.
  471. employeeconfigDescCreatedAt := employeeconfigMixinFields0[1].Descriptor()
  472. // employeeconfig.DefaultCreatedAt holds the default value on creation for the created_at field.
  473. employeeconfig.DefaultCreatedAt = employeeconfigDescCreatedAt.Default.(func() time.Time)
  474. // employeeconfigDescUpdatedAt is the schema descriptor for updated_at field.
  475. employeeconfigDescUpdatedAt := employeeconfigMixinFields0[2].Descriptor()
  476. // employeeconfig.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  477. employeeconfig.DefaultUpdatedAt = employeeconfigDescUpdatedAt.Default.(func() time.Time)
  478. // employeeconfig.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  479. employeeconfig.UpdateDefaultUpdatedAt = employeeconfigDescUpdatedAt.UpdateDefault.(func() time.Time)
  480. // employeeconfigDescStype is the schema descriptor for stype field.
  481. employeeconfigDescStype := employeeconfigFields[0].Descriptor()
  482. // employeeconfig.DefaultStype holds the default value on creation for the stype field.
  483. employeeconfig.DefaultStype = employeeconfigDescStype.Default.(string)
  484. // employeeconfigDescTitle is the schema descriptor for title field.
  485. employeeconfigDescTitle := employeeconfigFields[1].Descriptor()
  486. // employeeconfig.DefaultTitle holds the default value on creation for the title field.
  487. employeeconfig.DefaultTitle = employeeconfigDescTitle.Default.(string)
  488. // employeeconfigDescPhoto is the schema descriptor for photo field.
  489. employeeconfigDescPhoto := employeeconfigFields[2].Descriptor()
  490. // employeeconfig.DefaultPhoto holds the default value on creation for the photo field.
  491. employeeconfig.DefaultPhoto = employeeconfigDescPhoto.Default.(string)
  492. // employeeconfigDescOrganizationID is the schema descriptor for organization_id field.
  493. employeeconfigDescOrganizationID := employeeconfigFields[3].Descriptor()
  494. // employeeconfig.DefaultOrganizationID holds the default value on creation for the organization_id field.
  495. employeeconfig.DefaultOrganizationID = employeeconfigDescOrganizationID.Default.(uint64)
  496. labelMixin := schema.Label{}.Mixin()
  497. labelMixinFields0 := labelMixin[0].Fields()
  498. _ = labelMixinFields0
  499. labelMixinFields1 := labelMixin[1].Fields()
  500. _ = labelMixinFields1
  501. labelFields := schema.Label{}.Fields()
  502. _ = labelFields
  503. // labelDescCreatedAt is the schema descriptor for created_at field.
  504. labelDescCreatedAt := labelMixinFields0[1].Descriptor()
  505. // label.DefaultCreatedAt holds the default value on creation for the created_at field.
  506. label.DefaultCreatedAt = labelDescCreatedAt.Default.(func() time.Time)
  507. // labelDescUpdatedAt is the schema descriptor for updated_at field.
  508. labelDescUpdatedAt := labelMixinFields0[2].Descriptor()
  509. // label.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  510. label.DefaultUpdatedAt = labelDescUpdatedAt.Default.(func() time.Time)
  511. // label.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  512. label.UpdateDefaultUpdatedAt = labelDescUpdatedAt.UpdateDefault.(func() time.Time)
  513. // labelDescStatus is the schema descriptor for status field.
  514. labelDescStatus := labelMixinFields1[0].Descriptor()
  515. // label.DefaultStatus holds the default value on creation for the status field.
  516. label.DefaultStatus = labelDescStatus.Default.(uint8)
  517. // labelDescType is the schema descriptor for type field.
  518. labelDescType := labelFields[0].Descriptor()
  519. // label.DefaultType holds the default value on creation for the type field.
  520. label.DefaultType = labelDescType.Default.(int)
  521. // labelDescName is the schema descriptor for name field.
  522. labelDescName := labelFields[1].Descriptor()
  523. // label.DefaultName holds the default value on creation for the name field.
  524. label.DefaultName = labelDescName.Default.(string)
  525. // labelDescFrom is the schema descriptor for from field.
  526. labelDescFrom := labelFields[2].Descriptor()
  527. // label.DefaultFrom holds the default value on creation for the from field.
  528. label.DefaultFrom = labelDescFrom.Default.(int)
  529. // labelDescMode is the schema descriptor for mode field.
  530. labelDescMode := labelFields[3].Descriptor()
  531. // label.DefaultMode holds the default value on creation for the mode field.
  532. label.DefaultMode = labelDescMode.Default.(int)
  533. // labelDescConditions is the schema descriptor for conditions field.
  534. labelDescConditions := labelFields[4].Descriptor()
  535. // label.DefaultConditions holds the default value on creation for the conditions field.
  536. label.DefaultConditions = labelDescConditions.Default.(string)
  537. // labelDescOrganizationID is the schema descriptor for organization_id field.
  538. labelDescOrganizationID := labelFields[5].Descriptor()
  539. // label.DefaultOrganizationID holds the default value on creation for the organization_id field.
  540. label.DefaultOrganizationID = labelDescOrganizationID.Default.(uint64)
  541. labelrelationshipMixin := schema.LabelRelationship{}.Mixin()
  542. labelrelationshipMixinHooks2 := labelrelationshipMixin[2].Hooks()
  543. labelrelationship.Hooks[0] = labelrelationshipMixinHooks2[0]
  544. labelrelationshipMixinInters2 := labelrelationshipMixin[2].Interceptors()
  545. labelrelationship.Interceptors[0] = labelrelationshipMixinInters2[0]
  546. labelrelationshipMixinFields0 := labelrelationshipMixin[0].Fields()
  547. _ = labelrelationshipMixinFields0
  548. labelrelationshipMixinFields1 := labelrelationshipMixin[1].Fields()
  549. _ = labelrelationshipMixinFields1
  550. labelrelationshipFields := schema.LabelRelationship{}.Fields()
  551. _ = labelrelationshipFields
  552. // labelrelationshipDescCreatedAt is the schema descriptor for created_at field.
  553. labelrelationshipDescCreatedAt := labelrelationshipMixinFields0[1].Descriptor()
  554. // labelrelationship.DefaultCreatedAt holds the default value on creation for the created_at field.
  555. labelrelationship.DefaultCreatedAt = labelrelationshipDescCreatedAt.Default.(func() time.Time)
  556. // labelrelationshipDescUpdatedAt is the schema descriptor for updated_at field.
  557. labelrelationshipDescUpdatedAt := labelrelationshipMixinFields0[2].Descriptor()
  558. // labelrelationship.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  559. labelrelationship.DefaultUpdatedAt = labelrelationshipDescUpdatedAt.Default.(func() time.Time)
  560. // labelrelationship.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  561. labelrelationship.UpdateDefaultUpdatedAt = labelrelationshipDescUpdatedAt.UpdateDefault.(func() time.Time)
  562. // labelrelationshipDescStatus is the schema descriptor for status field.
  563. labelrelationshipDescStatus := labelrelationshipMixinFields1[0].Descriptor()
  564. // labelrelationship.DefaultStatus holds the default value on creation for the status field.
  565. labelrelationship.DefaultStatus = labelrelationshipDescStatus.Default.(uint8)
  566. // labelrelationshipDescLabelID is the schema descriptor for label_id field.
  567. labelrelationshipDescLabelID := labelrelationshipFields[0].Descriptor()
  568. // labelrelationship.DefaultLabelID holds the default value on creation for the label_id field.
  569. labelrelationship.DefaultLabelID = labelrelationshipDescLabelID.Default.(uint64)
  570. // labelrelationshipDescContactID is the schema descriptor for contact_id field.
  571. labelrelationshipDescContactID := labelrelationshipFields[1].Descriptor()
  572. // labelrelationship.DefaultContactID holds the default value on creation for the contact_id field.
  573. labelrelationship.DefaultContactID = labelrelationshipDescContactID.Default.(uint64)
  574. // labelrelationshipDescOrganizationID is the schema descriptor for organization_id field.
  575. labelrelationshipDescOrganizationID := labelrelationshipFields[2].Descriptor()
  576. // labelrelationship.DefaultOrganizationID holds the default value on creation for the organization_id field.
  577. labelrelationship.DefaultOrganizationID = labelrelationshipDescOrganizationID.Default.(uint64)
  578. labeltaggingMixin := schema.LabelTagging{}.Mixin()
  579. labeltaggingMixinHooks2 := labeltaggingMixin[2].Hooks()
  580. labeltagging.Hooks[0] = labeltaggingMixinHooks2[0]
  581. labeltaggingMixinInters2 := labeltaggingMixin[2].Interceptors()
  582. labeltagging.Interceptors[0] = labeltaggingMixinInters2[0]
  583. labeltaggingMixinFields0 := labeltaggingMixin[0].Fields()
  584. _ = labeltaggingMixinFields0
  585. labeltaggingMixinFields1 := labeltaggingMixin[1].Fields()
  586. _ = labeltaggingMixinFields1
  587. labeltaggingFields := schema.LabelTagging{}.Fields()
  588. _ = labeltaggingFields
  589. // labeltaggingDescCreatedAt is the schema descriptor for created_at field.
  590. labeltaggingDescCreatedAt := labeltaggingMixinFields0[1].Descriptor()
  591. // labeltagging.DefaultCreatedAt holds the default value on creation for the created_at field.
  592. labeltagging.DefaultCreatedAt = labeltaggingDescCreatedAt.Default.(func() time.Time)
  593. // labeltaggingDescUpdatedAt is the schema descriptor for updated_at field.
  594. labeltaggingDescUpdatedAt := labeltaggingMixinFields0[2].Descriptor()
  595. // labeltagging.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  596. labeltagging.DefaultUpdatedAt = labeltaggingDescUpdatedAt.Default.(func() time.Time)
  597. // labeltagging.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  598. labeltagging.UpdateDefaultUpdatedAt = labeltaggingDescUpdatedAt.UpdateDefault.(func() time.Time)
  599. // labeltaggingDescStatus is the schema descriptor for status field.
  600. labeltaggingDescStatus := labeltaggingMixinFields1[0].Descriptor()
  601. // labeltagging.DefaultStatus holds the default value on creation for the status field.
  602. labeltagging.DefaultStatus = labeltaggingDescStatus.Default.(uint8)
  603. // labeltaggingDescOrganizationID is the schema descriptor for organization_id field.
  604. labeltaggingDescOrganizationID := labeltaggingFields[0].Descriptor()
  605. // labeltagging.DefaultOrganizationID holds the default value on creation for the organization_id field.
  606. labeltagging.DefaultOrganizationID = labeltaggingDescOrganizationID.Default.(uint64)
  607. // labeltaggingDescType is the schema descriptor for type field.
  608. labeltaggingDescType := labeltaggingFields[1].Descriptor()
  609. // labeltagging.DefaultType holds the default value on creation for the type field.
  610. labeltagging.DefaultType = labeltaggingDescType.Default.(int)
  611. // labeltaggingDescConditions is the schema descriptor for conditions field.
  612. labeltaggingDescConditions := labeltaggingFields[2].Descriptor()
  613. // labeltagging.DefaultConditions holds the default value on creation for the conditions field.
  614. labeltagging.DefaultConditions = labeltaggingDescConditions.Default.(string)
  615. messageFields := schema.Message{}.Fields()
  616. _ = messageFields
  617. // messageDescWxWxid is the schema descriptor for wx_wxid field.
  618. messageDescWxWxid := messageFields[0].Descriptor()
  619. // message.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  620. message.DefaultWxWxid = messageDescWxWxid.Default.(string)
  621. // messageDescWxid is the schema descriptor for wxid field.
  622. messageDescWxid := messageFields[1].Descriptor()
  623. // message.DefaultWxid holds the default value on creation for the wxid field.
  624. message.DefaultWxid = messageDescWxid.Default.(string)
  625. // messageDescContent is the schema descriptor for content field.
  626. messageDescContent := messageFields[2].Descriptor()
  627. // message.DefaultContent holds the default value on creation for the content field.
  628. message.DefaultContent = messageDescContent.Default.(string)
  629. messagerecordsMixin := schema.MessageRecords{}.Mixin()
  630. messagerecordsMixinFields0 := messagerecordsMixin[0].Fields()
  631. _ = messagerecordsMixinFields0
  632. messagerecordsMixinFields1 := messagerecordsMixin[1].Fields()
  633. _ = messagerecordsMixinFields1
  634. messagerecordsFields := schema.MessageRecords{}.Fields()
  635. _ = messagerecordsFields
  636. // messagerecordsDescCreatedAt is the schema descriptor for created_at field.
  637. messagerecordsDescCreatedAt := messagerecordsMixinFields0[1].Descriptor()
  638. // messagerecords.DefaultCreatedAt holds the default value on creation for the created_at field.
  639. messagerecords.DefaultCreatedAt = messagerecordsDescCreatedAt.Default.(func() time.Time)
  640. // messagerecordsDescUpdatedAt is the schema descriptor for updated_at field.
  641. messagerecordsDescUpdatedAt := messagerecordsMixinFields0[2].Descriptor()
  642. // messagerecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  643. messagerecords.DefaultUpdatedAt = messagerecordsDescUpdatedAt.Default.(func() time.Time)
  644. // messagerecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  645. messagerecords.UpdateDefaultUpdatedAt = messagerecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
  646. // messagerecordsDescStatus is the schema descriptor for status field.
  647. messagerecordsDescStatus := messagerecordsMixinFields1[0].Descriptor()
  648. // messagerecords.DefaultStatus holds the default value on creation for the status field.
  649. messagerecords.DefaultStatus = messagerecordsDescStatus.Default.(uint8)
  650. // messagerecordsDescContactType is the schema descriptor for contact_type field.
  651. messagerecordsDescContactType := messagerecordsFields[2].Descriptor()
  652. // messagerecords.DefaultContactType holds the default value on creation for the contact_type field.
  653. messagerecords.DefaultContactType = messagerecordsDescContactType.Default.(int)
  654. // messagerecordsDescContactWxid is the schema descriptor for contact_wxid field.
  655. messagerecordsDescContactWxid := messagerecordsFields[3].Descriptor()
  656. // messagerecords.DefaultContactWxid holds the default value on creation for the contact_wxid field.
  657. messagerecords.DefaultContactWxid = messagerecordsDescContactWxid.Default.(string)
  658. // messagerecordsDescContentType is the schema descriptor for content_type field.
  659. messagerecordsDescContentType := messagerecordsFields[4].Descriptor()
  660. // messagerecords.DefaultContentType holds the default value on creation for the content_type field.
  661. messagerecords.DefaultContentType = messagerecordsDescContentType.Default.(int)
  662. // messagerecordsDescContent is the schema descriptor for content field.
  663. messagerecordsDescContent := messagerecordsFields[5].Descriptor()
  664. // messagerecords.DefaultContent holds the default value on creation for the content field.
  665. messagerecords.DefaultContent = messagerecordsDescContent.Default.(string)
  666. // messagerecordsDescErrorDetail is the schema descriptor for error_detail field.
  667. messagerecordsDescErrorDetail := messagerecordsFields[7].Descriptor()
  668. // messagerecords.DefaultErrorDetail holds the default value on creation for the error_detail field.
  669. messagerecords.DefaultErrorDetail = messagerecordsDescErrorDetail.Default.(string)
  670. // messagerecordsDescSourceType is the schema descriptor for source_type field.
  671. messagerecordsDescSourceType := messagerecordsFields[9].Descriptor()
  672. // messagerecords.DefaultSourceType holds the default value on creation for the source_type field.
  673. messagerecords.DefaultSourceType = messagerecordsDescSourceType.Default.(int)
  674. // messagerecordsDescSourceID is the schema descriptor for source_id field.
  675. messagerecordsDescSourceID := messagerecordsFields[10].Descriptor()
  676. // messagerecords.DefaultSourceID holds the default value on creation for the source_id field.
  677. messagerecords.DefaultSourceID = messagerecordsDescSourceID.Default.(uint64)
  678. // messagerecordsDescSubSourceID is the schema descriptor for sub_source_id field.
  679. messagerecordsDescSubSourceID := messagerecordsFields[11].Descriptor()
  680. // messagerecords.DefaultSubSourceID holds the default value on creation for the sub_source_id field.
  681. messagerecords.DefaultSubSourceID = messagerecordsDescSubSourceID.Default.(uint64)
  682. // messagerecordsDescOrganizationID is the schema descriptor for organization_id field.
  683. messagerecordsDescOrganizationID := messagerecordsFields[12].Descriptor()
  684. // messagerecords.DefaultOrganizationID holds the default value on creation for the organization_id field.
  685. messagerecords.DefaultOrganizationID = messagerecordsDescOrganizationID.Default.(uint64)
  686. msgMixin := schema.Msg{}.Mixin()
  687. msgMixinHooks1 := msgMixin[1].Hooks()
  688. msg.Hooks[0] = msgMixinHooks1[0]
  689. msgMixinInters1 := msgMixin[1].Interceptors()
  690. msg.Interceptors[0] = msgMixinInters1[0]
  691. msgMixinFields0 := msgMixin[0].Fields()
  692. _ = msgMixinFields0
  693. msgFields := schema.Msg{}.Fields()
  694. _ = msgFields
  695. // msgDescCreatedAt is the schema descriptor for created_at field.
  696. msgDescCreatedAt := msgMixinFields0[1].Descriptor()
  697. // msg.DefaultCreatedAt holds the default value on creation for the created_at field.
  698. msg.DefaultCreatedAt = msgDescCreatedAt.Default.(func() time.Time)
  699. // msgDescUpdatedAt is the schema descriptor for updated_at field.
  700. msgDescUpdatedAt := msgMixinFields0[2].Descriptor()
  701. // msg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  702. msg.DefaultUpdatedAt = msgDescUpdatedAt.Default.(func() time.Time)
  703. // msg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  704. msg.UpdateDefaultUpdatedAt = msgDescUpdatedAt.UpdateDefault.(func() time.Time)
  705. serverMixin := schema.Server{}.Mixin()
  706. serverMixinHooks2 := serverMixin[2].Hooks()
  707. server.Hooks[0] = serverMixinHooks2[0]
  708. serverMixinInters2 := serverMixin[2].Interceptors()
  709. server.Interceptors[0] = serverMixinInters2[0]
  710. serverMixinFields0 := serverMixin[0].Fields()
  711. _ = serverMixinFields0
  712. serverMixinFields1 := serverMixin[1].Fields()
  713. _ = serverMixinFields1
  714. serverFields := schema.Server{}.Fields()
  715. _ = serverFields
  716. // serverDescCreatedAt is the schema descriptor for created_at field.
  717. serverDescCreatedAt := serverMixinFields0[1].Descriptor()
  718. // server.DefaultCreatedAt holds the default value on creation for the created_at field.
  719. server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
  720. // serverDescUpdatedAt is the schema descriptor for updated_at field.
  721. serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
  722. // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  723. server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
  724. // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  725. server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
  726. // serverDescStatus is the schema descriptor for status field.
  727. serverDescStatus := serverMixinFields1[0].Descriptor()
  728. // server.DefaultStatus holds the default value on creation for the status field.
  729. server.DefaultStatus = serverDescStatus.Default.(uint8)
  730. sopnodeMixin := schema.SopNode{}.Mixin()
  731. sopnodeMixinHooks2 := sopnodeMixin[2].Hooks()
  732. sopnode.Hooks[0] = sopnodeMixinHooks2[0]
  733. sopnodeMixinInters2 := sopnodeMixin[2].Interceptors()
  734. sopnode.Interceptors[0] = sopnodeMixinInters2[0]
  735. sopnodeMixinFields0 := sopnodeMixin[0].Fields()
  736. _ = sopnodeMixinFields0
  737. sopnodeMixinFields1 := sopnodeMixin[1].Fields()
  738. _ = sopnodeMixinFields1
  739. sopnodeFields := schema.SopNode{}.Fields()
  740. _ = sopnodeFields
  741. // sopnodeDescCreatedAt is the schema descriptor for created_at field.
  742. sopnodeDescCreatedAt := sopnodeMixinFields0[1].Descriptor()
  743. // sopnode.DefaultCreatedAt holds the default value on creation for the created_at field.
  744. sopnode.DefaultCreatedAt = sopnodeDescCreatedAt.Default.(func() time.Time)
  745. // sopnodeDescUpdatedAt is the schema descriptor for updated_at field.
  746. sopnodeDescUpdatedAt := sopnodeMixinFields0[2].Descriptor()
  747. // sopnode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  748. sopnode.DefaultUpdatedAt = sopnodeDescUpdatedAt.Default.(func() time.Time)
  749. // sopnode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  750. sopnode.UpdateDefaultUpdatedAt = sopnodeDescUpdatedAt.UpdateDefault.(func() time.Time)
  751. // sopnodeDescStatus is the schema descriptor for status field.
  752. sopnodeDescStatus := sopnodeMixinFields1[0].Descriptor()
  753. // sopnode.DefaultStatus holds the default value on creation for the status field.
  754. sopnode.DefaultStatus = sopnodeDescStatus.Default.(uint8)
  755. // sopnodeDescName is the schema descriptor for name field.
  756. sopnodeDescName := sopnodeFields[2].Descriptor()
  757. // sopnode.DefaultName holds the default value on creation for the name field.
  758. sopnode.DefaultName = sopnodeDescName.Default.(string)
  759. // sopnodeDescConditionType is the schema descriptor for condition_type field.
  760. sopnodeDescConditionType := sopnodeFields[3].Descriptor()
  761. // sopnode.DefaultConditionType holds the default value on creation for the condition_type field.
  762. sopnode.DefaultConditionType = sopnodeDescConditionType.Default.(int)
  763. // sopnodeDescNoReplyCondition is the schema descriptor for no_reply_condition field.
  764. sopnodeDescNoReplyCondition := sopnodeFields[5].Descriptor()
  765. // sopnode.DefaultNoReplyCondition holds the default value on creation for the no_reply_condition field.
  766. sopnode.DefaultNoReplyCondition = sopnodeDescNoReplyCondition.Default.(uint64)
  767. // sopnodeDescNoReplyUnit is the schema descriptor for no_reply_unit field.
  768. sopnodeDescNoReplyUnit := sopnodeFields[6].Descriptor()
  769. // sopnode.DefaultNoReplyUnit holds the default value on creation for the no_reply_unit field.
  770. sopnode.DefaultNoReplyUnit = sopnodeDescNoReplyUnit.Default.(string)
  771. sopstageMixin := schema.SopStage{}.Mixin()
  772. sopstageMixinHooks2 := sopstageMixin[2].Hooks()
  773. sopstage.Hooks[0] = sopstageMixinHooks2[0]
  774. sopstageMixinInters2 := sopstageMixin[2].Interceptors()
  775. sopstage.Interceptors[0] = sopstageMixinInters2[0]
  776. sopstageMixinFields0 := sopstageMixin[0].Fields()
  777. _ = sopstageMixinFields0
  778. sopstageMixinFields1 := sopstageMixin[1].Fields()
  779. _ = sopstageMixinFields1
  780. sopstageFields := schema.SopStage{}.Fields()
  781. _ = sopstageFields
  782. // sopstageDescCreatedAt is the schema descriptor for created_at field.
  783. sopstageDescCreatedAt := sopstageMixinFields0[1].Descriptor()
  784. // sopstage.DefaultCreatedAt holds the default value on creation for the created_at field.
  785. sopstage.DefaultCreatedAt = sopstageDescCreatedAt.Default.(func() time.Time)
  786. // sopstageDescUpdatedAt is the schema descriptor for updated_at field.
  787. sopstageDescUpdatedAt := sopstageMixinFields0[2].Descriptor()
  788. // sopstage.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  789. sopstage.DefaultUpdatedAt = sopstageDescUpdatedAt.Default.(func() time.Time)
  790. // sopstage.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  791. sopstage.UpdateDefaultUpdatedAt = sopstageDescUpdatedAt.UpdateDefault.(func() time.Time)
  792. // sopstageDescStatus is the schema descriptor for status field.
  793. sopstageDescStatus := sopstageMixinFields1[0].Descriptor()
  794. // sopstage.DefaultStatus holds the default value on creation for the status field.
  795. sopstage.DefaultStatus = sopstageDescStatus.Default.(uint8)
  796. // sopstageDescName is the schema descriptor for name field.
  797. sopstageDescName := sopstageFields[1].Descriptor()
  798. // sopstage.DefaultName holds the default value on creation for the name field.
  799. sopstage.DefaultName = sopstageDescName.Default.(string)
  800. // sopstageDescConditionType is the schema descriptor for condition_type field.
  801. sopstageDescConditionType := sopstageFields[2].Descriptor()
  802. // sopstage.DefaultConditionType holds the default value on creation for the condition_type field.
  803. sopstage.DefaultConditionType = sopstageDescConditionType.Default.(int)
  804. // sopstageDescConditionOperator is the schema descriptor for condition_operator field.
  805. sopstageDescConditionOperator := sopstageFields[3].Descriptor()
  806. // sopstage.DefaultConditionOperator holds the default value on creation for the condition_operator field.
  807. sopstage.DefaultConditionOperator = sopstageDescConditionOperator.Default.(int)
  808. // sopstageDescIndexSort is the schema descriptor for index_sort field.
  809. sopstageDescIndexSort := sopstageFields[9].Descriptor()
  810. // sopstage.DefaultIndexSort holds the default value on creation for the index_sort field.
  811. sopstage.DefaultIndexSort = sopstageDescIndexSort.Default.(int)
  812. soptaskMixin := schema.SopTask{}.Mixin()
  813. soptaskMixinHooks2 := soptaskMixin[2].Hooks()
  814. soptask.Hooks[0] = soptaskMixinHooks2[0]
  815. soptaskMixinInters2 := soptaskMixin[2].Interceptors()
  816. soptask.Interceptors[0] = soptaskMixinInters2[0]
  817. soptaskMixinFields0 := soptaskMixin[0].Fields()
  818. _ = soptaskMixinFields0
  819. soptaskMixinFields1 := soptaskMixin[1].Fields()
  820. _ = soptaskMixinFields1
  821. soptaskFields := schema.SopTask{}.Fields()
  822. _ = soptaskFields
  823. // soptaskDescCreatedAt is the schema descriptor for created_at field.
  824. soptaskDescCreatedAt := soptaskMixinFields0[1].Descriptor()
  825. // soptask.DefaultCreatedAt holds the default value on creation for the created_at field.
  826. soptask.DefaultCreatedAt = soptaskDescCreatedAt.Default.(func() time.Time)
  827. // soptaskDescUpdatedAt is the schema descriptor for updated_at field.
  828. soptaskDescUpdatedAt := soptaskMixinFields0[2].Descriptor()
  829. // soptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  830. soptask.DefaultUpdatedAt = soptaskDescUpdatedAt.Default.(func() time.Time)
  831. // soptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  832. soptask.UpdateDefaultUpdatedAt = soptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
  833. // soptaskDescStatus is the schema descriptor for status field.
  834. soptaskDescStatus := soptaskMixinFields1[0].Descriptor()
  835. // soptask.DefaultStatus holds the default value on creation for the status field.
  836. soptask.DefaultStatus = soptaskDescStatus.Default.(uint8)
  837. // soptaskDescName is the schema descriptor for name field.
  838. soptaskDescName := soptaskFields[0].Descriptor()
  839. // soptask.NameValidator is a validator for the "name" field. It is called by the builders before save.
  840. soptask.NameValidator = soptaskDescName.Validators[0].(func(string) error)
  841. // soptaskDescType is the schema descriptor for type field.
  842. soptaskDescType := soptaskFields[2].Descriptor()
  843. // soptask.DefaultType holds the default value on creation for the type field.
  844. soptask.DefaultType = soptaskDescType.Default.(int)
  845. // soptaskDescOrganizationID is the schema descriptor for organization_id field.
  846. soptaskDescOrganizationID := soptaskFields[6].Descriptor()
  847. // soptask.DefaultOrganizationID holds the default value on creation for the organization_id field.
  848. soptask.DefaultOrganizationID = soptaskDescOrganizationID.Default.(uint64)
  849. tokenMixin := schema.Token{}.Mixin()
  850. tokenMixinHooks1 := tokenMixin[1].Hooks()
  851. token.Hooks[0] = tokenMixinHooks1[0]
  852. tokenMixinInters1 := tokenMixin[1].Interceptors()
  853. token.Interceptors[0] = tokenMixinInters1[0]
  854. tokenMixinFields0 := tokenMixin[0].Fields()
  855. _ = tokenMixinFields0
  856. tokenFields := schema.Token{}.Fields()
  857. _ = tokenFields
  858. // tokenDescCreatedAt is the schema descriptor for created_at field.
  859. tokenDescCreatedAt := tokenMixinFields0[1].Descriptor()
  860. // token.DefaultCreatedAt holds the default value on creation for the created_at field.
  861. token.DefaultCreatedAt = tokenDescCreatedAt.Default.(func() time.Time)
  862. // tokenDescUpdatedAt is the schema descriptor for updated_at field.
  863. tokenDescUpdatedAt := tokenMixinFields0[2].Descriptor()
  864. // token.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  865. token.DefaultUpdatedAt = tokenDescUpdatedAt.Default.(func() time.Time)
  866. // token.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  867. token.UpdateDefaultUpdatedAt = tokenDescUpdatedAt.UpdateDefault.(func() time.Time)
  868. // tokenDescToken is the schema descriptor for token field.
  869. tokenDescToken := tokenFields[1].Descriptor()
  870. // token.DefaultToken holds the default value on creation for the token field.
  871. token.DefaultToken = tokenDescToken.Default.(string)
  872. // tokenDescMAC is the schema descriptor for mac field.
  873. tokenDescMAC := tokenFields[2].Descriptor()
  874. // token.DefaultMAC holds the default value on creation for the mac field.
  875. token.DefaultMAC = tokenDescMAC.Default.(string)
  876. // tokenDescOrganizationID is the schema descriptor for organization_id field.
  877. tokenDescOrganizationID := tokenFields[3].Descriptor()
  878. // token.DefaultOrganizationID holds the default value on creation for the organization_id field.
  879. token.DefaultOrganizationID = tokenDescOrganizationID.Default.(uint64)
  880. // tokenDescAgentID is the schema descriptor for agent_id field.
  881. tokenDescAgentID := tokenFields[4].Descriptor()
  882. // token.DefaultAgentID holds the default value on creation for the agent_id field.
  883. token.DefaultAgentID = tokenDescAgentID.Default.(uint64)
  884. // tokenDescCustomAgentBase is the schema descriptor for custom_agent_base field.
  885. tokenDescCustomAgentBase := tokenFields[5].Descriptor()
  886. // token.DefaultCustomAgentBase holds the default value on creation for the custom_agent_base field.
  887. token.DefaultCustomAgentBase = tokenDescCustomAgentBase.Default.(string)
  888. // tokenDescCustomAgentKey is the schema descriptor for custom_agent_key field.
  889. tokenDescCustomAgentKey := tokenFields[6].Descriptor()
  890. // token.DefaultCustomAgentKey holds the default value on creation for the custom_agent_key field.
  891. token.DefaultCustomAgentKey = tokenDescCustomAgentKey.Default.(string)
  892. // tokenDescOpenaiBase is the schema descriptor for openai_base field.
  893. tokenDescOpenaiBase := tokenFields[7].Descriptor()
  894. // token.DefaultOpenaiBase holds the default value on creation for the openai_base field.
  895. token.DefaultOpenaiBase = tokenDescOpenaiBase.Default.(string)
  896. // tokenDescOpenaiKey is the schema descriptor for openai_key field.
  897. tokenDescOpenaiKey := tokenFields[8].Descriptor()
  898. // token.DefaultOpenaiKey holds the default value on creation for the openai_key field.
  899. token.DefaultOpenaiKey = tokenDescOpenaiKey.Default.(string)
  900. tutorialMixin := schema.Tutorial{}.Mixin()
  901. tutorialMixinHooks1 := tutorialMixin[1].Hooks()
  902. tutorial.Hooks[0] = tutorialMixinHooks1[0]
  903. tutorialMixinInters1 := tutorialMixin[1].Interceptors()
  904. tutorial.Interceptors[0] = tutorialMixinInters1[0]
  905. tutorialMixinFields0 := tutorialMixin[0].Fields()
  906. _ = tutorialMixinFields0
  907. tutorialFields := schema.Tutorial{}.Fields()
  908. _ = tutorialFields
  909. // tutorialDescCreatedAt is the schema descriptor for created_at field.
  910. tutorialDescCreatedAt := tutorialMixinFields0[1].Descriptor()
  911. // tutorial.DefaultCreatedAt holds the default value on creation for the created_at field.
  912. tutorial.DefaultCreatedAt = tutorialDescCreatedAt.Default.(func() time.Time)
  913. // tutorialDescUpdatedAt is the schema descriptor for updated_at field.
  914. tutorialDescUpdatedAt := tutorialMixinFields0[2].Descriptor()
  915. // tutorial.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  916. tutorial.DefaultUpdatedAt = tutorialDescUpdatedAt.Default.(func() time.Time)
  917. // tutorial.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  918. tutorial.UpdateDefaultUpdatedAt = tutorialDescUpdatedAt.UpdateDefault.(func() time.Time)
  919. // tutorialDescEmployeeID is the schema descriptor for employee_id field.
  920. tutorialDescEmployeeID := tutorialFields[0].Descriptor()
  921. // tutorial.EmployeeIDValidator is a validator for the "employee_id" field. It is called by the builders before save.
  922. tutorial.EmployeeIDValidator = tutorialDescEmployeeID.Validators[0].(func(uint64) error)
  923. // tutorialDescOrganizationID is the schema descriptor for organization_id field.
  924. tutorialDescOrganizationID := tutorialFields[4].Descriptor()
  925. // tutorial.OrganizationIDValidator is a validator for the "organization_id" field. It is called by the builders before save.
  926. tutorial.OrganizationIDValidator = tutorialDescOrganizationID.Validators[0].(func(uint64) error)
  927. usagedetailMixin := schema.UsageDetail{}.Mixin()
  928. usagedetailMixinFields0 := usagedetailMixin[0].Fields()
  929. _ = usagedetailMixinFields0
  930. usagedetailMixinFields1 := usagedetailMixin[1].Fields()
  931. _ = usagedetailMixinFields1
  932. usagedetailFields := schema.UsageDetail{}.Fields()
  933. _ = usagedetailFields
  934. // usagedetailDescCreatedAt is the schema descriptor for created_at field.
  935. usagedetailDescCreatedAt := usagedetailMixinFields0[1].Descriptor()
  936. // usagedetail.DefaultCreatedAt holds the default value on creation for the created_at field.
  937. usagedetail.DefaultCreatedAt = usagedetailDescCreatedAt.Default.(func() time.Time)
  938. // usagedetailDescUpdatedAt is the schema descriptor for updated_at field.
  939. usagedetailDescUpdatedAt := usagedetailMixinFields0[2].Descriptor()
  940. // usagedetail.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  941. usagedetail.DefaultUpdatedAt = usagedetailDescUpdatedAt.Default.(func() time.Time)
  942. // usagedetail.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  943. usagedetail.UpdateDefaultUpdatedAt = usagedetailDescUpdatedAt.UpdateDefault.(func() time.Time)
  944. // usagedetailDescStatus is the schema descriptor for status field.
  945. usagedetailDescStatus := usagedetailMixinFields1[0].Descriptor()
  946. // usagedetail.DefaultStatus holds the default value on creation for the status field.
  947. usagedetail.DefaultStatus = usagedetailDescStatus.Default.(uint8)
  948. // usagedetailDescType is the schema descriptor for type field.
  949. usagedetailDescType := usagedetailFields[0].Descriptor()
  950. // usagedetail.DefaultType holds the default value on creation for the type field.
  951. usagedetail.DefaultType = usagedetailDescType.Default.(int)
  952. // usagedetailDescBotID is the schema descriptor for bot_id field.
  953. usagedetailDescBotID := usagedetailFields[1].Descriptor()
  954. // usagedetail.DefaultBotID holds the default value on creation for the bot_id field.
  955. usagedetail.DefaultBotID = usagedetailDescBotID.Default.(string)
  956. // usagedetailDescReceiverID is the schema descriptor for receiver_id field.
  957. usagedetailDescReceiverID := usagedetailFields[2].Descriptor()
  958. // usagedetail.DefaultReceiverID holds the default value on creation for the receiver_id field.
  959. usagedetail.DefaultReceiverID = usagedetailDescReceiverID.Default.(string)
  960. // usagedetailDescApp is the schema descriptor for app field.
  961. usagedetailDescApp := usagedetailFields[3].Descriptor()
  962. // usagedetail.DefaultApp holds the default value on creation for the app field.
  963. usagedetail.DefaultApp = usagedetailDescApp.Default.(int)
  964. // usagedetailDescSessionID is the schema descriptor for session_id field.
  965. usagedetailDescSessionID := usagedetailFields[4].Descriptor()
  966. // usagedetail.DefaultSessionID holds the default value on creation for the session_id field.
  967. usagedetail.DefaultSessionID = usagedetailDescSessionID.Default.(uint64)
  968. // usagedetailDescRequest is the schema descriptor for request field.
  969. usagedetailDescRequest := usagedetailFields[5].Descriptor()
  970. // usagedetail.DefaultRequest holds the default value on creation for the request field.
  971. usagedetail.DefaultRequest = usagedetailDescRequest.Default.(string)
  972. // usagedetailDescResponse is the schema descriptor for response field.
  973. usagedetailDescResponse := usagedetailFields[6].Descriptor()
  974. // usagedetail.DefaultResponse holds the default value on creation for the response field.
  975. usagedetail.DefaultResponse = usagedetailDescResponse.Default.(string)
  976. // usagedetailDescTotalTokens is the schema descriptor for total_tokens field.
  977. usagedetailDescTotalTokens := usagedetailFields[7].Descriptor()
  978. // usagedetail.DefaultTotalTokens holds the default value on creation for the total_tokens field.
  979. usagedetail.DefaultTotalTokens = usagedetailDescTotalTokens.Default.(uint64)
  980. // usagedetailDescPromptTokens is the schema descriptor for prompt_tokens field.
  981. usagedetailDescPromptTokens := usagedetailFields[8].Descriptor()
  982. // usagedetail.DefaultPromptTokens holds the default value on creation for the prompt_tokens field.
  983. usagedetail.DefaultPromptTokens = usagedetailDescPromptTokens.Default.(uint64)
  984. // usagedetailDescCompletionTokens is the schema descriptor for completion_tokens field.
  985. usagedetailDescCompletionTokens := usagedetailFields[9].Descriptor()
  986. // usagedetail.DefaultCompletionTokens holds the default value on creation for the completion_tokens field.
  987. usagedetail.DefaultCompletionTokens = usagedetailDescCompletionTokens.Default.(uint64)
  988. // usagedetailDescOrganizationID is the schema descriptor for organization_id field.
  989. usagedetailDescOrganizationID := usagedetailFields[10].Descriptor()
  990. // usagedetail.DefaultOrganizationID holds the default value on creation for the organization_id field.
  991. usagedetail.DefaultOrganizationID = usagedetailDescOrganizationID.Default.(uint64)
  992. usagestatisticdayMixin := schema.UsageStatisticDay{}.Mixin()
  993. usagestatisticdayMixinHooks2 := usagestatisticdayMixin[2].Hooks()
  994. usagestatisticday.Hooks[0] = usagestatisticdayMixinHooks2[0]
  995. usagestatisticdayMixinInters2 := usagestatisticdayMixin[2].Interceptors()
  996. usagestatisticday.Interceptors[0] = usagestatisticdayMixinInters2[0]
  997. usagestatisticdayMixinFields0 := usagestatisticdayMixin[0].Fields()
  998. _ = usagestatisticdayMixinFields0
  999. usagestatisticdayMixinFields1 := usagestatisticdayMixin[1].Fields()
  1000. _ = usagestatisticdayMixinFields1
  1001. usagestatisticdayFields := schema.UsageStatisticDay{}.Fields()
  1002. _ = usagestatisticdayFields
  1003. // usagestatisticdayDescCreatedAt is the schema descriptor for created_at field.
  1004. usagestatisticdayDescCreatedAt := usagestatisticdayMixinFields0[1].Descriptor()
  1005. // usagestatisticday.DefaultCreatedAt holds the default value on creation for the created_at field.
  1006. usagestatisticday.DefaultCreatedAt = usagestatisticdayDescCreatedAt.Default.(func() time.Time)
  1007. // usagestatisticdayDescUpdatedAt is the schema descriptor for updated_at field.
  1008. usagestatisticdayDescUpdatedAt := usagestatisticdayMixinFields0[2].Descriptor()
  1009. // usagestatisticday.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1010. usagestatisticday.DefaultUpdatedAt = usagestatisticdayDescUpdatedAt.Default.(func() time.Time)
  1011. // usagestatisticday.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1012. usagestatisticday.UpdateDefaultUpdatedAt = usagestatisticdayDescUpdatedAt.UpdateDefault.(func() time.Time)
  1013. // usagestatisticdayDescStatus is the schema descriptor for status field.
  1014. usagestatisticdayDescStatus := usagestatisticdayMixinFields1[0].Descriptor()
  1015. // usagestatisticday.DefaultStatus holds the default value on creation for the status field.
  1016. usagestatisticday.DefaultStatus = usagestatisticdayDescStatus.Default.(uint8)
  1017. usagestatistichourMixin := schema.UsageStatisticHour{}.Mixin()
  1018. usagestatistichourMixinHooks2 := usagestatistichourMixin[2].Hooks()
  1019. usagestatistichour.Hooks[0] = usagestatistichourMixinHooks2[0]
  1020. usagestatistichourMixinInters2 := usagestatistichourMixin[2].Interceptors()
  1021. usagestatistichour.Interceptors[0] = usagestatistichourMixinInters2[0]
  1022. usagestatistichourMixinFields0 := usagestatistichourMixin[0].Fields()
  1023. _ = usagestatistichourMixinFields0
  1024. usagestatistichourMixinFields1 := usagestatistichourMixin[1].Fields()
  1025. _ = usagestatistichourMixinFields1
  1026. usagestatistichourFields := schema.UsageStatisticHour{}.Fields()
  1027. _ = usagestatistichourFields
  1028. // usagestatistichourDescCreatedAt is the schema descriptor for created_at field.
  1029. usagestatistichourDescCreatedAt := usagestatistichourMixinFields0[1].Descriptor()
  1030. // usagestatistichour.DefaultCreatedAt holds the default value on creation for the created_at field.
  1031. usagestatistichour.DefaultCreatedAt = usagestatistichourDescCreatedAt.Default.(func() time.Time)
  1032. // usagestatistichourDescUpdatedAt is the schema descriptor for updated_at field.
  1033. usagestatistichourDescUpdatedAt := usagestatistichourMixinFields0[2].Descriptor()
  1034. // usagestatistichour.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1035. usagestatistichour.DefaultUpdatedAt = usagestatistichourDescUpdatedAt.Default.(func() time.Time)
  1036. // usagestatistichour.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1037. usagestatistichour.UpdateDefaultUpdatedAt = usagestatistichourDescUpdatedAt.UpdateDefault.(func() time.Time)
  1038. // usagestatistichourDescStatus is the schema descriptor for status field.
  1039. usagestatistichourDescStatus := usagestatistichourMixinFields1[0].Descriptor()
  1040. // usagestatistichour.DefaultStatus holds the default value on creation for the status field.
  1041. usagestatistichour.DefaultStatus = usagestatistichourDescStatus.Default.(uint8)
  1042. usagestatisticmonthMixin := schema.UsageStatisticMonth{}.Mixin()
  1043. usagestatisticmonthMixinHooks2 := usagestatisticmonthMixin[2].Hooks()
  1044. usagestatisticmonth.Hooks[0] = usagestatisticmonthMixinHooks2[0]
  1045. usagestatisticmonthMixinInters2 := usagestatisticmonthMixin[2].Interceptors()
  1046. usagestatisticmonth.Interceptors[0] = usagestatisticmonthMixinInters2[0]
  1047. usagestatisticmonthMixinFields0 := usagestatisticmonthMixin[0].Fields()
  1048. _ = usagestatisticmonthMixinFields0
  1049. usagestatisticmonthMixinFields1 := usagestatisticmonthMixin[1].Fields()
  1050. _ = usagestatisticmonthMixinFields1
  1051. usagestatisticmonthFields := schema.UsageStatisticMonth{}.Fields()
  1052. _ = usagestatisticmonthFields
  1053. // usagestatisticmonthDescCreatedAt is the schema descriptor for created_at field.
  1054. usagestatisticmonthDescCreatedAt := usagestatisticmonthMixinFields0[1].Descriptor()
  1055. // usagestatisticmonth.DefaultCreatedAt holds the default value on creation for the created_at field.
  1056. usagestatisticmonth.DefaultCreatedAt = usagestatisticmonthDescCreatedAt.Default.(func() time.Time)
  1057. // usagestatisticmonthDescUpdatedAt is the schema descriptor for updated_at field.
  1058. usagestatisticmonthDescUpdatedAt := usagestatisticmonthMixinFields0[2].Descriptor()
  1059. // usagestatisticmonth.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1060. usagestatisticmonth.DefaultUpdatedAt = usagestatisticmonthDescUpdatedAt.Default.(func() time.Time)
  1061. // usagestatisticmonth.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1062. usagestatisticmonth.UpdateDefaultUpdatedAt = usagestatisticmonthDescUpdatedAt.UpdateDefault.(func() time.Time)
  1063. // usagestatisticmonthDescStatus is the schema descriptor for status field.
  1064. usagestatisticmonthDescStatus := usagestatisticmonthMixinFields1[0].Descriptor()
  1065. // usagestatisticmonth.DefaultStatus holds the default value on creation for the status field.
  1066. usagestatisticmonth.DefaultStatus = usagestatisticmonthDescStatus.Default.(uint8)
  1067. usagetotalMixin := schema.UsageTotal{}.Mixin()
  1068. usagetotalMixinFields0 := usagetotalMixin[0].Fields()
  1069. _ = usagetotalMixinFields0
  1070. usagetotalMixinFields1 := usagetotalMixin[1].Fields()
  1071. _ = usagetotalMixinFields1
  1072. usagetotalFields := schema.UsageTotal{}.Fields()
  1073. _ = usagetotalFields
  1074. // usagetotalDescCreatedAt is the schema descriptor for created_at field.
  1075. usagetotalDescCreatedAt := usagetotalMixinFields0[1].Descriptor()
  1076. // usagetotal.DefaultCreatedAt holds the default value on creation for the created_at field.
  1077. usagetotal.DefaultCreatedAt = usagetotalDescCreatedAt.Default.(func() time.Time)
  1078. // usagetotalDescUpdatedAt is the schema descriptor for updated_at field.
  1079. usagetotalDescUpdatedAt := usagetotalMixinFields0[2].Descriptor()
  1080. // usagetotal.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1081. usagetotal.DefaultUpdatedAt = usagetotalDescUpdatedAt.Default.(func() time.Time)
  1082. // usagetotal.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1083. usagetotal.UpdateDefaultUpdatedAt = usagetotalDescUpdatedAt.UpdateDefault.(func() time.Time)
  1084. // usagetotalDescStatus is the schema descriptor for status field.
  1085. usagetotalDescStatus := usagetotalMixinFields1[0].Descriptor()
  1086. // usagetotal.DefaultStatus holds the default value on creation for the status field.
  1087. usagetotal.DefaultStatus = usagetotalDescStatus.Default.(uint8)
  1088. // usagetotalDescType is the schema descriptor for type field.
  1089. usagetotalDescType := usagetotalFields[0].Descriptor()
  1090. // usagetotal.DefaultType holds the default value on creation for the type field.
  1091. usagetotal.DefaultType = usagetotalDescType.Default.(int)
  1092. // usagetotalDescBotID is the schema descriptor for bot_id field.
  1093. usagetotalDescBotID := usagetotalFields[1].Descriptor()
  1094. // usagetotal.DefaultBotID holds the default value on creation for the bot_id field.
  1095. usagetotal.DefaultBotID = usagetotalDescBotID.Default.(string)
  1096. // usagetotalDescTotalTokens is the schema descriptor for total_tokens field.
  1097. usagetotalDescTotalTokens := usagetotalFields[2].Descriptor()
  1098. // usagetotal.DefaultTotalTokens holds the default value on creation for the total_tokens field.
  1099. usagetotal.DefaultTotalTokens = usagetotalDescTotalTokens.Default.(uint64)
  1100. // usagetotalDescStartIndex is the schema descriptor for start_index field.
  1101. usagetotalDescStartIndex := usagetotalFields[3].Descriptor()
  1102. // usagetotal.DefaultStartIndex holds the default value on creation for the start_index field.
  1103. usagetotal.DefaultStartIndex = usagetotalDescStartIndex.Default.(uint64)
  1104. // usagetotalDescEndIndex is the schema descriptor for end_index field.
  1105. usagetotalDescEndIndex := usagetotalFields[4].Descriptor()
  1106. // usagetotal.DefaultEndIndex holds the default value on creation for the end_index field.
  1107. usagetotal.DefaultEndIndex = usagetotalDescEndIndex.Default.(uint64)
  1108. // usagetotalDescOrganizationID is the schema descriptor for organization_id field.
  1109. usagetotalDescOrganizationID := usagetotalFields[5].Descriptor()
  1110. // usagetotal.DefaultOrganizationID holds the default value on creation for the organization_id field.
  1111. usagetotal.DefaultOrganizationID = usagetotalDescOrganizationID.Default.(uint64)
  1112. workexperienceMixin := schema.WorkExperience{}.Mixin()
  1113. workexperienceMixinHooks1 := workexperienceMixin[1].Hooks()
  1114. workexperience.Hooks[0] = workexperienceMixinHooks1[0]
  1115. workexperienceMixinInters1 := workexperienceMixin[1].Interceptors()
  1116. workexperience.Interceptors[0] = workexperienceMixinInters1[0]
  1117. workexperienceMixinFields0 := workexperienceMixin[0].Fields()
  1118. _ = workexperienceMixinFields0
  1119. workexperienceFields := schema.WorkExperience{}.Fields()
  1120. _ = workexperienceFields
  1121. // workexperienceDescCreatedAt is the schema descriptor for created_at field.
  1122. workexperienceDescCreatedAt := workexperienceMixinFields0[1].Descriptor()
  1123. // workexperience.DefaultCreatedAt holds the default value on creation for the created_at field.
  1124. workexperience.DefaultCreatedAt = workexperienceDescCreatedAt.Default.(func() time.Time)
  1125. // workexperienceDescUpdatedAt is the schema descriptor for updated_at field.
  1126. workexperienceDescUpdatedAt := workexperienceMixinFields0[2].Descriptor()
  1127. // workexperience.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1128. workexperience.DefaultUpdatedAt = workexperienceDescUpdatedAt.Default.(func() time.Time)
  1129. // workexperience.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1130. workexperience.UpdateDefaultUpdatedAt = workexperienceDescUpdatedAt.UpdateDefault.(func() time.Time)
  1131. wpchatroomMixin := schema.WpChatroom{}.Mixin()
  1132. wpchatroomMixinFields0 := wpchatroomMixin[0].Fields()
  1133. _ = wpchatroomMixinFields0
  1134. wpchatroomMixinFields1 := wpchatroomMixin[1].Fields()
  1135. _ = wpchatroomMixinFields1
  1136. wpchatroomFields := schema.WpChatroom{}.Fields()
  1137. _ = wpchatroomFields
  1138. // wpchatroomDescCreatedAt is the schema descriptor for created_at field.
  1139. wpchatroomDescCreatedAt := wpchatroomMixinFields0[1].Descriptor()
  1140. // wpchatroom.DefaultCreatedAt holds the default value on creation for the created_at field.
  1141. wpchatroom.DefaultCreatedAt = wpchatroomDescCreatedAt.Default.(func() time.Time)
  1142. // wpchatroomDescUpdatedAt is the schema descriptor for updated_at field.
  1143. wpchatroomDescUpdatedAt := wpchatroomMixinFields0[2].Descriptor()
  1144. // wpchatroom.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1145. wpchatroom.DefaultUpdatedAt = wpchatroomDescUpdatedAt.Default.(func() time.Time)
  1146. // wpchatroom.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1147. wpchatroom.UpdateDefaultUpdatedAt = wpchatroomDescUpdatedAt.UpdateDefault.(func() time.Time)
  1148. // wpchatroomDescStatus is the schema descriptor for status field.
  1149. wpchatroomDescStatus := wpchatroomMixinFields1[0].Descriptor()
  1150. // wpchatroom.DefaultStatus holds the default value on creation for the status field.
  1151. wpchatroom.DefaultStatus = wpchatroomDescStatus.Default.(uint8)
  1152. // wpchatroomDescWxWxid is the schema descriptor for wx_wxid field.
  1153. wpchatroomDescWxWxid := wpchatroomFields[0].Descriptor()
  1154. // wpchatroom.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  1155. wpchatroom.DefaultWxWxid = wpchatroomDescWxWxid.Default.(string)
  1156. // wpchatroomDescChatroomID is the schema descriptor for chatroom_id field.
  1157. wpchatroomDescChatroomID := wpchatroomFields[1].Descriptor()
  1158. // wpchatroom.DefaultChatroomID holds the default value on creation for the chatroom_id field.
  1159. wpchatroom.DefaultChatroomID = wpchatroomDescChatroomID.Default.(string)
  1160. // wpchatroomDescNickname is the schema descriptor for nickname field.
  1161. wpchatroomDescNickname := wpchatroomFields[2].Descriptor()
  1162. // wpchatroom.DefaultNickname holds the default value on creation for the nickname field.
  1163. wpchatroom.DefaultNickname = wpchatroomDescNickname.Default.(string)
  1164. // wpchatroomDescOwner is the schema descriptor for owner field.
  1165. wpchatroomDescOwner := wpchatroomFields[3].Descriptor()
  1166. // wpchatroom.DefaultOwner holds the default value on creation for the owner field.
  1167. wpchatroom.DefaultOwner = wpchatroomDescOwner.Default.(string)
  1168. // wpchatroomDescAvatar is the schema descriptor for avatar field.
  1169. wpchatroomDescAvatar := wpchatroomFields[4].Descriptor()
  1170. // wpchatroom.DefaultAvatar holds the default value on creation for the avatar field.
  1171. wpchatroom.DefaultAvatar = wpchatroomDescAvatar.Default.(string)
  1172. wpchatroommemberMixin := schema.WpChatroomMember{}.Mixin()
  1173. wpchatroommemberMixinFields0 := wpchatroommemberMixin[0].Fields()
  1174. _ = wpchatroommemberMixinFields0
  1175. wpchatroommemberMixinFields1 := wpchatroommemberMixin[1].Fields()
  1176. _ = wpchatroommemberMixinFields1
  1177. wpchatroommemberFields := schema.WpChatroomMember{}.Fields()
  1178. _ = wpchatroommemberFields
  1179. // wpchatroommemberDescCreatedAt is the schema descriptor for created_at field.
  1180. wpchatroommemberDescCreatedAt := wpchatroommemberMixinFields0[1].Descriptor()
  1181. // wpchatroommember.DefaultCreatedAt holds the default value on creation for the created_at field.
  1182. wpchatroommember.DefaultCreatedAt = wpchatroommemberDescCreatedAt.Default.(func() time.Time)
  1183. // wpchatroommemberDescUpdatedAt is the schema descriptor for updated_at field.
  1184. wpchatroommemberDescUpdatedAt := wpchatroommemberMixinFields0[2].Descriptor()
  1185. // wpchatroommember.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1186. wpchatroommember.DefaultUpdatedAt = wpchatroommemberDescUpdatedAt.Default.(func() time.Time)
  1187. // wpchatroommember.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1188. wpchatroommember.UpdateDefaultUpdatedAt = wpchatroommemberDescUpdatedAt.UpdateDefault.(func() time.Time)
  1189. // wpchatroommemberDescStatus is the schema descriptor for status field.
  1190. wpchatroommemberDescStatus := wpchatroommemberMixinFields1[0].Descriptor()
  1191. // wpchatroommember.DefaultStatus holds the default value on creation for the status field.
  1192. wpchatroommember.DefaultStatus = wpchatroommemberDescStatus.Default.(uint8)
  1193. // wpchatroommemberDescWxWxid is the schema descriptor for wx_wxid field.
  1194. wpchatroommemberDescWxWxid := wpchatroommemberFields[0].Descriptor()
  1195. // wpchatroommember.DefaultWxWxid holds the default value on creation for the wx_wxid field.
  1196. wpchatroommember.DefaultWxWxid = wpchatroommemberDescWxWxid.Default.(string)
  1197. // wpchatroommemberDescWxid is the schema descriptor for wxid field.
  1198. wpchatroommemberDescWxid := wpchatroommemberFields[1].Descriptor()
  1199. // wpchatroommember.DefaultWxid holds the default value on creation for the wxid field.
  1200. wpchatroommember.DefaultWxid = wpchatroommemberDescWxid.Default.(string)
  1201. // wpchatroommemberDescNickname is the schema descriptor for nickname field.
  1202. wpchatroommemberDescNickname := wpchatroommemberFields[2].Descriptor()
  1203. // wpchatroommember.DefaultNickname holds the default value on creation for the nickname field.
  1204. wpchatroommember.DefaultNickname = wpchatroommemberDescNickname.Default.(string)
  1205. // wpchatroommemberDescAvatar is the schema descriptor for avatar field.
  1206. wpchatroommemberDescAvatar := wpchatroommemberFields[3].Descriptor()
  1207. // wpchatroommember.DefaultAvatar holds the default value on creation for the avatar field.
  1208. wpchatroommember.DefaultAvatar = wpchatroommemberDescAvatar.Default.(string)
  1209. wxMixin := schema.Wx{}.Mixin()
  1210. wxMixinHooks2 := wxMixin[2].Hooks()
  1211. wx.Hooks[0] = wxMixinHooks2[0]
  1212. wxMixinInters2 := wxMixin[2].Interceptors()
  1213. wx.Interceptors[0] = wxMixinInters2[0]
  1214. wxMixinFields0 := wxMixin[0].Fields()
  1215. _ = wxMixinFields0
  1216. wxMixinFields1 := wxMixin[1].Fields()
  1217. _ = wxMixinFields1
  1218. wxFields := schema.Wx{}.Fields()
  1219. _ = wxFields
  1220. // wxDescCreatedAt is the schema descriptor for created_at field.
  1221. wxDescCreatedAt := wxMixinFields0[1].Descriptor()
  1222. // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
  1223. wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
  1224. // wxDescUpdatedAt is the schema descriptor for updated_at field.
  1225. wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
  1226. // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1227. wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
  1228. // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1229. wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
  1230. // wxDescStatus is the schema descriptor for status field.
  1231. wxDescStatus := wxMixinFields1[0].Descriptor()
  1232. // wx.DefaultStatus holds the default value on creation for the status field.
  1233. wx.DefaultStatus = wxDescStatus.Default.(uint8)
  1234. // wxDescServerID is the schema descriptor for server_id field.
  1235. wxDescServerID := wxFields[0].Descriptor()
  1236. // wx.DefaultServerID holds the default value on creation for the server_id field.
  1237. wx.DefaultServerID = wxDescServerID.Default.(uint64)
  1238. // wxDescPort is the schema descriptor for port field.
  1239. wxDescPort := wxFields[1].Descriptor()
  1240. // wx.DefaultPort holds the default value on creation for the port field.
  1241. wx.DefaultPort = wxDescPort.Default.(string)
  1242. // wxDescProcessID is the schema descriptor for process_id field.
  1243. wxDescProcessID := wxFields[2].Descriptor()
  1244. // wx.DefaultProcessID holds the default value on creation for the process_id field.
  1245. wx.DefaultProcessID = wxDescProcessID.Default.(string)
  1246. // wxDescCallback is the schema descriptor for callback field.
  1247. wxDescCallback := wxFields[3].Descriptor()
  1248. // wx.DefaultCallback holds the default value on creation for the callback field.
  1249. wx.DefaultCallback = wxDescCallback.Default.(string)
  1250. // wxDescWxid is the schema descriptor for wxid field.
  1251. wxDescWxid := wxFields[4].Descriptor()
  1252. // wx.DefaultWxid holds the default value on creation for the wxid field.
  1253. wx.DefaultWxid = wxDescWxid.Default.(string)
  1254. // wxDescAccount is the schema descriptor for account field.
  1255. wxDescAccount := wxFields[5].Descriptor()
  1256. // wx.DefaultAccount holds the default value on creation for the account field.
  1257. wx.DefaultAccount = wxDescAccount.Default.(string)
  1258. // wxDescNickname is the schema descriptor for nickname field.
  1259. wxDescNickname := wxFields[6].Descriptor()
  1260. // wx.DefaultNickname holds the default value on creation for the nickname field.
  1261. wx.DefaultNickname = wxDescNickname.Default.(string)
  1262. // wxDescTel is the schema descriptor for tel field.
  1263. wxDescTel := wxFields[7].Descriptor()
  1264. // wx.DefaultTel holds the default value on creation for the tel field.
  1265. wx.DefaultTel = wxDescTel.Default.(string)
  1266. // wxDescHeadBig is the schema descriptor for head_big field.
  1267. wxDescHeadBig := wxFields[8].Descriptor()
  1268. // wx.DefaultHeadBig holds the default value on creation for the head_big field.
  1269. wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
  1270. // wxDescOrganizationID is the schema descriptor for organization_id field.
  1271. wxDescOrganizationID := wxFields[9].Descriptor()
  1272. // wx.DefaultOrganizationID holds the default value on creation for the organization_id field.
  1273. wx.DefaultOrganizationID = wxDescOrganizationID.Default.(uint64)
  1274. // wxDescAgentID is the schema descriptor for agent_id field.
  1275. wxDescAgentID := wxFields[10].Descriptor()
  1276. // wx.DefaultAgentID holds the default value on creation for the agent_id field.
  1277. wx.DefaultAgentID = wxDescAgentID.Default.(uint64)
  1278. // wxDescAPIBase is the schema descriptor for api_base field.
  1279. wxDescAPIBase := wxFields[11].Descriptor()
  1280. // wx.DefaultAPIBase holds the default value on creation for the api_base field.
  1281. wx.DefaultAPIBase = wxDescAPIBase.Default.(string)
  1282. // wxDescAPIKey is the schema descriptor for api_key field.
  1283. wxDescAPIKey := wxFields[12].Descriptor()
  1284. // wx.DefaultAPIKey holds the default value on creation for the api_key field.
  1285. wx.DefaultAPIKey = wxDescAPIKey.Default.(string)
  1286. wxcardMixin := schema.WxCard{}.Mixin()
  1287. wxcardMixinHooks1 := wxcardMixin[1].Hooks()
  1288. wxcard.Hooks[0] = wxcardMixinHooks1[0]
  1289. wxcardMixinInters1 := wxcardMixin[1].Interceptors()
  1290. wxcard.Interceptors[0] = wxcardMixinInters1[0]
  1291. wxcardMixinFields0 := wxcardMixin[0].Fields()
  1292. _ = wxcardMixinFields0
  1293. wxcardFields := schema.WxCard{}.Fields()
  1294. _ = wxcardFields
  1295. // wxcardDescCreatedAt is the schema descriptor for created_at field.
  1296. wxcardDescCreatedAt := wxcardMixinFields0[1].Descriptor()
  1297. // wxcard.DefaultCreatedAt holds the default value on creation for the created_at field.
  1298. wxcard.DefaultCreatedAt = wxcardDescCreatedAt.Default.(func() time.Time)
  1299. // wxcardDescUpdatedAt is the schema descriptor for updated_at field.
  1300. wxcardDescUpdatedAt := wxcardMixinFields0[2].Descriptor()
  1301. // wxcard.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1302. wxcard.DefaultUpdatedAt = wxcardDescUpdatedAt.Default.(func() time.Time)
  1303. // wxcard.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1304. wxcard.UpdateDefaultUpdatedAt = wxcardDescUpdatedAt.UpdateDefault.(func() time.Time)
  1305. // wxcardDescUserID is the schema descriptor for user_id field.
  1306. wxcardDescUserID := wxcardFields[0].Descriptor()
  1307. // wxcard.DefaultUserID holds the default value on creation for the user_id field.
  1308. wxcard.DefaultUserID = wxcardDescUserID.Default.(uint64)
  1309. // wxcardDescWxUserID is the schema descriptor for wx_user_id field.
  1310. wxcardDescWxUserID := wxcardFields[1].Descriptor()
  1311. // wxcard.DefaultWxUserID holds the default value on creation for the wx_user_id field.
  1312. wxcard.DefaultWxUserID = wxcardDescWxUserID.Default.(uint64)
  1313. // wxcardDescAvatar is the schema descriptor for avatar field.
  1314. wxcardDescAvatar := wxcardFields[2].Descriptor()
  1315. // wxcard.DefaultAvatar holds the default value on creation for the avatar field.
  1316. wxcard.DefaultAvatar = wxcardDescAvatar.Default.(string)
  1317. // wxcardDescLogo is the schema descriptor for logo field.
  1318. wxcardDescLogo := wxcardFields[3].Descriptor()
  1319. // wxcard.DefaultLogo holds the default value on creation for the logo field.
  1320. wxcard.DefaultLogo = wxcardDescLogo.Default.(string)
  1321. // wxcardDescName is the schema descriptor for name field.
  1322. wxcardDescName := wxcardFields[4].Descriptor()
  1323. // wxcard.DefaultName holds the default value on creation for the name field.
  1324. wxcard.DefaultName = wxcardDescName.Default.(string)
  1325. // wxcardDescCompany is the schema descriptor for company field.
  1326. wxcardDescCompany := wxcardFields[5].Descriptor()
  1327. // wxcard.DefaultCompany holds the default value on creation for the company field.
  1328. wxcard.DefaultCompany = wxcardDescCompany.Default.(string)
  1329. // wxcardDescAddress is the schema descriptor for address field.
  1330. wxcardDescAddress := wxcardFields[6].Descriptor()
  1331. // wxcard.DefaultAddress holds the default value on creation for the address field.
  1332. wxcard.DefaultAddress = wxcardDescAddress.Default.(string)
  1333. // wxcardDescPhone is the schema descriptor for phone field.
  1334. wxcardDescPhone := wxcardFields[7].Descriptor()
  1335. // wxcard.DefaultPhone holds the default value on creation for the phone field.
  1336. wxcard.DefaultPhone = wxcardDescPhone.Default.(string)
  1337. // wxcardDescOfficialAccount is the schema descriptor for official_account field.
  1338. wxcardDescOfficialAccount := wxcardFields[8].Descriptor()
  1339. // wxcard.DefaultOfficialAccount holds the default value on creation for the official_account field.
  1340. wxcard.DefaultOfficialAccount = wxcardDescOfficialAccount.Default.(string)
  1341. // wxcardDescWechatAccount is the schema descriptor for wechat_account field.
  1342. wxcardDescWechatAccount := wxcardFields[9].Descriptor()
  1343. // wxcard.DefaultWechatAccount holds the default value on creation for the wechat_account field.
  1344. wxcard.DefaultWechatAccount = wxcardDescWechatAccount.Default.(string)
  1345. // wxcardDescEmail is the schema descriptor for email field.
  1346. wxcardDescEmail := wxcardFields[10].Descriptor()
  1347. // wxcard.DefaultEmail holds the default value on creation for the email field.
  1348. wxcard.DefaultEmail = wxcardDescEmail.Default.(string)
  1349. // wxcardDescIntro is the schema descriptor for intro field.
  1350. wxcardDescIntro := wxcardFields[14].Descriptor()
  1351. // wxcard.DefaultIntro holds the default value on creation for the intro field.
  1352. wxcard.DefaultIntro = wxcardDescIntro.Default.(string)
  1353. wxcarduserMixin := schema.WxCardUser{}.Mixin()
  1354. wxcarduserMixinHooks1 := wxcarduserMixin[1].Hooks()
  1355. wxcarduser.Hooks[0] = wxcarduserMixinHooks1[0]
  1356. wxcarduserMixinInters1 := wxcarduserMixin[1].Interceptors()
  1357. wxcarduser.Interceptors[0] = wxcarduserMixinInters1[0]
  1358. wxcarduserMixinFields0 := wxcarduserMixin[0].Fields()
  1359. _ = wxcarduserMixinFields0
  1360. wxcarduserFields := schema.WxCardUser{}.Fields()
  1361. _ = wxcarduserFields
  1362. // wxcarduserDescCreatedAt is the schema descriptor for created_at field.
  1363. wxcarduserDescCreatedAt := wxcarduserMixinFields0[1].Descriptor()
  1364. // wxcarduser.DefaultCreatedAt holds the default value on creation for the created_at field.
  1365. wxcarduser.DefaultCreatedAt = wxcarduserDescCreatedAt.Default.(func() time.Time)
  1366. // wxcarduserDescUpdatedAt is the schema descriptor for updated_at field.
  1367. wxcarduserDescUpdatedAt := wxcarduserMixinFields0[2].Descriptor()
  1368. // wxcarduser.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1369. wxcarduser.DefaultUpdatedAt = wxcarduserDescUpdatedAt.Default.(func() time.Time)
  1370. // wxcarduser.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1371. wxcarduser.UpdateDefaultUpdatedAt = wxcarduserDescUpdatedAt.UpdateDefault.(func() time.Time)
  1372. // wxcarduserDescWxid is the schema descriptor for wxid field.
  1373. wxcarduserDescWxid := wxcarduserFields[0].Descriptor()
  1374. // wxcarduser.DefaultWxid holds the default value on creation for the wxid field.
  1375. wxcarduser.DefaultWxid = wxcarduserDescWxid.Default.(string)
  1376. // wxcarduserDescAccount is the schema descriptor for account field.
  1377. wxcarduserDescAccount := wxcarduserFields[1].Descriptor()
  1378. // wxcarduser.DefaultAccount holds the default value on creation for the account field.
  1379. wxcarduser.DefaultAccount = wxcarduserDescAccount.Default.(string)
  1380. // wxcarduserDescAvatar is the schema descriptor for avatar field.
  1381. wxcarduserDescAvatar := wxcarduserFields[2].Descriptor()
  1382. // wxcarduser.DefaultAvatar holds the default value on creation for the avatar field.
  1383. wxcarduser.DefaultAvatar = wxcarduserDescAvatar.Default.(string)
  1384. // wxcarduserDescNickname is the schema descriptor for nickname field.
  1385. wxcarduserDescNickname := wxcarduserFields[3].Descriptor()
  1386. // wxcarduser.DefaultNickname holds the default value on creation for the nickname field.
  1387. wxcarduser.DefaultNickname = wxcarduserDescNickname.Default.(string)
  1388. // wxcarduserDescRemark is the schema descriptor for remark field.
  1389. wxcarduserDescRemark := wxcarduserFields[4].Descriptor()
  1390. // wxcarduser.DefaultRemark holds the default value on creation for the remark field.
  1391. wxcarduser.DefaultRemark = wxcarduserDescRemark.Default.(string)
  1392. // wxcarduserDescPhone is the schema descriptor for phone field.
  1393. wxcarduserDescPhone := wxcarduserFields[5].Descriptor()
  1394. // wxcarduser.DefaultPhone holds the default value on creation for the phone field.
  1395. wxcarduser.DefaultPhone = wxcarduserDescPhone.Default.(string)
  1396. // wxcarduserDescOpenID is the schema descriptor for open_id field.
  1397. wxcarduserDescOpenID := wxcarduserFields[6].Descriptor()
  1398. // wxcarduser.DefaultOpenID holds the default value on creation for the open_id field.
  1399. wxcarduser.DefaultOpenID = wxcarduserDescOpenID.Default.(string)
  1400. // wxcarduserDescUnionID is the schema descriptor for union_id field.
  1401. wxcarduserDescUnionID := wxcarduserFields[7].Descriptor()
  1402. // wxcarduser.DefaultUnionID holds the default value on creation for the union_id field.
  1403. wxcarduser.DefaultUnionID = wxcarduserDescUnionID.Default.(string)
  1404. // wxcarduserDescSessionKey is the schema descriptor for session_key field.
  1405. wxcarduserDescSessionKey := wxcarduserFields[8].Descriptor()
  1406. // wxcarduser.DefaultSessionKey holds the default value on creation for the session_key field.
  1407. wxcarduser.DefaultSessionKey = wxcarduserDescSessionKey.Default.(string)
  1408. // wxcarduserDescIsVip is the schema descriptor for is_vip field.
  1409. wxcarduserDescIsVip := wxcarduserFields[9].Descriptor()
  1410. // wxcarduser.DefaultIsVip holds the default value on creation for the is_vip field.
  1411. wxcarduser.DefaultIsVip = wxcarduserDescIsVip.Default.(int)
  1412. wxcardvisitMixin := schema.WxCardVisit{}.Mixin()
  1413. wxcardvisitMixinHooks1 := wxcardvisitMixin[1].Hooks()
  1414. wxcardvisit.Hooks[0] = wxcardvisitMixinHooks1[0]
  1415. wxcardvisitMixinInters1 := wxcardvisitMixin[1].Interceptors()
  1416. wxcardvisit.Interceptors[0] = wxcardvisitMixinInters1[0]
  1417. wxcardvisitMixinFields0 := wxcardvisitMixin[0].Fields()
  1418. _ = wxcardvisitMixinFields0
  1419. wxcardvisitFields := schema.WxCardVisit{}.Fields()
  1420. _ = wxcardvisitFields
  1421. // wxcardvisitDescCreatedAt is the schema descriptor for created_at field.
  1422. wxcardvisitDescCreatedAt := wxcardvisitMixinFields0[1].Descriptor()
  1423. // wxcardvisit.DefaultCreatedAt holds the default value on creation for the created_at field.
  1424. wxcardvisit.DefaultCreatedAt = wxcardvisitDescCreatedAt.Default.(func() time.Time)
  1425. // wxcardvisitDescUpdatedAt is the schema descriptor for updated_at field.
  1426. wxcardvisitDescUpdatedAt := wxcardvisitMixinFields0[2].Descriptor()
  1427. // wxcardvisit.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1428. wxcardvisit.DefaultUpdatedAt = wxcardvisitDescUpdatedAt.Default.(func() time.Time)
  1429. // wxcardvisit.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1430. wxcardvisit.UpdateDefaultUpdatedAt = wxcardvisitDescUpdatedAt.UpdateDefault.(func() time.Time)
  1431. // wxcardvisitDescUserID is the schema descriptor for user_id field.
  1432. wxcardvisitDescUserID := wxcardvisitFields[0].Descriptor()
  1433. // wxcardvisit.DefaultUserID holds the default value on creation for the user_id field.
  1434. wxcardvisit.DefaultUserID = wxcardvisitDescUserID.Default.(uint64)
  1435. // wxcardvisitDescBotID is the schema descriptor for bot_id field.
  1436. wxcardvisitDescBotID := wxcardvisitFields[1].Descriptor()
  1437. // wxcardvisit.DefaultBotID holds the default value on creation for the bot_id field.
  1438. wxcardvisit.DefaultBotID = wxcardvisitDescBotID.Default.(uint64)
  1439. // wxcardvisitDescBotType is the schema descriptor for bot_type field.
  1440. wxcardvisitDescBotType := wxcardvisitFields[2].Descriptor()
  1441. // wxcardvisit.DefaultBotType holds the default value on creation for the bot_type field.
  1442. wxcardvisit.DefaultBotType = wxcardvisitDescBotType.Default.(uint8)
  1443. }
  1444. const (
  1445. Version = "v0.13.1" // Version of ent codegen.
  1446. Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
  1447. )