runtime.go 176 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556
  1. // Code generated by ent, DO NOT EDIT.
  2. package runtime
  3. import (
  4. "time"
  5. "github.com/Wei-Shaw/sub2api/ent/account"
  6. "github.com/Wei-Shaw/sub2api/ent/accountgroup"
  7. "github.com/Wei-Shaw/sub2api/ent/announcement"
  8. "github.com/Wei-Shaw/sub2api/ent/announcementread"
  9. "github.com/Wei-Shaw/sub2api/ent/apikey"
  10. "github.com/Wei-Shaw/sub2api/ent/authidentity"
  11. "github.com/Wei-Shaw/sub2api/ent/authidentitychannel"
  12. "github.com/Wei-Shaw/sub2api/ent/batchimageevent"
  13. "github.com/Wei-Shaw/sub2api/ent/batchimageitem"
  14. "github.com/Wei-Shaw/sub2api/ent/batchimagejob"
  15. "github.com/Wei-Shaw/sub2api/ent/channelmonitor"
  16. "github.com/Wei-Shaw/sub2api/ent/channelmonitordailyrollup"
  17. "github.com/Wei-Shaw/sub2api/ent/channelmonitorhistory"
  18. "github.com/Wei-Shaw/sub2api/ent/channelmonitorrequesttemplate"
  19. "github.com/Wei-Shaw/sub2api/ent/compositemodelroute"
  20. "github.com/Wei-Shaw/sub2api/ent/errorpassthroughrule"
  21. "github.com/Wei-Shaw/sub2api/ent/group"
  22. "github.com/Wei-Shaw/sub2api/ent/idempotencyrecord"
  23. "github.com/Wei-Shaw/sub2api/ent/identityadoptiondecision"
  24. "github.com/Wei-Shaw/sub2api/ent/paymentauditlog"
  25. "github.com/Wei-Shaw/sub2api/ent/paymentorder"
  26. "github.com/Wei-Shaw/sub2api/ent/paymentproviderinstance"
  27. "github.com/Wei-Shaw/sub2api/ent/pendingauthsession"
  28. "github.com/Wei-Shaw/sub2api/ent/promocode"
  29. "github.com/Wei-Shaw/sub2api/ent/promocodeusage"
  30. "github.com/Wei-Shaw/sub2api/ent/proxy"
  31. "github.com/Wei-Shaw/sub2api/ent/redeemcode"
  32. "github.com/Wei-Shaw/sub2api/ent/schema"
  33. "github.com/Wei-Shaw/sub2api/ent/securitypolicykeyword"
  34. "github.com/Wei-Shaw/sub2api/ent/securitysecret"
  35. "github.com/Wei-Shaw/sub2api/ent/setting"
  36. "github.com/Wei-Shaw/sub2api/ent/subscriptionplan"
  37. "github.com/Wei-Shaw/sub2api/ent/tlsfingerprintprofile"
  38. "github.com/Wei-Shaw/sub2api/ent/usagecleanuptask"
  39. "github.com/Wei-Shaw/sub2api/ent/usagelog"
  40. "github.com/Wei-Shaw/sub2api/ent/user"
  41. "github.com/Wei-Shaw/sub2api/ent/userallowedgroup"
  42. "github.com/Wei-Shaw/sub2api/ent/userattributedefinition"
  43. "github.com/Wei-Shaw/sub2api/ent/userattributevalue"
  44. "github.com/Wei-Shaw/sub2api/ent/userplatformquota"
  45. "github.com/Wei-Shaw/sub2api/ent/usersubscription"
  46. "github.com/Wei-Shaw/sub2api/internal/domain"
  47. )
  48. // The init function reads all schema descriptors with runtime code
  49. // (default values, validators, hooks and policies) and stitches it
  50. // to their package variables.
  51. func init() {
  52. apikeyMixin := schema.APIKey{}.Mixin()
  53. apikeyMixinHooks1 := apikeyMixin[1].Hooks()
  54. apikey.Hooks[0] = apikeyMixinHooks1[0]
  55. apikeyMixinInters1 := apikeyMixin[1].Interceptors()
  56. apikey.Interceptors[0] = apikeyMixinInters1[0]
  57. apikeyMixinFields0 := apikeyMixin[0].Fields()
  58. _ = apikeyMixinFields0
  59. apikeyFields := schema.APIKey{}.Fields()
  60. _ = apikeyFields
  61. // apikeyDescCreatedAt is the schema descriptor for created_at field.
  62. apikeyDescCreatedAt := apikeyMixinFields0[0].Descriptor()
  63. // apikey.DefaultCreatedAt holds the default value on creation for the created_at field.
  64. apikey.DefaultCreatedAt = apikeyDescCreatedAt.Default.(func() time.Time)
  65. // apikeyDescUpdatedAt is the schema descriptor for updated_at field.
  66. apikeyDescUpdatedAt := apikeyMixinFields0[1].Descriptor()
  67. // apikey.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  68. apikey.DefaultUpdatedAt = apikeyDescUpdatedAt.Default.(func() time.Time)
  69. // apikey.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  70. apikey.UpdateDefaultUpdatedAt = apikeyDescUpdatedAt.UpdateDefault.(func() time.Time)
  71. // apikeyDescKey is the schema descriptor for key field.
  72. apikeyDescKey := apikeyFields[1].Descriptor()
  73. // apikey.KeyValidator is a validator for the "key" field. It is called by the builders before save.
  74. apikey.KeyValidator = func() func(string) error {
  75. validators := apikeyDescKey.Validators
  76. fns := [...]func(string) error{
  77. validators[0].(func(string) error),
  78. validators[1].(func(string) error),
  79. }
  80. return func(key string) error {
  81. for _, fn := range fns {
  82. if err := fn(key); err != nil {
  83. return err
  84. }
  85. }
  86. return nil
  87. }
  88. }()
  89. // apikeyDescKeyHash is the schema descriptor for key_hash field.
  90. apikeyDescKeyHash := apikeyFields[2].Descriptor()
  91. // apikey.KeyHashValidator is a validator for the "key_hash" field. It is called by the builders before save.
  92. apikey.KeyHashValidator = apikeyDescKeyHash.Validators[0].(func(string) error)
  93. // apikeyDescKeyPrefix is the schema descriptor for key_prefix field.
  94. apikeyDescKeyPrefix := apikeyFields[3].Descriptor()
  95. // apikey.KeyPrefixValidator is a validator for the "key_prefix" field. It is called by the builders before save.
  96. apikey.KeyPrefixValidator = apikeyDescKeyPrefix.Validators[0].(func(string) error)
  97. // apikeyDescName is the schema descriptor for name field.
  98. apikeyDescName := apikeyFields[4].Descriptor()
  99. // apikey.NameValidator is a validator for the "name" field. It is called by the builders before save.
  100. apikey.NameValidator = func() func(string) error {
  101. validators := apikeyDescName.Validators
  102. fns := [...]func(string) error{
  103. validators[0].(func(string) error),
  104. validators[1].(func(string) error),
  105. }
  106. return func(name string) error {
  107. for _, fn := range fns {
  108. if err := fn(name); err != nil {
  109. return err
  110. }
  111. }
  112. return nil
  113. }
  114. }()
  115. // apikeyDescStatus is the schema descriptor for status field.
  116. apikeyDescStatus := apikeyFields[6].Descriptor()
  117. // apikey.DefaultStatus holds the default value on creation for the status field.
  118. apikey.DefaultStatus = apikeyDescStatus.Default.(string)
  119. // apikey.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  120. apikey.StatusValidator = apikeyDescStatus.Validators[0].(func(string) error)
  121. // apikeyDescQuota is the schema descriptor for quota field.
  122. apikeyDescQuota := apikeyFields[10].Descriptor()
  123. // apikey.DefaultQuota holds the default value on creation for the quota field.
  124. apikey.DefaultQuota = apikeyDescQuota.Default.(float64)
  125. // apikeyDescQuotaUsed is the schema descriptor for quota_used field.
  126. apikeyDescQuotaUsed := apikeyFields[11].Descriptor()
  127. // apikey.DefaultQuotaUsed holds the default value on creation for the quota_used field.
  128. apikey.DefaultQuotaUsed = apikeyDescQuotaUsed.Default.(float64)
  129. // apikeyDescRateLimit5h is the schema descriptor for rate_limit_5h field.
  130. apikeyDescRateLimit5h := apikeyFields[13].Descriptor()
  131. // apikey.DefaultRateLimit5h holds the default value on creation for the rate_limit_5h field.
  132. apikey.DefaultRateLimit5h = apikeyDescRateLimit5h.Default.(float64)
  133. // apikeyDescRateLimit1d is the schema descriptor for rate_limit_1d field.
  134. apikeyDescRateLimit1d := apikeyFields[14].Descriptor()
  135. // apikey.DefaultRateLimit1d holds the default value on creation for the rate_limit_1d field.
  136. apikey.DefaultRateLimit1d = apikeyDescRateLimit1d.Default.(float64)
  137. // apikeyDescRateLimit7d is the schema descriptor for rate_limit_7d field.
  138. apikeyDescRateLimit7d := apikeyFields[15].Descriptor()
  139. // apikey.DefaultRateLimit7d holds the default value on creation for the rate_limit_7d field.
  140. apikey.DefaultRateLimit7d = apikeyDescRateLimit7d.Default.(float64)
  141. // apikeyDescUsage5h is the schema descriptor for usage_5h field.
  142. apikeyDescUsage5h := apikeyFields[16].Descriptor()
  143. // apikey.DefaultUsage5h holds the default value on creation for the usage_5h field.
  144. apikey.DefaultUsage5h = apikeyDescUsage5h.Default.(float64)
  145. // apikeyDescUsage1d is the schema descriptor for usage_1d field.
  146. apikeyDescUsage1d := apikeyFields[17].Descriptor()
  147. // apikey.DefaultUsage1d holds the default value on creation for the usage_1d field.
  148. apikey.DefaultUsage1d = apikeyDescUsage1d.Default.(float64)
  149. // apikeyDescUsage7d is the schema descriptor for usage_7d field.
  150. apikeyDescUsage7d := apikeyFields[18].Descriptor()
  151. // apikey.DefaultUsage7d holds the default value on creation for the usage_7d field.
  152. apikey.DefaultUsage7d = apikeyDescUsage7d.Default.(float64)
  153. accountMixin := schema.Account{}.Mixin()
  154. accountMixinHooks1 := accountMixin[1].Hooks()
  155. account.Hooks[0] = accountMixinHooks1[0]
  156. accountMixinInters1 := accountMixin[1].Interceptors()
  157. account.Interceptors[0] = accountMixinInters1[0]
  158. accountMixinFields0 := accountMixin[0].Fields()
  159. _ = accountMixinFields0
  160. accountFields := schema.Account{}.Fields()
  161. _ = accountFields
  162. // accountDescCreatedAt is the schema descriptor for created_at field.
  163. accountDescCreatedAt := accountMixinFields0[0].Descriptor()
  164. // account.DefaultCreatedAt holds the default value on creation for the created_at field.
  165. account.DefaultCreatedAt = accountDescCreatedAt.Default.(func() time.Time)
  166. // accountDescUpdatedAt is the schema descriptor for updated_at field.
  167. accountDescUpdatedAt := accountMixinFields0[1].Descriptor()
  168. // account.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  169. account.DefaultUpdatedAt = accountDescUpdatedAt.Default.(func() time.Time)
  170. // account.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  171. account.UpdateDefaultUpdatedAt = accountDescUpdatedAt.UpdateDefault.(func() time.Time)
  172. // accountDescName is the schema descriptor for name field.
  173. accountDescName := accountFields[0].Descriptor()
  174. // account.NameValidator is a validator for the "name" field. It is called by the builders before save.
  175. account.NameValidator = func() func(string) error {
  176. validators := accountDescName.Validators
  177. fns := [...]func(string) error{
  178. validators[0].(func(string) error),
  179. validators[1].(func(string) error),
  180. }
  181. return func(name string) error {
  182. for _, fn := range fns {
  183. if err := fn(name); err != nil {
  184. return err
  185. }
  186. }
  187. return nil
  188. }
  189. }()
  190. // accountDescPlatform is the schema descriptor for platform field.
  191. accountDescPlatform := accountFields[2].Descriptor()
  192. // account.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
  193. account.PlatformValidator = func() func(string) error {
  194. validators := accountDescPlatform.Validators
  195. fns := [...]func(string) error{
  196. validators[0].(func(string) error),
  197. validators[1].(func(string) error),
  198. }
  199. return func(platform string) error {
  200. for _, fn := range fns {
  201. if err := fn(platform); err != nil {
  202. return err
  203. }
  204. }
  205. return nil
  206. }
  207. }()
  208. // accountDescType is the schema descriptor for type field.
  209. accountDescType := accountFields[3].Descriptor()
  210. // account.TypeValidator is a validator for the "type" field. It is called by the builders before save.
  211. account.TypeValidator = func() func(string) error {
  212. validators := accountDescType.Validators
  213. fns := [...]func(string) error{
  214. validators[0].(func(string) error),
  215. validators[1].(func(string) error),
  216. }
  217. return func(_type string) error {
  218. for _, fn := range fns {
  219. if err := fn(_type); err != nil {
  220. return err
  221. }
  222. }
  223. return nil
  224. }
  225. }()
  226. // accountDescCredentials is the schema descriptor for credentials field.
  227. accountDescCredentials := accountFields[4].Descriptor()
  228. // account.DefaultCredentials holds the default value on creation for the credentials field.
  229. account.DefaultCredentials = accountDescCredentials.Default.(func() map[string]interface{})
  230. // accountDescExtra is the schema descriptor for extra field.
  231. accountDescExtra := accountFields[5].Descriptor()
  232. // account.DefaultExtra holds the default value on creation for the extra field.
  233. account.DefaultExtra = accountDescExtra.Default.(func() map[string]interface{})
  234. // accountDescConcurrency is the schema descriptor for concurrency field.
  235. accountDescConcurrency := accountFields[8].Descriptor()
  236. // account.DefaultConcurrency holds the default value on creation for the concurrency field.
  237. account.DefaultConcurrency = accountDescConcurrency.Default.(int)
  238. // accountDescPriority is the schema descriptor for priority field.
  239. accountDescPriority := accountFields[10].Descriptor()
  240. // account.DefaultPriority holds the default value on creation for the priority field.
  241. account.DefaultPriority = accountDescPriority.Default.(int)
  242. // accountDescRateMultiplier is the schema descriptor for rate_multiplier field.
  243. accountDescRateMultiplier := accountFields[11].Descriptor()
  244. // account.DefaultRateMultiplier holds the default value on creation for the rate_multiplier field.
  245. account.DefaultRateMultiplier = accountDescRateMultiplier.Default.(float64)
  246. // accountDescStatus is the schema descriptor for status field.
  247. accountDescStatus := accountFields[12].Descriptor()
  248. // account.DefaultStatus holds the default value on creation for the status field.
  249. account.DefaultStatus = accountDescStatus.Default.(string)
  250. // account.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  251. account.StatusValidator = accountDescStatus.Validators[0].(func(string) error)
  252. // accountDescAutoPauseOnExpired is the schema descriptor for auto_pause_on_expired field.
  253. accountDescAutoPauseOnExpired := accountFields[16].Descriptor()
  254. // account.DefaultAutoPauseOnExpired holds the default value on creation for the auto_pause_on_expired field.
  255. account.DefaultAutoPauseOnExpired = accountDescAutoPauseOnExpired.Default.(bool)
  256. // accountDescSchedulable is the schema descriptor for schedulable field.
  257. accountDescSchedulable := accountFields[17].Descriptor()
  258. // account.DefaultSchedulable holds the default value on creation for the schedulable field.
  259. account.DefaultSchedulable = accountDescSchedulable.Default.(bool)
  260. // accountDescSessionWindowStatus is the schema descriptor for session_window_status field.
  261. accountDescSessionWindowStatus := accountFields[25].Descriptor()
  262. // account.SessionWindowStatusValidator is a validator for the "session_window_status" field. It is called by the builders before save.
  263. account.SessionWindowStatusValidator = accountDescSessionWindowStatus.Validators[0].(func(string) error)
  264. accountgroupFields := schema.AccountGroup{}.Fields()
  265. _ = accountgroupFields
  266. // accountgroupDescPriority is the schema descriptor for priority field.
  267. accountgroupDescPriority := accountgroupFields[2].Descriptor()
  268. // accountgroup.DefaultPriority holds the default value on creation for the priority field.
  269. accountgroup.DefaultPriority = accountgroupDescPriority.Default.(int)
  270. // accountgroupDescCreatedAt is the schema descriptor for created_at field.
  271. accountgroupDescCreatedAt := accountgroupFields[3].Descriptor()
  272. // accountgroup.DefaultCreatedAt holds the default value on creation for the created_at field.
  273. accountgroup.DefaultCreatedAt = accountgroupDescCreatedAt.Default.(func() time.Time)
  274. announcementFields := schema.Announcement{}.Fields()
  275. _ = announcementFields
  276. // announcementDescTitle is the schema descriptor for title field.
  277. announcementDescTitle := announcementFields[0].Descriptor()
  278. // announcement.TitleValidator is a validator for the "title" field. It is called by the builders before save.
  279. announcement.TitleValidator = func() func(string) error {
  280. validators := announcementDescTitle.Validators
  281. fns := [...]func(string) error{
  282. validators[0].(func(string) error),
  283. validators[1].(func(string) error),
  284. }
  285. return func(title string) error {
  286. for _, fn := range fns {
  287. if err := fn(title); err != nil {
  288. return err
  289. }
  290. }
  291. return nil
  292. }
  293. }()
  294. // announcementDescContent is the schema descriptor for content field.
  295. announcementDescContent := announcementFields[1].Descriptor()
  296. // announcement.ContentValidator is a validator for the "content" field. It is called by the builders before save.
  297. announcement.ContentValidator = announcementDescContent.Validators[0].(func(string) error)
  298. // announcementDescStatus is the schema descriptor for status field.
  299. announcementDescStatus := announcementFields[2].Descriptor()
  300. // announcement.DefaultStatus holds the default value on creation for the status field.
  301. announcement.DefaultStatus = announcementDescStatus.Default.(string)
  302. // announcement.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  303. announcement.StatusValidator = announcementDescStatus.Validators[0].(func(string) error)
  304. // announcementDescNotifyMode is the schema descriptor for notify_mode field.
  305. announcementDescNotifyMode := announcementFields[3].Descriptor()
  306. // announcement.DefaultNotifyMode holds the default value on creation for the notify_mode field.
  307. announcement.DefaultNotifyMode = announcementDescNotifyMode.Default.(string)
  308. // announcement.NotifyModeValidator is a validator for the "notify_mode" field. It is called by the builders before save.
  309. announcement.NotifyModeValidator = announcementDescNotifyMode.Validators[0].(func(string) error)
  310. // announcementDescCreatedAt is the schema descriptor for created_at field.
  311. announcementDescCreatedAt := announcementFields[9].Descriptor()
  312. // announcement.DefaultCreatedAt holds the default value on creation for the created_at field.
  313. announcement.DefaultCreatedAt = announcementDescCreatedAt.Default.(func() time.Time)
  314. // announcementDescUpdatedAt is the schema descriptor for updated_at field.
  315. announcementDescUpdatedAt := announcementFields[10].Descriptor()
  316. // announcement.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  317. announcement.DefaultUpdatedAt = announcementDescUpdatedAt.Default.(func() time.Time)
  318. // announcement.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  319. announcement.UpdateDefaultUpdatedAt = announcementDescUpdatedAt.UpdateDefault.(func() time.Time)
  320. announcementreadFields := schema.AnnouncementRead{}.Fields()
  321. _ = announcementreadFields
  322. // announcementreadDescReadAt is the schema descriptor for read_at field.
  323. announcementreadDescReadAt := announcementreadFields[2].Descriptor()
  324. // announcementread.DefaultReadAt holds the default value on creation for the read_at field.
  325. announcementread.DefaultReadAt = announcementreadDescReadAt.Default.(func() time.Time)
  326. // announcementreadDescCreatedAt is the schema descriptor for created_at field.
  327. announcementreadDescCreatedAt := announcementreadFields[3].Descriptor()
  328. // announcementread.DefaultCreatedAt holds the default value on creation for the created_at field.
  329. announcementread.DefaultCreatedAt = announcementreadDescCreatedAt.Default.(func() time.Time)
  330. authidentityMixin := schema.AuthIdentity{}.Mixin()
  331. authidentityMixinFields0 := authidentityMixin[0].Fields()
  332. _ = authidentityMixinFields0
  333. authidentityFields := schema.AuthIdentity{}.Fields()
  334. _ = authidentityFields
  335. // authidentityDescCreatedAt is the schema descriptor for created_at field.
  336. authidentityDescCreatedAt := authidentityMixinFields0[0].Descriptor()
  337. // authidentity.DefaultCreatedAt holds the default value on creation for the created_at field.
  338. authidentity.DefaultCreatedAt = authidentityDescCreatedAt.Default.(func() time.Time)
  339. // authidentityDescUpdatedAt is the schema descriptor for updated_at field.
  340. authidentityDescUpdatedAt := authidentityMixinFields0[1].Descriptor()
  341. // authidentity.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  342. authidentity.DefaultUpdatedAt = authidentityDescUpdatedAt.Default.(func() time.Time)
  343. // authidentity.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  344. authidentity.UpdateDefaultUpdatedAt = authidentityDescUpdatedAt.UpdateDefault.(func() time.Time)
  345. // authidentityDescProviderType is the schema descriptor for provider_type field.
  346. authidentityDescProviderType := authidentityFields[1].Descriptor()
  347. // authidentity.ProviderTypeValidator is a validator for the "provider_type" field. It is called by the builders before save.
  348. authidentity.ProviderTypeValidator = func() func(string) error {
  349. validators := authidentityDescProviderType.Validators
  350. fns := [...]func(string) error{
  351. validators[0].(func(string) error),
  352. validators[1].(func(string) error),
  353. validators[2].(func(string) error),
  354. }
  355. return func(provider_type string) error {
  356. for _, fn := range fns {
  357. if err := fn(provider_type); err != nil {
  358. return err
  359. }
  360. }
  361. return nil
  362. }
  363. }()
  364. // authidentityDescProviderKey is the schema descriptor for provider_key field.
  365. authidentityDescProviderKey := authidentityFields[2].Descriptor()
  366. // authidentity.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
  367. authidentity.ProviderKeyValidator = authidentityDescProviderKey.Validators[0].(func(string) error)
  368. // authidentityDescProviderSubject is the schema descriptor for provider_subject field.
  369. authidentityDescProviderSubject := authidentityFields[3].Descriptor()
  370. // authidentity.ProviderSubjectValidator is a validator for the "provider_subject" field. It is called by the builders before save.
  371. authidentity.ProviderSubjectValidator = authidentityDescProviderSubject.Validators[0].(func(string) error)
  372. // authidentityDescMetadata is the schema descriptor for metadata field.
  373. authidentityDescMetadata := authidentityFields[6].Descriptor()
  374. // authidentity.DefaultMetadata holds the default value on creation for the metadata field.
  375. authidentity.DefaultMetadata = authidentityDescMetadata.Default.(func() map[string]interface{})
  376. authidentitychannelMixin := schema.AuthIdentityChannel{}.Mixin()
  377. authidentitychannelMixinFields0 := authidentitychannelMixin[0].Fields()
  378. _ = authidentitychannelMixinFields0
  379. authidentitychannelFields := schema.AuthIdentityChannel{}.Fields()
  380. _ = authidentitychannelFields
  381. // authidentitychannelDescCreatedAt is the schema descriptor for created_at field.
  382. authidentitychannelDescCreatedAt := authidentitychannelMixinFields0[0].Descriptor()
  383. // authidentitychannel.DefaultCreatedAt holds the default value on creation for the created_at field.
  384. authidentitychannel.DefaultCreatedAt = authidentitychannelDescCreatedAt.Default.(func() time.Time)
  385. // authidentitychannelDescUpdatedAt is the schema descriptor for updated_at field.
  386. authidentitychannelDescUpdatedAt := authidentitychannelMixinFields0[1].Descriptor()
  387. // authidentitychannel.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  388. authidentitychannel.DefaultUpdatedAt = authidentitychannelDescUpdatedAt.Default.(func() time.Time)
  389. // authidentitychannel.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  390. authidentitychannel.UpdateDefaultUpdatedAt = authidentitychannelDescUpdatedAt.UpdateDefault.(func() time.Time)
  391. // authidentitychannelDescProviderType is the schema descriptor for provider_type field.
  392. authidentitychannelDescProviderType := authidentitychannelFields[1].Descriptor()
  393. // authidentitychannel.ProviderTypeValidator is a validator for the "provider_type" field. It is called by the builders before save.
  394. authidentitychannel.ProviderTypeValidator = func() func(string) error {
  395. validators := authidentitychannelDescProviderType.Validators
  396. fns := [...]func(string) error{
  397. validators[0].(func(string) error),
  398. validators[1].(func(string) error),
  399. validators[2].(func(string) error),
  400. }
  401. return func(provider_type string) error {
  402. for _, fn := range fns {
  403. if err := fn(provider_type); err != nil {
  404. return err
  405. }
  406. }
  407. return nil
  408. }
  409. }()
  410. // authidentitychannelDescProviderKey is the schema descriptor for provider_key field.
  411. authidentitychannelDescProviderKey := authidentitychannelFields[2].Descriptor()
  412. // authidentitychannel.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
  413. authidentitychannel.ProviderKeyValidator = authidentitychannelDescProviderKey.Validators[0].(func(string) error)
  414. // authidentitychannelDescChannel is the schema descriptor for channel field.
  415. authidentitychannelDescChannel := authidentitychannelFields[3].Descriptor()
  416. // authidentitychannel.ChannelValidator is a validator for the "channel" field. It is called by the builders before save.
  417. authidentitychannel.ChannelValidator = func() func(string) error {
  418. validators := authidentitychannelDescChannel.Validators
  419. fns := [...]func(string) error{
  420. validators[0].(func(string) error),
  421. validators[1].(func(string) error),
  422. }
  423. return func(channel string) error {
  424. for _, fn := range fns {
  425. if err := fn(channel); err != nil {
  426. return err
  427. }
  428. }
  429. return nil
  430. }
  431. }()
  432. // authidentitychannelDescChannelAppID is the schema descriptor for channel_app_id field.
  433. authidentitychannelDescChannelAppID := authidentitychannelFields[4].Descriptor()
  434. // authidentitychannel.ChannelAppIDValidator is a validator for the "channel_app_id" field. It is called by the builders before save.
  435. authidentitychannel.ChannelAppIDValidator = authidentitychannelDescChannelAppID.Validators[0].(func(string) error)
  436. // authidentitychannelDescChannelSubject is the schema descriptor for channel_subject field.
  437. authidentitychannelDescChannelSubject := authidentitychannelFields[5].Descriptor()
  438. // authidentitychannel.ChannelSubjectValidator is a validator for the "channel_subject" field. It is called by the builders before save.
  439. authidentitychannel.ChannelSubjectValidator = authidentitychannelDescChannelSubject.Validators[0].(func(string) error)
  440. // authidentitychannelDescMetadata is the schema descriptor for metadata field.
  441. authidentitychannelDescMetadata := authidentitychannelFields[6].Descriptor()
  442. // authidentitychannel.DefaultMetadata holds the default value on creation for the metadata field.
  443. authidentitychannel.DefaultMetadata = authidentitychannelDescMetadata.Default.(func() map[string]interface{})
  444. batchimageeventFields := schema.BatchImageEvent{}.Fields()
  445. _ = batchimageeventFields
  446. // batchimageeventDescJobID is the schema descriptor for job_id field.
  447. batchimageeventDescJobID := batchimageeventFields[0].Descriptor()
  448. // batchimageevent.JobIDValidator is a validator for the "job_id" field. It is called by the builders before save.
  449. batchimageevent.JobIDValidator = batchimageeventDescJobID.Validators[0].(func(string) error)
  450. // batchimageeventDescEventType is the schema descriptor for event_type field.
  451. batchimageeventDescEventType := batchimageeventFields[1].Descriptor()
  452. // batchimageevent.EventTypeValidator is a validator for the "event_type" field. It is called by the builders before save.
  453. batchimageevent.EventTypeValidator = batchimageeventDescEventType.Validators[0].(func(string) error)
  454. // batchimageeventDescEventHash is the schema descriptor for event_hash field.
  455. batchimageeventDescEventHash := batchimageeventFields[3].Descriptor()
  456. // batchimageevent.EventHashValidator is a validator for the "event_hash" field. It is called by the builders before save.
  457. batchimageevent.EventHashValidator = batchimageeventDescEventHash.Validators[0].(func(string) error)
  458. // batchimageeventDescCreatedAt is the schema descriptor for created_at field.
  459. batchimageeventDescCreatedAt := batchimageeventFields[4].Descriptor()
  460. // batchimageevent.DefaultCreatedAt holds the default value on creation for the created_at field.
  461. batchimageevent.DefaultCreatedAt = batchimageeventDescCreatedAt.Default.(func() time.Time)
  462. batchimageitemFields := schema.BatchImageItem{}.Fields()
  463. _ = batchimageitemFields
  464. // batchimageitemDescJobID is the schema descriptor for job_id field.
  465. batchimageitemDescJobID := batchimageitemFields[0].Descriptor()
  466. // batchimageitem.JobIDValidator is a validator for the "job_id" field. It is called by the builders before save.
  467. batchimageitem.JobIDValidator = batchimageitemDescJobID.Validators[0].(func(string) error)
  468. // batchimageitemDescCustomID is the schema descriptor for custom_id field.
  469. batchimageitemDescCustomID := batchimageitemFields[1].Descriptor()
  470. // batchimageitem.CustomIDValidator is a validator for the "custom_id" field. It is called by the builders before save.
  471. batchimageitem.CustomIDValidator = batchimageitemDescCustomID.Validators[0].(func(string) error)
  472. // batchimageitemDescStatus is the schema descriptor for status field.
  473. batchimageitemDescStatus := batchimageitemFields[2].Descriptor()
  474. // batchimageitem.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  475. batchimageitem.StatusValidator = batchimageitemDescStatus.Validators[0].(func(string) error)
  476. // batchimageitemDescRequestHash is the schema descriptor for request_hash field.
  477. batchimageitemDescRequestHash := batchimageitemFields[3].Descriptor()
  478. // batchimageitem.RequestHashValidator is a validator for the "request_hash" field. It is called by the builders before save.
  479. batchimageitem.RequestHashValidator = batchimageitemDescRequestHash.Validators[0].(func(string) error)
  480. // batchimageitemDescProviderSourceObject is the schema descriptor for provider_source_object field.
  481. batchimageitemDescProviderSourceObject := batchimageitemFields[5].Descriptor()
  482. // batchimageitem.ProviderSourceObjectValidator is a validator for the "provider_source_object" field. It is called by the builders before save.
  483. batchimageitem.ProviderSourceObjectValidator = batchimageitemDescProviderSourceObject.Validators[0].(func(string) error)
  484. // batchimageitemDescMimeType is the schema descriptor for mime_type field.
  485. batchimageitemDescMimeType := batchimageitemFields[9].Descriptor()
  486. // batchimageitem.MimeTypeValidator is a validator for the "mime_type" field. It is called by the builders before save.
  487. batchimageitem.MimeTypeValidator = batchimageitemDescMimeType.Validators[0].(func(string) error)
  488. // batchimageitemDescFileExtension is the schema descriptor for file_extension field.
  489. batchimageitemDescFileExtension := batchimageitemFields[10].Descriptor()
  490. // batchimageitem.FileExtensionValidator is a validator for the "file_extension" field. It is called by the builders before save.
  491. batchimageitem.FileExtensionValidator = batchimageitemDescFileExtension.Validators[0].(func(string) error)
  492. // batchimageitemDescImageCount is the schema descriptor for image_count field.
  493. batchimageitemDescImageCount := batchimageitemFields[11].Descriptor()
  494. // batchimageitem.DefaultImageCount holds the default value on creation for the image_count field.
  495. batchimageitem.DefaultImageCount = batchimageitemDescImageCount.Default.(int)
  496. // batchimageitemDescErrorCode is the schema descriptor for error_code field.
  497. batchimageitemDescErrorCode := batchimageitemFields[12].Descriptor()
  498. // batchimageitem.ErrorCodeValidator is a validator for the "error_code" field. It is called by the builders before save.
  499. batchimageitem.ErrorCodeValidator = batchimageitemDescErrorCode.Validators[0].(func(string) error)
  500. // batchimageitemDescCreatedAt is the schema descriptor for created_at field.
  501. batchimageitemDescCreatedAt := batchimageitemFields[15].Descriptor()
  502. // batchimageitem.DefaultCreatedAt holds the default value on creation for the created_at field.
  503. batchimageitem.DefaultCreatedAt = batchimageitemDescCreatedAt.Default.(func() time.Time)
  504. batchimagejobFields := schema.BatchImageJob{}.Fields()
  505. _ = batchimagejobFields
  506. // batchimagejobDescBatchID is the schema descriptor for batch_id field.
  507. batchimagejobDescBatchID := batchimagejobFields[0].Descriptor()
  508. // batchimagejob.BatchIDValidator is a validator for the "batch_id" field. It is called by the builders before save.
  509. batchimagejob.BatchIDValidator = batchimagejobDescBatchID.Validators[0].(func(string) error)
  510. // batchimagejobDescProvider is the schema descriptor for provider field.
  511. batchimagejobDescProvider := batchimagejobFields[4].Descriptor()
  512. // batchimagejob.ProviderValidator is a validator for the "provider" field. It is called by the builders before save.
  513. batchimagejob.ProviderValidator = batchimagejobDescProvider.Validators[0].(func(string) error)
  514. // batchimagejobDescModel is the schema descriptor for model field.
  515. batchimagejobDescModel := batchimagejobFields[5].Descriptor()
  516. // batchimagejob.ModelValidator is a validator for the "model" field. It is called by the builders before save.
  517. batchimagejob.ModelValidator = batchimagejobDescModel.Validators[0].(func(string) error)
  518. // batchimagejobDescTaskName is the schema descriptor for task_name field.
  519. batchimagejobDescTaskName := batchimagejobFields[6].Descriptor()
  520. // batchimagejob.DefaultTaskName holds the default value on creation for the task_name field.
  521. batchimagejob.DefaultTaskName = batchimagejobDescTaskName.Default.(string)
  522. // batchimagejob.TaskNameValidator is a validator for the "task_name" field. It is called by the builders before save.
  523. batchimagejob.TaskNameValidator = batchimagejobDescTaskName.Validators[0].(func(string) error)
  524. // batchimagejobDescStatus is the schema descriptor for status field.
  525. batchimagejobDescStatus := batchimagejobFields[7].Descriptor()
  526. // batchimagejob.DefaultStatus holds the default value on creation for the status field.
  527. batchimagejob.DefaultStatus = batchimagejobDescStatus.Default.(string)
  528. // batchimagejob.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  529. batchimagejob.StatusValidator = batchimagejobDescStatus.Validators[0].(func(string) error)
  530. // batchimagejobDescProviderJobName is the schema descriptor for provider_job_name field.
  531. batchimagejobDescProviderJobName := batchimagejobFields[8].Descriptor()
  532. // batchimagejob.ProviderJobNameValidator is a validator for the "provider_job_name" field. It is called by the builders before save.
  533. batchimagejob.ProviderJobNameValidator = batchimagejobDescProviderJobName.Validators[0].(func(string) error)
  534. // batchimagejobDescProviderInputRef is the schema descriptor for provider_input_ref field.
  535. batchimagejobDescProviderInputRef := batchimagejobFields[9].Descriptor()
  536. // batchimagejob.ProviderInputRefValidator is a validator for the "provider_input_ref" field. It is called by the builders before save.
  537. batchimagejob.ProviderInputRefValidator = batchimagejobDescProviderInputRef.Validators[0].(func(string) error)
  538. // batchimagejobDescProviderOutputRef is the schema descriptor for provider_output_ref field.
  539. batchimagejobDescProviderOutputRef := batchimagejobFields[10].Descriptor()
  540. // batchimagejob.ProviderOutputRefValidator is a validator for the "provider_output_ref" field. It is called by the builders before save.
  541. batchimagejob.ProviderOutputRefValidator = batchimagejobDescProviderOutputRef.Validators[0].(func(string) error)
  542. // batchimagejobDescGcsInputURI is the schema descriptor for gcs_input_uri field.
  543. batchimagejobDescGcsInputURI := batchimagejobFields[11].Descriptor()
  544. // batchimagejob.GcsInputURIValidator is a validator for the "gcs_input_uri" field. It is called by the builders before save.
  545. batchimagejob.GcsInputURIValidator = batchimagejobDescGcsInputURI.Validators[0].(func(string) error)
  546. // batchimagejobDescGcsOutputURI is the schema descriptor for gcs_output_uri field.
  547. batchimagejobDescGcsOutputURI := batchimagejobFields[12].Descriptor()
  548. // batchimagejob.GcsOutputURIValidator is a validator for the "gcs_output_uri" field. It is called by the builders before save.
  549. batchimagejob.GcsOutputURIValidator = batchimagejobDescGcsOutputURI.Validators[0].(func(string) error)
  550. // batchimagejobDescSuccessCount is the schema descriptor for success_count field.
  551. batchimagejobDescSuccessCount := batchimagejobFields[14].Descriptor()
  552. // batchimagejob.DefaultSuccessCount holds the default value on creation for the success_count field.
  553. batchimagejob.DefaultSuccessCount = batchimagejobDescSuccessCount.Default.(int)
  554. // batchimagejobDescFailCount is the schema descriptor for fail_count field.
  555. batchimagejobDescFailCount := batchimagejobFields[15].Descriptor()
  556. // batchimagejob.DefaultFailCount holds the default value on creation for the fail_count field.
  557. batchimagejob.DefaultFailCount = batchimagejobDescFailCount.Default.(int)
  558. // batchimagejobDescCancelledCount is the schema descriptor for cancelled_count field.
  559. batchimagejobDescCancelledCount := batchimagejobFields[16].Descriptor()
  560. // batchimagejob.DefaultCancelledCount holds the default value on creation for the cancelled_count field.
  561. batchimagejob.DefaultCancelledCount = batchimagejobDescCancelledCount.Default.(int)
  562. // batchimagejobDescEstimatedCost is the schema descriptor for estimated_cost field.
  563. batchimagejobDescEstimatedCost := batchimagejobFields[17].Descriptor()
  564. // batchimagejob.DefaultEstimatedCost holds the default value on creation for the estimated_cost field.
  565. batchimagejob.DefaultEstimatedCost = batchimagejobDescEstimatedCost.Default.(float64)
  566. // batchimagejobDescCurrency is the schema descriptor for currency field.
  567. batchimagejobDescCurrency := batchimagejobFields[20].Descriptor()
  568. // batchimagejob.DefaultCurrency holds the default value on creation for the currency field.
  569. batchimagejob.DefaultCurrency = batchimagejobDescCurrency.Default.(string)
  570. // batchimagejob.CurrencyValidator is a validator for the "currency" field. It is called by the builders before save.
  571. batchimagejob.CurrencyValidator = batchimagejobDescCurrency.Validators[0].(func(string) error)
  572. // batchimagejobDescHoldID is the schema descriptor for hold_id field.
  573. batchimagejobDescHoldID := batchimagejobFields[21].Descriptor()
  574. // batchimagejob.HoldIDValidator is a validator for the "hold_id" field. It is called by the builders before save.
  575. batchimagejob.HoldIDValidator = batchimagejobDescHoldID.Validators[0].(func(string) error)
  576. // batchimagejobDescIdempotencyKey is the schema descriptor for idempotency_key field.
  577. batchimagejobDescIdempotencyKey := batchimagejobFields[22].Descriptor()
  578. // batchimagejob.IdempotencyKeyValidator is a validator for the "idempotency_key" field. It is called by the builders before save.
  579. batchimagejob.IdempotencyKeyValidator = batchimagejobDescIdempotencyKey.Validators[0].(func(string) error)
  580. // batchimagejobDescRequestHash is the schema descriptor for request_hash field.
  581. batchimagejobDescRequestHash := batchimagejobFields[23].Descriptor()
  582. // batchimagejob.RequestHashValidator is a validator for the "request_hash" field. It is called by the builders before save.
  583. batchimagejob.RequestHashValidator = batchimagejobDescRequestHash.Validators[0].(func(string) error)
  584. // batchimagejobDescManifestHash is the schema descriptor for manifest_hash field.
  585. batchimagejobDescManifestHash := batchimagejobFields[24].Descriptor()
  586. // batchimagejob.ManifestHashValidator is a validator for the "manifest_hash" field. It is called by the builders before save.
  587. batchimagejob.ManifestHashValidator = batchimagejobDescManifestHash.Validators[0].(func(string) error)
  588. // batchimagejobDescRetryCount is the schema descriptor for retry_count field.
  589. batchimagejobDescRetryCount := batchimagejobFields[25].Descriptor()
  590. // batchimagejob.DefaultRetryCount holds the default value on creation for the retry_count field.
  591. batchimagejob.DefaultRetryCount = batchimagejobDescRetryCount.Default.(int)
  592. // batchimagejobDescVersion is the schema descriptor for version field.
  593. batchimagejobDescVersion := batchimagejobFields[26].Descriptor()
  594. // batchimagejob.DefaultVersion holds the default value on creation for the version field.
  595. batchimagejob.DefaultVersion = batchimagejobDescVersion.Default.(int)
  596. // batchimagejobDescLastErrorCode is the schema descriptor for last_error_code field.
  597. batchimagejobDescLastErrorCode := batchimagejobFields[32].Descriptor()
  598. // batchimagejob.LastErrorCodeValidator is a validator for the "last_error_code" field. It is called by the builders before save.
  599. batchimagejob.LastErrorCodeValidator = batchimagejobDescLastErrorCode.Validators[0].(func(string) error)
  600. // batchimagejobDescCreatedAt is the schema descriptor for created_at field.
  601. batchimagejobDescCreatedAt := batchimagejobFields[34].Descriptor()
  602. // batchimagejob.DefaultCreatedAt holds the default value on creation for the created_at field.
  603. batchimagejob.DefaultCreatedAt = batchimagejobDescCreatedAt.Default.(func() time.Time)
  604. // batchimagejobDescUpdatedAt is the schema descriptor for updated_at field.
  605. batchimagejobDescUpdatedAt := batchimagejobFields[35].Descriptor()
  606. // batchimagejob.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  607. batchimagejob.DefaultUpdatedAt = batchimagejobDescUpdatedAt.Default.(func() time.Time)
  608. // batchimagejob.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  609. batchimagejob.UpdateDefaultUpdatedAt = batchimagejobDescUpdatedAt.UpdateDefault.(func() time.Time)
  610. channelmonitorMixin := schema.ChannelMonitor{}.Mixin()
  611. channelmonitorMixinFields0 := channelmonitorMixin[0].Fields()
  612. _ = channelmonitorMixinFields0
  613. channelmonitorFields := schema.ChannelMonitor{}.Fields()
  614. _ = channelmonitorFields
  615. // channelmonitorDescCreatedAt is the schema descriptor for created_at field.
  616. channelmonitorDescCreatedAt := channelmonitorMixinFields0[0].Descriptor()
  617. // channelmonitor.DefaultCreatedAt holds the default value on creation for the created_at field.
  618. channelmonitor.DefaultCreatedAt = channelmonitorDescCreatedAt.Default.(func() time.Time)
  619. // channelmonitorDescUpdatedAt is the schema descriptor for updated_at field.
  620. channelmonitorDescUpdatedAt := channelmonitorMixinFields0[1].Descriptor()
  621. // channelmonitor.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  622. channelmonitor.DefaultUpdatedAt = channelmonitorDescUpdatedAt.Default.(func() time.Time)
  623. // channelmonitor.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  624. channelmonitor.UpdateDefaultUpdatedAt = channelmonitorDescUpdatedAt.UpdateDefault.(func() time.Time)
  625. // channelmonitorDescName is the schema descriptor for name field.
  626. channelmonitorDescName := channelmonitorFields[0].Descriptor()
  627. // channelmonitor.NameValidator is a validator for the "name" field. It is called by the builders before save.
  628. channelmonitor.NameValidator = func() func(string) error {
  629. validators := channelmonitorDescName.Validators
  630. fns := [...]func(string) error{
  631. validators[0].(func(string) error),
  632. validators[1].(func(string) error),
  633. }
  634. return func(name string) error {
  635. for _, fn := range fns {
  636. if err := fn(name); err != nil {
  637. return err
  638. }
  639. }
  640. return nil
  641. }
  642. }()
  643. // channelmonitorDescCheckMode is the schema descriptor for check_mode field.
  644. channelmonitorDescCheckMode := channelmonitorFields[2].Descriptor()
  645. // channelmonitor.DefaultCheckMode holds the default value on creation for the check_mode field.
  646. channelmonitor.DefaultCheckMode = channelmonitorDescCheckMode.Default.(string)
  647. // channelmonitor.CheckModeValidator is a validator for the "check_mode" field. It is called by the builders before save.
  648. channelmonitor.CheckModeValidator = channelmonitorDescCheckMode.Validators[0].(func(string) error)
  649. // channelmonitorDescAPIMode is the schema descriptor for api_mode field.
  650. channelmonitorDescAPIMode := channelmonitorFields[4].Descriptor()
  651. // channelmonitor.DefaultAPIMode holds the default value on creation for the api_mode field.
  652. channelmonitor.DefaultAPIMode = channelmonitorDescAPIMode.Default.(string)
  653. // channelmonitor.APIModeValidator is a validator for the "api_mode" field. It is called by the builders before save.
  654. channelmonitor.APIModeValidator = channelmonitorDescAPIMode.Validators[0].(func(string) error)
  655. // channelmonitorDescEndpoint is the schema descriptor for endpoint field.
  656. channelmonitorDescEndpoint := channelmonitorFields[5].Descriptor()
  657. // channelmonitor.EndpointValidator is a validator for the "endpoint" field. It is called by the builders before save.
  658. channelmonitor.EndpointValidator = channelmonitorDescEndpoint.Validators[0].(func(string) error)
  659. // channelmonitorDescAPIKeyEncrypted is the schema descriptor for api_key_encrypted field.
  660. channelmonitorDescAPIKeyEncrypted := channelmonitorFields[6].Descriptor()
  661. // channelmonitor.APIKeyEncryptedValidator is a validator for the "api_key_encrypted" field. It is called by the builders before save.
  662. channelmonitor.APIKeyEncryptedValidator = channelmonitorDescAPIKeyEncrypted.Validators[0].(func(string) error)
  663. // channelmonitorDescPrimaryModel is the schema descriptor for primary_model field.
  664. channelmonitorDescPrimaryModel := channelmonitorFields[7].Descriptor()
  665. // channelmonitor.PrimaryModelValidator is a validator for the "primary_model" field. It is called by the builders before save.
  666. channelmonitor.PrimaryModelValidator = func() func(string) error {
  667. validators := channelmonitorDescPrimaryModel.Validators
  668. fns := [...]func(string) error{
  669. validators[0].(func(string) error),
  670. validators[1].(func(string) error),
  671. }
  672. return func(primary_model string) error {
  673. for _, fn := range fns {
  674. if err := fn(primary_model); err != nil {
  675. return err
  676. }
  677. }
  678. return nil
  679. }
  680. }()
  681. // channelmonitorDescExtraModels is the schema descriptor for extra_models field.
  682. channelmonitorDescExtraModels := channelmonitorFields[8].Descriptor()
  683. // channelmonitor.DefaultExtraModels holds the default value on creation for the extra_models field.
  684. channelmonitor.DefaultExtraModels = channelmonitorDescExtraModels.Default.([]string)
  685. // channelmonitorDescGroupName is the schema descriptor for group_name field.
  686. channelmonitorDescGroupName := channelmonitorFields[9].Descriptor()
  687. // channelmonitor.DefaultGroupName holds the default value on creation for the group_name field.
  688. channelmonitor.DefaultGroupName = channelmonitorDescGroupName.Default.(string)
  689. // channelmonitor.GroupNameValidator is a validator for the "group_name" field. It is called by the builders before save.
  690. channelmonitor.GroupNameValidator = channelmonitorDescGroupName.Validators[0].(func(string) error)
  691. // channelmonitorDescEnabled is the schema descriptor for enabled field.
  692. channelmonitorDescEnabled := channelmonitorFields[10].Descriptor()
  693. // channelmonitor.DefaultEnabled holds the default value on creation for the enabled field.
  694. channelmonitor.DefaultEnabled = channelmonitorDescEnabled.Default.(bool)
  695. // channelmonitorDescIntervalSeconds is the schema descriptor for interval_seconds field.
  696. channelmonitorDescIntervalSeconds := channelmonitorFields[11].Descriptor()
  697. // channelmonitor.IntervalSecondsValidator is a validator for the "interval_seconds" field. It is called by the builders before save.
  698. channelmonitor.IntervalSecondsValidator = channelmonitorDescIntervalSeconds.Validators[0].(func(int) error)
  699. // channelmonitorDescJitterSeconds is the schema descriptor for jitter_seconds field.
  700. channelmonitorDescJitterSeconds := channelmonitorFields[12].Descriptor()
  701. // channelmonitor.DefaultJitterSeconds holds the default value on creation for the jitter_seconds field.
  702. channelmonitor.DefaultJitterSeconds = channelmonitorDescJitterSeconds.Default.(int)
  703. // channelmonitor.JitterSecondsValidator is a validator for the "jitter_seconds" field. It is called by the builders before save.
  704. channelmonitor.JitterSecondsValidator = channelmonitorDescJitterSeconds.Validators[0].(func(int) error)
  705. // channelmonitorDescExtraHeaders is the schema descriptor for extra_headers field.
  706. channelmonitorDescExtraHeaders := channelmonitorFields[16].Descriptor()
  707. // channelmonitor.DefaultExtraHeaders holds the default value on creation for the extra_headers field.
  708. channelmonitor.DefaultExtraHeaders = channelmonitorDescExtraHeaders.Default.(map[string]string)
  709. // channelmonitorDescBodyOverrideMode is the schema descriptor for body_override_mode field.
  710. channelmonitorDescBodyOverrideMode := channelmonitorFields[17].Descriptor()
  711. // channelmonitor.DefaultBodyOverrideMode holds the default value on creation for the body_override_mode field.
  712. channelmonitor.DefaultBodyOverrideMode = channelmonitorDescBodyOverrideMode.Default.(string)
  713. // channelmonitor.BodyOverrideModeValidator is a validator for the "body_override_mode" field. It is called by the builders before save.
  714. channelmonitor.BodyOverrideModeValidator = channelmonitorDescBodyOverrideMode.Validators[0].(func(string) error)
  715. channelmonitordailyrollupFields := schema.ChannelMonitorDailyRollup{}.Fields()
  716. _ = channelmonitordailyrollupFields
  717. // channelmonitordailyrollupDescModel is the schema descriptor for model field.
  718. channelmonitordailyrollupDescModel := channelmonitordailyrollupFields[1].Descriptor()
  719. // channelmonitordailyrollup.ModelValidator is a validator for the "model" field. It is called by the builders before save.
  720. channelmonitordailyrollup.ModelValidator = func() func(string) error {
  721. validators := channelmonitordailyrollupDescModel.Validators
  722. fns := [...]func(string) error{
  723. validators[0].(func(string) error),
  724. validators[1].(func(string) error),
  725. }
  726. return func(model string) error {
  727. for _, fn := range fns {
  728. if err := fn(model); err != nil {
  729. return err
  730. }
  731. }
  732. return nil
  733. }
  734. }()
  735. // channelmonitordailyrollupDescTotalChecks is the schema descriptor for total_checks field.
  736. channelmonitordailyrollupDescTotalChecks := channelmonitordailyrollupFields[3].Descriptor()
  737. // channelmonitordailyrollup.DefaultTotalChecks holds the default value on creation for the total_checks field.
  738. channelmonitordailyrollup.DefaultTotalChecks = channelmonitordailyrollupDescTotalChecks.Default.(int)
  739. // channelmonitordailyrollupDescOkCount is the schema descriptor for ok_count field.
  740. channelmonitordailyrollupDescOkCount := channelmonitordailyrollupFields[4].Descriptor()
  741. // channelmonitordailyrollup.DefaultOkCount holds the default value on creation for the ok_count field.
  742. channelmonitordailyrollup.DefaultOkCount = channelmonitordailyrollupDescOkCount.Default.(int)
  743. // channelmonitordailyrollupDescOperationalCount is the schema descriptor for operational_count field.
  744. channelmonitordailyrollupDescOperationalCount := channelmonitordailyrollupFields[5].Descriptor()
  745. // channelmonitordailyrollup.DefaultOperationalCount holds the default value on creation for the operational_count field.
  746. channelmonitordailyrollup.DefaultOperationalCount = channelmonitordailyrollupDescOperationalCount.Default.(int)
  747. // channelmonitordailyrollupDescDegradedCount is the schema descriptor for degraded_count field.
  748. channelmonitordailyrollupDescDegradedCount := channelmonitordailyrollupFields[6].Descriptor()
  749. // channelmonitordailyrollup.DefaultDegradedCount holds the default value on creation for the degraded_count field.
  750. channelmonitordailyrollup.DefaultDegradedCount = channelmonitordailyrollupDescDegradedCount.Default.(int)
  751. // channelmonitordailyrollupDescFailedCount is the schema descriptor for failed_count field.
  752. channelmonitordailyrollupDescFailedCount := channelmonitordailyrollupFields[7].Descriptor()
  753. // channelmonitordailyrollup.DefaultFailedCount holds the default value on creation for the failed_count field.
  754. channelmonitordailyrollup.DefaultFailedCount = channelmonitordailyrollupDescFailedCount.Default.(int)
  755. // channelmonitordailyrollupDescErrorCount is the schema descriptor for error_count field.
  756. channelmonitordailyrollupDescErrorCount := channelmonitordailyrollupFields[8].Descriptor()
  757. // channelmonitordailyrollup.DefaultErrorCount holds the default value on creation for the error_count field.
  758. channelmonitordailyrollup.DefaultErrorCount = channelmonitordailyrollupDescErrorCount.Default.(int)
  759. // channelmonitordailyrollupDescSumLatencyMs is the schema descriptor for sum_latency_ms field.
  760. channelmonitordailyrollupDescSumLatencyMs := channelmonitordailyrollupFields[9].Descriptor()
  761. // channelmonitordailyrollup.DefaultSumLatencyMs holds the default value on creation for the sum_latency_ms field.
  762. channelmonitordailyrollup.DefaultSumLatencyMs = channelmonitordailyrollupDescSumLatencyMs.Default.(int64)
  763. // channelmonitordailyrollupDescCountLatency is the schema descriptor for count_latency field.
  764. channelmonitordailyrollupDescCountLatency := channelmonitordailyrollupFields[10].Descriptor()
  765. // channelmonitordailyrollup.DefaultCountLatency holds the default value on creation for the count_latency field.
  766. channelmonitordailyrollup.DefaultCountLatency = channelmonitordailyrollupDescCountLatency.Default.(int)
  767. // channelmonitordailyrollupDescSumPingLatencyMs is the schema descriptor for sum_ping_latency_ms field.
  768. channelmonitordailyrollupDescSumPingLatencyMs := channelmonitordailyrollupFields[11].Descriptor()
  769. // channelmonitordailyrollup.DefaultSumPingLatencyMs holds the default value on creation for the sum_ping_latency_ms field.
  770. channelmonitordailyrollup.DefaultSumPingLatencyMs = channelmonitordailyrollupDescSumPingLatencyMs.Default.(int64)
  771. // channelmonitordailyrollupDescCountPingLatency is the schema descriptor for count_ping_latency field.
  772. channelmonitordailyrollupDescCountPingLatency := channelmonitordailyrollupFields[12].Descriptor()
  773. // channelmonitordailyrollup.DefaultCountPingLatency holds the default value on creation for the count_ping_latency field.
  774. channelmonitordailyrollup.DefaultCountPingLatency = channelmonitordailyrollupDescCountPingLatency.Default.(int)
  775. // channelmonitordailyrollupDescComputedAt is the schema descriptor for computed_at field.
  776. channelmonitordailyrollupDescComputedAt := channelmonitordailyrollupFields[13].Descriptor()
  777. // channelmonitordailyrollup.DefaultComputedAt holds the default value on creation for the computed_at field.
  778. channelmonitordailyrollup.DefaultComputedAt = channelmonitordailyrollupDescComputedAt.Default.(func() time.Time)
  779. // channelmonitordailyrollup.UpdateDefaultComputedAt holds the default value on update for the computed_at field.
  780. channelmonitordailyrollup.UpdateDefaultComputedAt = channelmonitordailyrollupDescComputedAt.UpdateDefault.(func() time.Time)
  781. channelmonitorhistoryFields := schema.ChannelMonitorHistory{}.Fields()
  782. _ = channelmonitorhistoryFields
  783. // channelmonitorhistoryDescModel is the schema descriptor for model field.
  784. channelmonitorhistoryDescModel := channelmonitorhistoryFields[1].Descriptor()
  785. // channelmonitorhistory.ModelValidator is a validator for the "model" field. It is called by the builders before save.
  786. channelmonitorhistory.ModelValidator = func() func(string) error {
  787. validators := channelmonitorhistoryDescModel.Validators
  788. fns := [...]func(string) error{
  789. validators[0].(func(string) error),
  790. validators[1].(func(string) error),
  791. }
  792. return func(model string) error {
  793. for _, fn := range fns {
  794. if err := fn(model); err != nil {
  795. return err
  796. }
  797. }
  798. return nil
  799. }
  800. }()
  801. // channelmonitorhistoryDescMessage is the schema descriptor for message field.
  802. channelmonitorhistoryDescMessage := channelmonitorhistoryFields[5].Descriptor()
  803. // channelmonitorhistory.DefaultMessage holds the default value on creation for the message field.
  804. channelmonitorhistory.DefaultMessage = channelmonitorhistoryDescMessage.Default.(string)
  805. // channelmonitorhistory.MessageValidator is a validator for the "message" field. It is called by the builders before save.
  806. channelmonitorhistory.MessageValidator = channelmonitorhistoryDescMessage.Validators[0].(func(string) error)
  807. // channelmonitorhistoryDescCheckedAt is the schema descriptor for checked_at field.
  808. channelmonitorhistoryDescCheckedAt := channelmonitorhistoryFields[7].Descriptor()
  809. // channelmonitorhistory.DefaultCheckedAt holds the default value on creation for the checked_at field.
  810. channelmonitorhistory.DefaultCheckedAt = channelmonitorhistoryDescCheckedAt.Default.(func() time.Time)
  811. channelmonitorrequesttemplateMixin := schema.ChannelMonitorRequestTemplate{}.Mixin()
  812. channelmonitorrequesttemplateMixinFields0 := channelmonitorrequesttemplateMixin[0].Fields()
  813. _ = channelmonitorrequesttemplateMixinFields0
  814. channelmonitorrequesttemplateFields := schema.ChannelMonitorRequestTemplate{}.Fields()
  815. _ = channelmonitorrequesttemplateFields
  816. // channelmonitorrequesttemplateDescCreatedAt is the schema descriptor for created_at field.
  817. channelmonitorrequesttemplateDescCreatedAt := channelmonitorrequesttemplateMixinFields0[0].Descriptor()
  818. // channelmonitorrequesttemplate.DefaultCreatedAt holds the default value on creation for the created_at field.
  819. channelmonitorrequesttemplate.DefaultCreatedAt = channelmonitorrequesttemplateDescCreatedAt.Default.(func() time.Time)
  820. // channelmonitorrequesttemplateDescUpdatedAt is the schema descriptor for updated_at field.
  821. channelmonitorrequesttemplateDescUpdatedAt := channelmonitorrequesttemplateMixinFields0[1].Descriptor()
  822. // channelmonitorrequesttemplate.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  823. channelmonitorrequesttemplate.DefaultUpdatedAt = channelmonitorrequesttemplateDescUpdatedAt.Default.(func() time.Time)
  824. // channelmonitorrequesttemplate.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  825. channelmonitorrequesttemplate.UpdateDefaultUpdatedAt = channelmonitorrequesttemplateDescUpdatedAt.UpdateDefault.(func() time.Time)
  826. // channelmonitorrequesttemplateDescName is the schema descriptor for name field.
  827. channelmonitorrequesttemplateDescName := channelmonitorrequesttemplateFields[0].Descriptor()
  828. // channelmonitorrequesttemplate.NameValidator is a validator for the "name" field. It is called by the builders before save.
  829. channelmonitorrequesttemplate.NameValidator = func() func(string) error {
  830. validators := channelmonitorrequesttemplateDescName.Validators
  831. fns := [...]func(string) error{
  832. validators[0].(func(string) error),
  833. validators[1].(func(string) error),
  834. }
  835. return func(name string) error {
  836. for _, fn := range fns {
  837. if err := fn(name); err != nil {
  838. return err
  839. }
  840. }
  841. return nil
  842. }
  843. }()
  844. // channelmonitorrequesttemplateDescAPIMode is the schema descriptor for api_mode field.
  845. channelmonitorrequesttemplateDescAPIMode := channelmonitorrequesttemplateFields[2].Descriptor()
  846. // channelmonitorrequesttemplate.DefaultAPIMode holds the default value on creation for the api_mode field.
  847. channelmonitorrequesttemplate.DefaultAPIMode = channelmonitorrequesttemplateDescAPIMode.Default.(string)
  848. // channelmonitorrequesttemplate.APIModeValidator is a validator for the "api_mode" field. It is called by the builders before save.
  849. channelmonitorrequesttemplate.APIModeValidator = channelmonitorrequesttemplateDescAPIMode.Validators[0].(func(string) error)
  850. // channelmonitorrequesttemplateDescDescription is the schema descriptor for description field.
  851. channelmonitorrequesttemplateDescDescription := channelmonitorrequesttemplateFields[3].Descriptor()
  852. // channelmonitorrequesttemplate.DefaultDescription holds the default value on creation for the description field.
  853. channelmonitorrequesttemplate.DefaultDescription = channelmonitorrequesttemplateDescDescription.Default.(string)
  854. // channelmonitorrequesttemplate.DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
  855. channelmonitorrequesttemplate.DescriptionValidator = channelmonitorrequesttemplateDescDescription.Validators[0].(func(string) error)
  856. // channelmonitorrequesttemplateDescExtraHeaders is the schema descriptor for extra_headers field.
  857. channelmonitorrequesttemplateDescExtraHeaders := channelmonitorrequesttemplateFields[4].Descriptor()
  858. // channelmonitorrequesttemplate.DefaultExtraHeaders holds the default value on creation for the extra_headers field.
  859. channelmonitorrequesttemplate.DefaultExtraHeaders = channelmonitorrequesttemplateDescExtraHeaders.Default.(map[string]string)
  860. // channelmonitorrequesttemplateDescBodyOverrideMode is the schema descriptor for body_override_mode field.
  861. channelmonitorrequesttemplateDescBodyOverrideMode := channelmonitorrequesttemplateFields[5].Descriptor()
  862. // channelmonitorrequesttemplate.DefaultBodyOverrideMode holds the default value on creation for the body_override_mode field.
  863. channelmonitorrequesttemplate.DefaultBodyOverrideMode = channelmonitorrequesttemplateDescBodyOverrideMode.Default.(string)
  864. // channelmonitorrequesttemplate.BodyOverrideModeValidator is a validator for the "body_override_mode" field. It is called by the builders before save.
  865. channelmonitorrequesttemplate.BodyOverrideModeValidator = channelmonitorrequesttemplateDescBodyOverrideMode.Validators[0].(func(string) error)
  866. compositemodelrouteMixin := schema.CompositeModelRoute{}.Mixin()
  867. compositemodelrouteMixinHooks1 := compositemodelrouteMixin[1].Hooks()
  868. compositemodelroute.Hooks[0] = compositemodelrouteMixinHooks1[0]
  869. compositemodelrouteMixinInters1 := compositemodelrouteMixin[1].Interceptors()
  870. compositemodelroute.Interceptors[0] = compositemodelrouteMixinInters1[0]
  871. compositemodelrouteMixinFields0 := compositemodelrouteMixin[0].Fields()
  872. _ = compositemodelrouteMixinFields0
  873. compositemodelrouteFields := schema.CompositeModelRoute{}.Fields()
  874. _ = compositemodelrouteFields
  875. // compositemodelrouteDescCreatedAt is the schema descriptor for created_at field.
  876. compositemodelrouteDescCreatedAt := compositemodelrouteMixinFields0[0].Descriptor()
  877. // compositemodelroute.DefaultCreatedAt holds the default value on creation for the created_at field.
  878. compositemodelroute.DefaultCreatedAt = compositemodelrouteDescCreatedAt.Default.(func() time.Time)
  879. // compositemodelrouteDescUpdatedAt is the schema descriptor for updated_at field.
  880. compositemodelrouteDescUpdatedAt := compositemodelrouteMixinFields0[1].Descriptor()
  881. // compositemodelroute.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  882. compositemodelroute.DefaultUpdatedAt = compositemodelrouteDescUpdatedAt.Default.(func() time.Time)
  883. // compositemodelroute.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  884. compositemodelroute.UpdateDefaultUpdatedAt = compositemodelrouteDescUpdatedAt.UpdateDefault.(func() time.Time)
  885. // compositemodelrouteDescPublicModel is the schema descriptor for public_model field.
  886. compositemodelrouteDescPublicModel := compositemodelrouteFields[1].Descriptor()
  887. // compositemodelroute.PublicModelValidator is a validator for the "public_model" field. It is called by the builders before save.
  888. compositemodelroute.PublicModelValidator = func() func(string) error {
  889. validators := compositemodelrouteDescPublicModel.Validators
  890. fns := [...]func(string) error{
  891. validators[0].(func(string) error),
  892. validators[1].(func(string) error),
  893. }
  894. return func(public_model string) error {
  895. for _, fn := range fns {
  896. if err := fn(public_model); err != nil {
  897. return err
  898. }
  899. }
  900. return nil
  901. }
  902. }()
  903. // compositemodelrouteDescMatchType is the schema descriptor for match_type field.
  904. compositemodelrouteDescMatchType := compositemodelrouteFields[2].Descriptor()
  905. // compositemodelroute.DefaultMatchType holds the default value on creation for the match_type field.
  906. compositemodelroute.DefaultMatchType = compositemodelrouteDescMatchType.Default.(string)
  907. // compositemodelroute.MatchTypeValidator is a validator for the "match_type" field. It is called by the builders before save.
  908. compositemodelroute.MatchTypeValidator = compositemodelrouteDescMatchType.Validators[0].(func(string) error)
  909. // compositemodelrouteDescTargetPlatform is the schema descriptor for target_platform field.
  910. compositemodelrouteDescTargetPlatform := compositemodelrouteFields[3].Descriptor()
  911. // compositemodelroute.DefaultTargetPlatform holds the default value on creation for the target_platform field.
  912. compositemodelroute.DefaultTargetPlatform = compositemodelrouteDescTargetPlatform.Default.(string)
  913. // compositemodelroute.TargetPlatformValidator is a validator for the "target_platform" field. It is called by the builders before save.
  914. compositemodelroute.TargetPlatformValidator = compositemodelrouteDescTargetPlatform.Validators[0].(func(string) error)
  915. // compositemodelrouteDescUpstreamModel is the schema descriptor for upstream_model field.
  916. compositemodelrouteDescUpstreamModel := compositemodelrouteFields[4].Descriptor()
  917. // compositemodelroute.DefaultUpstreamModel holds the default value on creation for the upstream_model field.
  918. compositemodelroute.DefaultUpstreamModel = compositemodelrouteDescUpstreamModel.Default.(string)
  919. // compositemodelroute.UpstreamModelValidator is a validator for the "upstream_model" field. It is called by the builders before save.
  920. compositemodelroute.UpstreamModelValidator = compositemodelrouteDescUpstreamModel.Validators[0].(func(string) error)
  921. // compositemodelrouteDescEndpoint is the schema descriptor for endpoint field.
  922. compositemodelrouteDescEndpoint := compositemodelrouteFields[5].Descriptor()
  923. // compositemodelroute.DefaultEndpoint holds the default value on creation for the endpoint field.
  924. compositemodelroute.DefaultEndpoint = compositemodelrouteDescEndpoint.Default.(string)
  925. // compositemodelroute.EndpointValidator is a validator for the "endpoint" field. It is called by the builders before save.
  926. compositemodelroute.EndpointValidator = compositemodelrouteDescEndpoint.Validators[0].(func(string) error)
  927. // compositemodelrouteDescPriority is the schema descriptor for priority field.
  928. compositemodelrouteDescPriority := compositemodelrouteFields[6].Descriptor()
  929. // compositemodelroute.DefaultPriority holds the default value on creation for the priority field.
  930. compositemodelroute.DefaultPriority = compositemodelrouteDescPriority.Default.(int)
  931. // compositemodelrouteDescEnabled is the schema descriptor for enabled field.
  932. compositemodelrouteDescEnabled := compositemodelrouteFields[7].Descriptor()
  933. // compositemodelroute.DefaultEnabled holds the default value on creation for the enabled field.
  934. compositemodelroute.DefaultEnabled = compositemodelrouteDescEnabled.Default.(bool)
  935. errorpassthroughruleMixin := schema.ErrorPassthroughRule{}.Mixin()
  936. errorpassthroughruleMixinFields0 := errorpassthroughruleMixin[0].Fields()
  937. _ = errorpassthroughruleMixinFields0
  938. errorpassthroughruleFields := schema.ErrorPassthroughRule{}.Fields()
  939. _ = errorpassthroughruleFields
  940. // errorpassthroughruleDescCreatedAt is the schema descriptor for created_at field.
  941. errorpassthroughruleDescCreatedAt := errorpassthroughruleMixinFields0[0].Descriptor()
  942. // errorpassthroughrule.DefaultCreatedAt holds the default value on creation for the created_at field.
  943. errorpassthroughrule.DefaultCreatedAt = errorpassthroughruleDescCreatedAt.Default.(func() time.Time)
  944. // errorpassthroughruleDescUpdatedAt is the schema descriptor for updated_at field.
  945. errorpassthroughruleDescUpdatedAt := errorpassthroughruleMixinFields0[1].Descriptor()
  946. // errorpassthroughrule.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  947. errorpassthroughrule.DefaultUpdatedAt = errorpassthroughruleDescUpdatedAt.Default.(func() time.Time)
  948. // errorpassthroughrule.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  949. errorpassthroughrule.UpdateDefaultUpdatedAt = errorpassthroughruleDescUpdatedAt.UpdateDefault.(func() time.Time)
  950. // errorpassthroughruleDescName is the schema descriptor for name field.
  951. errorpassthroughruleDescName := errorpassthroughruleFields[0].Descriptor()
  952. // errorpassthroughrule.NameValidator is a validator for the "name" field. It is called by the builders before save.
  953. errorpassthroughrule.NameValidator = func() func(string) error {
  954. validators := errorpassthroughruleDescName.Validators
  955. fns := [...]func(string) error{
  956. validators[0].(func(string) error),
  957. validators[1].(func(string) error),
  958. }
  959. return func(name string) error {
  960. for _, fn := range fns {
  961. if err := fn(name); err != nil {
  962. return err
  963. }
  964. }
  965. return nil
  966. }
  967. }()
  968. // errorpassthroughruleDescEnabled is the schema descriptor for enabled field.
  969. errorpassthroughruleDescEnabled := errorpassthroughruleFields[1].Descriptor()
  970. // errorpassthroughrule.DefaultEnabled holds the default value on creation for the enabled field.
  971. errorpassthroughrule.DefaultEnabled = errorpassthroughruleDescEnabled.Default.(bool)
  972. // errorpassthroughruleDescPriority is the schema descriptor for priority field.
  973. errorpassthroughruleDescPriority := errorpassthroughruleFields[2].Descriptor()
  974. // errorpassthroughrule.DefaultPriority holds the default value on creation for the priority field.
  975. errorpassthroughrule.DefaultPriority = errorpassthroughruleDescPriority.Default.(int)
  976. // errorpassthroughruleDescMatchMode is the schema descriptor for match_mode field.
  977. errorpassthroughruleDescMatchMode := errorpassthroughruleFields[5].Descriptor()
  978. // errorpassthroughrule.DefaultMatchMode holds the default value on creation for the match_mode field.
  979. errorpassthroughrule.DefaultMatchMode = errorpassthroughruleDescMatchMode.Default.(string)
  980. // errorpassthroughrule.MatchModeValidator is a validator for the "match_mode" field. It is called by the builders before save.
  981. errorpassthroughrule.MatchModeValidator = errorpassthroughruleDescMatchMode.Validators[0].(func(string) error)
  982. // errorpassthroughruleDescPassthroughCode is the schema descriptor for passthrough_code field.
  983. errorpassthroughruleDescPassthroughCode := errorpassthroughruleFields[7].Descriptor()
  984. // errorpassthroughrule.DefaultPassthroughCode holds the default value on creation for the passthrough_code field.
  985. errorpassthroughrule.DefaultPassthroughCode = errorpassthroughruleDescPassthroughCode.Default.(bool)
  986. // errorpassthroughruleDescPassthroughBody is the schema descriptor for passthrough_body field.
  987. errorpassthroughruleDescPassthroughBody := errorpassthroughruleFields[9].Descriptor()
  988. // errorpassthroughrule.DefaultPassthroughBody holds the default value on creation for the passthrough_body field.
  989. errorpassthroughrule.DefaultPassthroughBody = errorpassthroughruleDescPassthroughBody.Default.(bool)
  990. // errorpassthroughruleDescSkipMonitoring is the schema descriptor for skip_monitoring field.
  991. errorpassthroughruleDescSkipMonitoring := errorpassthroughruleFields[11].Descriptor()
  992. // errorpassthroughrule.DefaultSkipMonitoring holds the default value on creation for the skip_monitoring field.
  993. errorpassthroughrule.DefaultSkipMonitoring = errorpassthroughruleDescSkipMonitoring.Default.(bool)
  994. groupMixin := schema.Group{}.Mixin()
  995. groupMixinHooks1 := groupMixin[1].Hooks()
  996. group.Hooks[0] = groupMixinHooks1[0]
  997. groupMixinInters1 := groupMixin[1].Interceptors()
  998. group.Interceptors[0] = groupMixinInters1[0]
  999. groupMixinFields0 := groupMixin[0].Fields()
  1000. _ = groupMixinFields0
  1001. groupFields := schema.Group{}.Fields()
  1002. _ = groupFields
  1003. // groupDescCreatedAt is the schema descriptor for created_at field.
  1004. groupDescCreatedAt := groupMixinFields0[0].Descriptor()
  1005. // group.DefaultCreatedAt holds the default value on creation for the created_at field.
  1006. group.DefaultCreatedAt = groupDescCreatedAt.Default.(func() time.Time)
  1007. // groupDescUpdatedAt is the schema descriptor for updated_at field.
  1008. groupDescUpdatedAt := groupMixinFields0[1].Descriptor()
  1009. // group.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1010. group.DefaultUpdatedAt = groupDescUpdatedAt.Default.(func() time.Time)
  1011. // group.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1012. group.UpdateDefaultUpdatedAt = groupDescUpdatedAt.UpdateDefault.(func() time.Time)
  1013. // groupDescName is the schema descriptor for name field.
  1014. groupDescName := groupFields[0].Descriptor()
  1015. // group.NameValidator is a validator for the "name" field. It is called by the builders before save.
  1016. group.NameValidator = func() func(string) error {
  1017. validators := groupDescName.Validators
  1018. fns := [...]func(string) error{
  1019. validators[0].(func(string) error),
  1020. validators[1].(func(string) error),
  1021. }
  1022. return func(name string) error {
  1023. for _, fn := range fns {
  1024. if err := fn(name); err != nil {
  1025. return err
  1026. }
  1027. }
  1028. return nil
  1029. }
  1030. }()
  1031. // groupDescRateMultiplier is the schema descriptor for rate_multiplier field.
  1032. groupDescRateMultiplier := groupFields[2].Descriptor()
  1033. // group.DefaultRateMultiplier holds the default value on creation for the rate_multiplier field.
  1034. group.DefaultRateMultiplier = groupDescRateMultiplier.Default.(float64)
  1035. // groupDescPeakRateEnabled is the schema descriptor for peak_rate_enabled field.
  1036. groupDescPeakRateEnabled := groupFields[3].Descriptor()
  1037. // group.DefaultPeakRateEnabled holds the default value on creation for the peak_rate_enabled field.
  1038. group.DefaultPeakRateEnabled = groupDescPeakRateEnabled.Default.(bool)
  1039. // groupDescPeakStart is the schema descriptor for peak_start field.
  1040. groupDescPeakStart := groupFields[4].Descriptor()
  1041. // group.DefaultPeakStart holds the default value on creation for the peak_start field.
  1042. group.DefaultPeakStart = groupDescPeakStart.Default.(string)
  1043. // group.PeakStartValidator is a validator for the "peak_start" field. It is called by the builders before save.
  1044. group.PeakStartValidator = groupDescPeakStart.Validators[0].(func(string) error)
  1045. // groupDescPeakEnd is the schema descriptor for peak_end field.
  1046. groupDescPeakEnd := groupFields[5].Descriptor()
  1047. // group.DefaultPeakEnd holds the default value on creation for the peak_end field.
  1048. group.DefaultPeakEnd = groupDescPeakEnd.Default.(string)
  1049. // group.PeakEndValidator is a validator for the "peak_end" field. It is called by the builders before save.
  1050. group.PeakEndValidator = groupDescPeakEnd.Validators[0].(func(string) error)
  1051. // groupDescPeakRateMultiplier is the schema descriptor for peak_rate_multiplier field.
  1052. groupDescPeakRateMultiplier := groupFields[6].Descriptor()
  1053. // group.DefaultPeakRateMultiplier holds the default value on creation for the peak_rate_multiplier field.
  1054. group.DefaultPeakRateMultiplier = groupDescPeakRateMultiplier.Default.(float64)
  1055. // groupDescIsExclusive is the schema descriptor for is_exclusive field.
  1056. groupDescIsExclusive := groupFields[7].Descriptor()
  1057. // group.DefaultIsExclusive holds the default value on creation for the is_exclusive field.
  1058. group.DefaultIsExclusive = groupDescIsExclusive.Default.(bool)
  1059. // groupDescSecurityPolicyEnabled is the schema descriptor for security_policy_enabled field.
  1060. groupDescSecurityPolicyEnabled := groupFields[8].Descriptor()
  1061. // group.DefaultSecurityPolicyEnabled holds the default value on creation for the security_policy_enabled field.
  1062. group.DefaultSecurityPolicyEnabled = groupDescSecurityPolicyEnabled.Default.(bool)
  1063. // groupDescSecurityPolicyMode is the schema descriptor for security_policy_mode field.
  1064. groupDescSecurityPolicyMode := groupFields[9].Descriptor()
  1065. // group.DefaultSecurityPolicyMode holds the default value on creation for the security_policy_mode field.
  1066. group.DefaultSecurityPolicyMode = groupDescSecurityPolicyMode.Default.(string)
  1067. // group.SecurityPolicyModeValidator is a validator for the "security_policy_mode" field. It is called by the builders before save.
  1068. group.SecurityPolicyModeValidator = groupDescSecurityPolicyMode.Validators[0].(func(string) error)
  1069. // groupDescSecurityPolicyEmailEnabled is the schema descriptor for security_policy_email_enabled field.
  1070. groupDescSecurityPolicyEmailEnabled := groupFields[10].Descriptor()
  1071. // group.DefaultSecurityPolicyEmailEnabled holds the default value on creation for the security_policy_email_enabled field.
  1072. group.DefaultSecurityPolicyEmailEnabled = groupDescSecurityPolicyEmailEnabled.Default.(bool)
  1073. // groupDescStatus is the schema descriptor for status field.
  1074. groupDescStatus := groupFields[11].Descriptor()
  1075. // group.DefaultStatus holds the default value on creation for the status field.
  1076. group.DefaultStatus = groupDescStatus.Default.(string)
  1077. // group.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  1078. group.StatusValidator = groupDescStatus.Validators[0].(func(string) error)
  1079. // groupDescDuplicateOperationID is the schema descriptor for duplicate_operation_id field.
  1080. groupDescDuplicateOperationID := groupFields[12].Descriptor()
  1081. // group.DuplicateOperationIDValidator is a validator for the "duplicate_operation_id" field. It is called by the builders before save.
  1082. group.DuplicateOperationIDValidator = groupDescDuplicateOperationID.Validators[0].(func(string) error)
  1083. // groupDescPlatform is the schema descriptor for platform field.
  1084. groupDescPlatform := groupFields[13].Descriptor()
  1085. // group.DefaultPlatform holds the default value on creation for the platform field.
  1086. group.DefaultPlatform = groupDescPlatform.Default.(string)
  1087. // group.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
  1088. group.PlatformValidator = groupDescPlatform.Validators[0].(func(string) error)
  1089. // groupDescSubscriptionType is the schema descriptor for subscription_type field.
  1090. groupDescSubscriptionType := groupFields[14].Descriptor()
  1091. // group.DefaultSubscriptionType holds the default value on creation for the subscription_type field.
  1092. group.DefaultSubscriptionType = groupDescSubscriptionType.Default.(string)
  1093. // group.SubscriptionTypeValidator is a validator for the "subscription_type" field. It is called by the builders before save.
  1094. group.SubscriptionTypeValidator = groupDescSubscriptionType.Validators[0].(func(string) error)
  1095. // groupDescDefaultValidityDays is the schema descriptor for default_validity_days field.
  1096. groupDescDefaultValidityDays := groupFields[18].Descriptor()
  1097. // group.DefaultDefaultValidityDays holds the default value on creation for the default_validity_days field.
  1098. group.DefaultDefaultValidityDays = groupDescDefaultValidityDays.Default.(int)
  1099. // groupDescAllowImageGeneration is the schema descriptor for allow_image_generation field.
  1100. groupDescAllowImageGeneration := groupFields[19].Descriptor()
  1101. // group.DefaultAllowImageGeneration holds the default value on creation for the allow_image_generation field.
  1102. group.DefaultAllowImageGeneration = groupDescAllowImageGeneration.Default.(bool)
  1103. // groupDescAllowBatchImageGeneration is the schema descriptor for allow_batch_image_generation field.
  1104. groupDescAllowBatchImageGeneration := groupFields[20].Descriptor()
  1105. // group.DefaultAllowBatchImageGeneration holds the default value on creation for the allow_batch_image_generation field.
  1106. group.DefaultAllowBatchImageGeneration = groupDescAllowBatchImageGeneration.Default.(bool)
  1107. // groupDescImageRateIndependent is the schema descriptor for image_rate_independent field.
  1108. groupDescImageRateIndependent := groupFields[21].Descriptor()
  1109. // group.DefaultImageRateIndependent holds the default value on creation for the image_rate_independent field.
  1110. group.DefaultImageRateIndependent = groupDescImageRateIndependent.Default.(bool)
  1111. // groupDescImageRateMultiplier is the schema descriptor for image_rate_multiplier field.
  1112. groupDescImageRateMultiplier := groupFields[22].Descriptor()
  1113. // group.DefaultImageRateMultiplier holds the default value on creation for the image_rate_multiplier field.
  1114. group.DefaultImageRateMultiplier = groupDescImageRateMultiplier.Default.(float64)
  1115. // groupDescBatchImageDiscountMultiplier is the schema descriptor for batch_image_discount_multiplier field.
  1116. groupDescBatchImageDiscountMultiplier := groupFields[26].Descriptor()
  1117. // group.DefaultBatchImageDiscountMultiplier holds the default value on creation for the batch_image_discount_multiplier field.
  1118. group.DefaultBatchImageDiscountMultiplier = groupDescBatchImageDiscountMultiplier.Default.(float64)
  1119. // groupDescBatchImageHoldMultiplier is the schema descriptor for batch_image_hold_multiplier field.
  1120. groupDescBatchImageHoldMultiplier := groupFields[27].Descriptor()
  1121. // group.DefaultBatchImageHoldMultiplier holds the default value on creation for the batch_image_hold_multiplier field.
  1122. group.DefaultBatchImageHoldMultiplier = groupDescBatchImageHoldMultiplier.Default.(float64)
  1123. // groupDescVideoRateIndependent is the schema descriptor for video_rate_independent field.
  1124. groupDescVideoRateIndependent := groupFields[28].Descriptor()
  1125. // group.DefaultVideoRateIndependent holds the default value on creation for the video_rate_independent field.
  1126. group.DefaultVideoRateIndependent = groupDescVideoRateIndependent.Default.(bool)
  1127. // groupDescVideoRateMultiplier is the schema descriptor for video_rate_multiplier field.
  1128. groupDescVideoRateMultiplier := groupFields[29].Descriptor()
  1129. // group.DefaultVideoRateMultiplier holds the default value on creation for the video_rate_multiplier field.
  1130. group.DefaultVideoRateMultiplier = groupDescVideoRateMultiplier.Default.(float64)
  1131. // groupDescSearchPricePer1k is the schema descriptor for search_price_per_1k field.
  1132. groupDescSearchPricePer1k := groupFields[35].Descriptor()
  1133. // group.SearchPricePer1kValidator is a validator for the "search_price_per_1k" field. It is called by the builders before save.
  1134. group.SearchPricePer1kValidator = groupDescSearchPricePer1k.Validators[0].(func(float64) error)
  1135. // groupDescAudioRealtimePricePerMin is the schema descriptor for audio_realtime_price_per_min field.
  1136. groupDescAudioRealtimePricePerMin := groupFields[36].Descriptor()
  1137. // group.AudioRealtimePricePerMinValidator is a validator for the "audio_realtime_price_per_min" field. It is called by the builders before save.
  1138. group.AudioRealtimePricePerMinValidator = groupDescAudioRealtimePricePerMin.Validators[0].(func(float64) error)
  1139. // groupDescAudioTtsPricePerMillionChars is the schema descriptor for audio_tts_price_per_million_chars field.
  1140. groupDescAudioTtsPricePerMillionChars := groupFields[37].Descriptor()
  1141. // group.AudioTtsPricePerMillionCharsValidator is a validator for the "audio_tts_price_per_million_chars" field. It is called by the builders before save.
  1142. group.AudioTtsPricePerMillionCharsValidator = groupDescAudioTtsPricePerMillionChars.Validators[0].(func(float64) error)
  1143. // groupDescAudioSttPricePerHour is the schema descriptor for audio_stt_price_per_hour field.
  1144. groupDescAudioSttPricePerHour := groupFields[38].Descriptor()
  1145. // group.AudioSttPricePerHourValidator is a validator for the "audio_stt_price_per_hour" field. It is called by the builders before save.
  1146. group.AudioSttPricePerHourValidator = groupDescAudioSttPricePerHour.Validators[0].(func(float64) error)
  1147. // groupDescLongContextPricingEnabled is the schema descriptor for long_context_pricing_enabled field.
  1148. groupDescLongContextPricingEnabled := groupFields[39].Descriptor()
  1149. // group.DefaultLongContextPricingEnabled holds the default value on creation for the long_context_pricing_enabled field.
  1150. group.DefaultLongContextPricingEnabled = groupDescLongContextPricingEnabled.Default.(bool)
  1151. // groupDescClaudeCodeOnly is the schema descriptor for claude_code_only field.
  1152. groupDescClaudeCodeOnly := groupFields[41].Descriptor()
  1153. // group.DefaultClaudeCodeOnly holds the default value on creation for the claude_code_only field.
  1154. group.DefaultClaudeCodeOnly = groupDescClaudeCodeOnly.Default.(bool)
  1155. // groupDescModelRoutingEnabled is the schema descriptor for model_routing_enabled field.
  1156. groupDescModelRoutingEnabled := groupFields[45].Descriptor()
  1157. // group.DefaultModelRoutingEnabled holds the default value on creation for the model_routing_enabled field.
  1158. group.DefaultModelRoutingEnabled = groupDescModelRoutingEnabled.Default.(bool)
  1159. // groupDescMcpXMLInject is the schema descriptor for mcp_xml_inject field.
  1160. groupDescMcpXMLInject := groupFields[46].Descriptor()
  1161. // group.DefaultMcpXMLInject holds the default value on creation for the mcp_xml_inject field.
  1162. group.DefaultMcpXMLInject = groupDescMcpXMLInject.Default.(bool)
  1163. // groupDescSupportedModelScopes is the schema descriptor for supported_model_scopes field.
  1164. groupDescSupportedModelScopes := groupFields[47].Descriptor()
  1165. // group.DefaultSupportedModelScopes holds the default value on creation for the supported_model_scopes field.
  1166. group.DefaultSupportedModelScopes = groupDescSupportedModelScopes.Default.([]string)
  1167. // groupDescSortOrder is the schema descriptor for sort_order field.
  1168. groupDescSortOrder := groupFields[48].Descriptor()
  1169. // group.DefaultSortOrder holds the default value on creation for the sort_order field.
  1170. group.DefaultSortOrder = groupDescSortOrder.Default.(int)
  1171. // groupDescAllowMessagesDispatch is the schema descriptor for allow_messages_dispatch field.
  1172. groupDescAllowMessagesDispatch := groupFields[49].Descriptor()
  1173. // group.DefaultAllowMessagesDispatch holds the default value on creation for the allow_messages_dispatch field.
  1174. group.DefaultAllowMessagesDispatch = groupDescAllowMessagesDispatch.Default.(bool)
  1175. // groupDescAllowLive is the schema descriptor for allow_live field.
  1176. groupDescAllowLive := groupFields[50].Descriptor()
  1177. // group.DefaultAllowLive holds the default value on creation for the allow_live field.
  1178. group.DefaultAllowLive = groupDescAllowLive.Default.(bool)
  1179. // groupDescForceOpenaiFast is the schema descriptor for force_openai_fast field.
  1180. groupDescForceOpenaiFast := groupFields[51].Descriptor()
  1181. // group.DefaultForceOpenaiFast holds the default value on creation for the force_openai_fast field.
  1182. group.DefaultForceOpenaiFast = groupDescForceOpenaiFast.Default.(bool)
  1183. // groupDescFreeOpenaiFast is the schema descriptor for free_openai_fast field.
  1184. groupDescFreeOpenaiFast := groupFields[52].Descriptor()
  1185. // group.DefaultFreeOpenaiFast holds the default value on creation for the free_openai_fast field.
  1186. group.DefaultFreeOpenaiFast = groupDescFreeOpenaiFast.Default.(bool)
  1187. // groupDescRequireOauthOnly is the schema descriptor for require_oauth_only field.
  1188. groupDescRequireOauthOnly := groupFields[53].Descriptor()
  1189. // group.DefaultRequireOauthOnly holds the default value on creation for the require_oauth_only field.
  1190. group.DefaultRequireOauthOnly = groupDescRequireOauthOnly.Default.(bool)
  1191. // groupDescRequirePrivacySet is the schema descriptor for require_privacy_set field.
  1192. groupDescRequirePrivacySet := groupFields[54].Descriptor()
  1193. // group.DefaultRequirePrivacySet holds the default value on creation for the require_privacy_set field.
  1194. group.DefaultRequirePrivacySet = groupDescRequirePrivacySet.Default.(bool)
  1195. // groupDescDefaultMappedModel is the schema descriptor for default_mapped_model field.
  1196. groupDescDefaultMappedModel := groupFields[55].Descriptor()
  1197. // group.DefaultDefaultMappedModel holds the default value on creation for the default_mapped_model field.
  1198. group.DefaultDefaultMappedModel = groupDescDefaultMappedModel.Default.(string)
  1199. // group.DefaultMappedModelValidator is a validator for the "default_mapped_model" field. It is called by the builders before save.
  1200. group.DefaultMappedModelValidator = groupDescDefaultMappedModel.Validators[0].(func(string) error)
  1201. // groupDescMessagesDispatchModelConfig is the schema descriptor for messages_dispatch_model_config field.
  1202. groupDescMessagesDispatchModelConfig := groupFields[56].Descriptor()
  1203. // group.DefaultMessagesDispatchModelConfig holds the default value on creation for the messages_dispatch_model_config field.
  1204. group.DefaultMessagesDispatchModelConfig = groupDescMessagesDispatchModelConfig.Default.(domain.OpenAIMessagesDispatchModelConfig)
  1205. // groupDescModelAllowlist is the schema descriptor for model_allowlist field.
  1206. groupDescModelAllowlist := groupFields[57].Descriptor()
  1207. // group.DefaultModelAllowlist holds the default value on creation for the model_allowlist field.
  1208. group.DefaultModelAllowlist = groupDescModelAllowlist.Default.(domain.GroupModelAllowlist)
  1209. // groupDescCodexModelsManifestConfig is the schema descriptor for codex_models_manifest_config field.
  1210. groupDescCodexModelsManifestConfig := groupFields[58].Descriptor()
  1211. // group.DefaultCodexModelsManifestConfig holds the default value on creation for the codex_models_manifest_config field.
  1212. group.DefaultCodexModelsManifestConfig = groupDescCodexModelsManifestConfig.Default.(domain.GroupCodexModelsManifestConfig)
  1213. // groupDescRpmLimit is the schema descriptor for rpm_limit field.
  1214. groupDescRpmLimit := groupFields[59].Descriptor()
  1215. // group.DefaultRpmLimit holds the default value on creation for the rpm_limit field.
  1216. group.DefaultRpmLimit = groupDescRpmLimit.Default.(int)
  1217. // groupDescMaxReasoningEffort is the schema descriptor for max_reasoning_effort field.
  1218. groupDescMaxReasoningEffort := groupFields[60].Descriptor()
  1219. // group.DefaultMaxReasoningEffort holds the default value on creation for the max_reasoning_effort field.
  1220. group.DefaultMaxReasoningEffort = groupDescMaxReasoningEffort.Default.(string)
  1221. // group.MaxReasoningEffortValidator is a validator for the "max_reasoning_effort" field. It is called by the builders before save.
  1222. group.MaxReasoningEffortValidator = groupDescMaxReasoningEffort.Validators[0].(func(string) error)
  1223. // groupDescMaxReasoningEffortOverLimit is the schema descriptor for max_reasoning_effort_over_limit field.
  1224. groupDescMaxReasoningEffortOverLimit := groupFields[61].Descriptor()
  1225. // group.DefaultMaxReasoningEffortOverLimit holds the default value on creation for the max_reasoning_effort_over_limit field.
  1226. group.DefaultMaxReasoningEffortOverLimit = groupDescMaxReasoningEffortOverLimit.Default.(string)
  1227. // group.MaxReasoningEffortOverLimitValidator is a validator for the "max_reasoning_effort_over_limit" field. It is called by the builders before save.
  1228. group.MaxReasoningEffortOverLimitValidator = groupDescMaxReasoningEffortOverLimit.Validators[0].(func(string) error)
  1229. // groupDescReasoningEffortMappings is the schema descriptor for reasoning_effort_mappings field.
  1230. groupDescReasoningEffortMappings := groupFields[62].Descriptor()
  1231. // group.DefaultReasoningEffortMappings holds the default value on creation for the reasoning_effort_mappings field.
  1232. group.DefaultReasoningEffortMappings = groupDescReasoningEffortMappings.Default.([]domain.ReasoningEffortMapping)
  1233. // groupDescProfitControlEnabled is the schema descriptor for profit_control_enabled field.
  1234. groupDescProfitControlEnabled := groupFields[63].Descriptor()
  1235. // group.DefaultProfitControlEnabled holds the default value on creation for the profit_control_enabled field.
  1236. group.DefaultProfitControlEnabled = groupDescProfitControlEnabled.Default.(bool)
  1237. // groupDescProfitMinMargin is the schema descriptor for profit_min_margin field.
  1238. groupDescProfitMinMargin := groupFields[64].Descriptor()
  1239. // group.DefaultProfitMinMargin holds the default value on creation for the profit_min_margin field.
  1240. group.DefaultProfitMinMargin = groupDescProfitMinMargin.Default.(float64)
  1241. // groupDescProfitSafetyBuffer is the schema descriptor for profit_safety_buffer field.
  1242. groupDescProfitSafetyBuffer := groupFields[65].Descriptor()
  1243. // group.DefaultProfitSafetyBuffer holds the default value on creation for the profit_safety_buffer field.
  1244. group.DefaultProfitSafetyBuffer = groupDescProfitSafetyBuffer.Default.(float64)
  1245. idempotencyrecordMixin := schema.IdempotencyRecord{}.Mixin()
  1246. idempotencyrecordMixinFields0 := idempotencyrecordMixin[0].Fields()
  1247. _ = idempotencyrecordMixinFields0
  1248. idempotencyrecordFields := schema.IdempotencyRecord{}.Fields()
  1249. _ = idempotencyrecordFields
  1250. // idempotencyrecordDescCreatedAt is the schema descriptor for created_at field.
  1251. idempotencyrecordDescCreatedAt := idempotencyrecordMixinFields0[0].Descriptor()
  1252. // idempotencyrecord.DefaultCreatedAt holds the default value on creation for the created_at field.
  1253. idempotencyrecord.DefaultCreatedAt = idempotencyrecordDescCreatedAt.Default.(func() time.Time)
  1254. // idempotencyrecordDescUpdatedAt is the schema descriptor for updated_at field.
  1255. idempotencyrecordDescUpdatedAt := idempotencyrecordMixinFields0[1].Descriptor()
  1256. // idempotencyrecord.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1257. idempotencyrecord.DefaultUpdatedAt = idempotencyrecordDescUpdatedAt.Default.(func() time.Time)
  1258. // idempotencyrecord.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1259. idempotencyrecord.UpdateDefaultUpdatedAt = idempotencyrecordDescUpdatedAt.UpdateDefault.(func() time.Time)
  1260. // idempotencyrecordDescScope is the schema descriptor for scope field.
  1261. idempotencyrecordDescScope := idempotencyrecordFields[0].Descriptor()
  1262. // idempotencyrecord.ScopeValidator is a validator for the "scope" field. It is called by the builders before save.
  1263. idempotencyrecord.ScopeValidator = idempotencyrecordDescScope.Validators[0].(func(string) error)
  1264. // idempotencyrecordDescIdempotencyKeyHash is the schema descriptor for idempotency_key_hash field.
  1265. idempotencyrecordDescIdempotencyKeyHash := idempotencyrecordFields[1].Descriptor()
  1266. // idempotencyrecord.IdempotencyKeyHashValidator is a validator for the "idempotency_key_hash" field. It is called by the builders before save.
  1267. idempotencyrecord.IdempotencyKeyHashValidator = idempotencyrecordDescIdempotencyKeyHash.Validators[0].(func(string) error)
  1268. // idempotencyrecordDescRequestFingerprint is the schema descriptor for request_fingerprint field.
  1269. idempotencyrecordDescRequestFingerprint := idempotencyrecordFields[2].Descriptor()
  1270. // idempotencyrecord.RequestFingerprintValidator is a validator for the "request_fingerprint" field. It is called by the builders before save.
  1271. idempotencyrecord.RequestFingerprintValidator = idempotencyrecordDescRequestFingerprint.Validators[0].(func(string) error)
  1272. // idempotencyrecordDescStatus is the schema descriptor for status field.
  1273. idempotencyrecordDescStatus := idempotencyrecordFields[3].Descriptor()
  1274. // idempotencyrecord.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  1275. idempotencyrecord.StatusValidator = idempotencyrecordDescStatus.Validators[0].(func(string) error)
  1276. // idempotencyrecordDescErrorReason is the schema descriptor for error_reason field.
  1277. idempotencyrecordDescErrorReason := idempotencyrecordFields[6].Descriptor()
  1278. // idempotencyrecord.ErrorReasonValidator is a validator for the "error_reason" field. It is called by the builders before save.
  1279. idempotencyrecord.ErrorReasonValidator = idempotencyrecordDescErrorReason.Validators[0].(func(string) error)
  1280. identityadoptiondecisionMixin := schema.IdentityAdoptionDecision{}.Mixin()
  1281. identityadoptiondecisionMixinFields0 := identityadoptiondecisionMixin[0].Fields()
  1282. _ = identityadoptiondecisionMixinFields0
  1283. identityadoptiondecisionFields := schema.IdentityAdoptionDecision{}.Fields()
  1284. _ = identityadoptiondecisionFields
  1285. // identityadoptiondecisionDescCreatedAt is the schema descriptor for created_at field.
  1286. identityadoptiondecisionDescCreatedAt := identityadoptiondecisionMixinFields0[0].Descriptor()
  1287. // identityadoptiondecision.DefaultCreatedAt holds the default value on creation for the created_at field.
  1288. identityadoptiondecision.DefaultCreatedAt = identityadoptiondecisionDescCreatedAt.Default.(func() time.Time)
  1289. // identityadoptiondecisionDescUpdatedAt is the schema descriptor for updated_at field.
  1290. identityadoptiondecisionDescUpdatedAt := identityadoptiondecisionMixinFields0[1].Descriptor()
  1291. // identityadoptiondecision.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1292. identityadoptiondecision.DefaultUpdatedAt = identityadoptiondecisionDescUpdatedAt.Default.(func() time.Time)
  1293. // identityadoptiondecision.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1294. identityadoptiondecision.UpdateDefaultUpdatedAt = identityadoptiondecisionDescUpdatedAt.UpdateDefault.(func() time.Time)
  1295. // identityadoptiondecisionDescAdoptDisplayName is the schema descriptor for adopt_display_name field.
  1296. identityadoptiondecisionDescAdoptDisplayName := identityadoptiondecisionFields[2].Descriptor()
  1297. // identityadoptiondecision.DefaultAdoptDisplayName holds the default value on creation for the adopt_display_name field.
  1298. identityadoptiondecision.DefaultAdoptDisplayName = identityadoptiondecisionDescAdoptDisplayName.Default.(bool)
  1299. // identityadoptiondecisionDescAdoptAvatar is the schema descriptor for adopt_avatar field.
  1300. identityadoptiondecisionDescAdoptAvatar := identityadoptiondecisionFields[3].Descriptor()
  1301. // identityadoptiondecision.DefaultAdoptAvatar holds the default value on creation for the adopt_avatar field.
  1302. identityadoptiondecision.DefaultAdoptAvatar = identityadoptiondecisionDescAdoptAvatar.Default.(bool)
  1303. // identityadoptiondecisionDescDecidedAt is the schema descriptor for decided_at field.
  1304. identityadoptiondecisionDescDecidedAt := identityadoptiondecisionFields[4].Descriptor()
  1305. // identityadoptiondecision.DefaultDecidedAt holds the default value on creation for the decided_at field.
  1306. identityadoptiondecision.DefaultDecidedAt = identityadoptiondecisionDescDecidedAt.Default.(func() time.Time)
  1307. paymentauditlogFields := schema.PaymentAuditLog{}.Fields()
  1308. _ = paymentauditlogFields
  1309. // paymentauditlogDescOrderID is the schema descriptor for order_id field.
  1310. paymentauditlogDescOrderID := paymentauditlogFields[0].Descriptor()
  1311. // paymentauditlog.OrderIDValidator is a validator for the "order_id" field. It is called by the builders before save.
  1312. paymentauditlog.OrderIDValidator = paymentauditlogDescOrderID.Validators[0].(func(string) error)
  1313. // paymentauditlogDescAction is the schema descriptor for action field.
  1314. paymentauditlogDescAction := paymentauditlogFields[1].Descriptor()
  1315. // paymentauditlog.ActionValidator is a validator for the "action" field. It is called by the builders before save.
  1316. paymentauditlog.ActionValidator = paymentauditlogDescAction.Validators[0].(func(string) error)
  1317. // paymentauditlogDescDetail is the schema descriptor for detail field.
  1318. paymentauditlogDescDetail := paymentauditlogFields[2].Descriptor()
  1319. // paymentauditlog.DefaultDetail holds the default value on creation for the detail field.
  1320. paymentauditlog.DefaultDetail = paymentauditlogDescDetail.Default.(string)
  1321. // paymentauditlogDescOperator is the schema descriptor for operator field.
  1322. paymentauditlogDescOperator := paymentauditlogFields[3].Descriptor()
  1323. // paymentauditlog.DefaultOperator holds the default value on creation for the operator field.
  1324. paymentauditlog.DefaultOperator = paymentauditlogDescOperator.Default.(string)
  1325. // paymentauditlog.OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
  1326. paymentauditlog.OperatorValidator = paymentauditlogDescOperator.Validators[0].(func(string) error)
  1327. // paymentauditlogDescCreatedAt is the schema descriptor for created_at field.
  1328. paymentauditlogDescCreatedAt := paymentauditlogFields[4].Descriptor()
  1329. // paymentauditlog.DefaultCreatedAt holds the default value on creation for the created_at field.
  1330. paymentauditlog.DefaultCreatedAt = paymentauditlogDescCreatedAt.Default.(func() time.Time)
  1331. paymentorderFields := schema.PaymentOrder{}.Fields()
  1332. _ = paymentorderFields
  1333. // paymentorderDescUserEmail is the schema descriptor for user_email field.
  1334. paymentorderDescUserEmail := paymentorderFields[1].Descriptor()
  1335. // paymentorder.UserEmailValidator is a validator for the "user_email" field. It is called by the builders before save.
  1336. paymentorder.UserEmailValidator = paymentorderDescUserEmail.Validators[0].(func(string) error)
  1337. // paymentorderDescUserName is the schema descriptor for user_name field.
  1338. paymentorderDescUserName := paymentorderFields[2].Descriptor()
  1339. // paymentorder.UserNameValidator is a validator for the "user_name" field. It is called by the builders before save.
  1340. paymentorder.UserNameValidator = paymentorderDescUserName.Validators[0].(func(string) error)
  1341. // paymentorderDescFeeRate is the schema descriptor for fee_rate field.
  1342. paymentorderDescFeeRate := paymentorderFields[6].Descriptor()
  1343. // paymentorder.DefaultFeeRate holds the default value on creation for the fee_rate field.
  1344. paymentorder.DefaultFeeRate = paymentorderDescFeeRate.Default.(float64)
  1345. // paymentorderDescRechargeCode is the schema descriptor for recharge_code field.
  1346. paymentorderDescRechargeCode := paymentorderFields[7].Descriptor()
  1347. // paymentorder.RechargeCodeValidator is a validator for the "recharge_code" field. It is called by the builders before save.
  1348. paymentorder.RechargeCodeValidator = paymentorderDescRechargeCode.Validators[0].(func(string) error)
  1349. // paymentorderDescOutTradeNo is the schema descriptor for out_trade_no field.
  1350. paymentorderDescOutTradeNo := paymentorderFields[8].Descriptor()
  1351. // paymentorder.DefaultOutTradeNo holds the default value on creation for the out_trade_no field.
  1352. paymentorder.DefaultOutTradeNo = paymentorderDescOutTradeNo.Default.(string)
  1353. // paymentorder.OutTradeNoValidator is a validator for the "out_trade_no" field. It is called by the builders before save.
  1354. paymentorder.OutTradeNoValidator = paymentorderDescOutTradeNo.Validators[0].(func(string) error)
  1355. // paymentorderDescPaymentType is the schema descriptor for payment_type field.
  1356. paymentorderDescPaymentType := paymentorderFields[9].Descriptor()
  1357. // paymentorder.PaymentTypeValidator is a validator for the "payment_type" field. It is called by the builders before save.
  1358. paymentorder.PaymentTypeValidator = paymentorderDescPaymentType.Validators[0].(func(string) error)
  1359. // paymentorderDescPaymentTradeNo is the schema descriptor for payment_trade_no field.
  1360. paymentorderDescPaymentTradeNo := paymentorderFields[10].Descriptor()
  1361. // paymentorder.PaymentTradeNoValidator is a validator for the "payment_trade_no" field. It is called by the builders before save.
  1362. paymentorder.PaymentTradeNoValidator = paymentorderDescPaymentTradeNo.Validators[0].(func(string) error)
  1363. // paymentorderDescOrderType is the schema descriptor for order_type field.
  1364. paymentorderDescOrderType := paymentorderFields[14].Descriptor()
  1365. // paymentorder.DefaultOrderType holds the default value on creation for the order_type field.
  1366. paymentorder.DefaultOrderType = paymentorderDescOrderType.Default.(string)
  1367. // paymentorder.OrderTypeValidator is a validator for the "order_type" field. It is called by the builders before save.
  1368. paymentorder.OrderTypeValidator = paymentorderDescOrderType.Validators[0].(func(string) error)
  1369. // paymentorderDescProviderInstanceID is the schema descriptor for provider_instance_id field.
  1370. paymentorderDescProviderInstanceID := paymentorderFields[18].Descriptor()
  1371. // paymentorder.ProviderInstanceIDValidator is a validator for the "provider_instance_id" field. It is called by the builders before save.
  1372. paymentorder.ProviderInstanceIDValidator = paymentorderDescProviderInstanceID.Validators[0].(func(string) error)
  1373. // paymentorderDescProviderKey is the schema descriptor for provider_key field.
  1374. paymentorderDescProviderKey := paymentorderFields[19].Descriptor()
  1375. // paymentorder.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
  1376. paymentorder.ProviderKeyValidator = paymentorderDescProviderKey.Validators[0].(func(string) error)
  1377. // paymentorderDescStatus is the schema descriptor for status field.
  1378. paymentorderDescStatus := paymentorderFields[21].Descriptor()
  1379. // paymentorder.DefaultStatus holds the default value on creation for the status field.
  1380. paymentorder.DefaultStatus = paymentorderDescStatus.Default.(string)
  1381. // paymentorder.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  1382. paymentorder.StatusValidator = paymentorderDescStatus.Validators[0].(func(string) error)
  1383. // paymentorderDescRefundAmount is the schema descriptor for refund_amount field.
  1384. paymentorderDescRefundAmount := paymentorderFields[22].Descriptor()
  1385. // paymentorder.DefaultRefundAmount holds the default value on creation for the refund_amount field.
  1386. paymentorder.DefaultRefundAmount = paymentorderDescRefundAmount.Default.(float64)
  1387. // paymentorderDescForceRefund is the schema descriptor for force_refund field.
  1388. paymentorderDescForceRefund := paymentorderFields[25].Descriptor()
  1389. // paymentorder.DefaultForceRefund holds the default value on creation for the force_refund field.
  1390. paymentorder.DefaultForceRefund = paymentorderDescForceRefund.Default.(bool)
  1391. // paymentorderDescRefundRequestedBy is the schema descriptor for refund_requested_by field.
  1392. paymentorderDescRefundRequestedBy := paymentorderFields[28].Descriptor()
  1393. // paymentorder.RefundRequestedByValidator is a validator for the "refund_requested_by" field. It is called by the builders before save.
  1394. paymentorder.RefundRequestedByValidator = paymentorderDescRefundRequestedBy.Validators[0].(func(string) error)
  1395. // paymentorderDescClientIP is the schema descriptor for client_ip field.
  1396. paymentorderDescClientIP := paymentorderFields[34].Descriptor()
  1397. // paymentorder.ClientIPValidator is a validator for the "client_ip" field. It is called by the builders before save.
  1398. paymentorder.ClientIPValidator = paymentorderDescClientIP.Validators[0].(func(string) error)
  1399. // paymentorderDescSrcHost is the schema descriptor for src_host field.
  1400. paymentorderDescSrcHost := paymentorderFields[35].Descriptor()
  1401. // paymentorder.SrcHostValidator is a validator for the "src_host" field. It is called by the builders before save.
  1402. paymentorder.SrcHostValidator = paymentorderDescSrcHost.Validators[0].(func(string) error)
  1403. // paymentorderDescCreatedAt is the schema descriptor for created_at field.
  1404. paymentorderDescCreatedAt := paymentorderFields[37].Descriptor()
  1405. // paymentorder.DefaultCreatedAt holds the default value on creation for the created_at field.
  1406. paymentorder.DefaultCreatedAt = paymentorderDescCreatedAt.Default.(func() time.Time)
  1407. // paymentorderDescUpdatedAt is the schema descriptor for updated_at field.
  1408. paymentorderDescUpdatedAt := paymentorderFields[38].Descriptor()
  1409. // paymentorder.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1410. paymentorder.DefaultUpdatedAt = paymentorderDescUpdatedAt.Default.(func() time.Time)
  1411. // paymentorder.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1412. paymentorder.UpdateDefaultUpdatedAt = paymentorderDescUpdatedAt.UpdateDefault.(func() time.Time)
  1413. paymentproviderinstanceFields := schema.PaymentProviderInstance{}.Fields()
  1414. _ = paymentproviderinstanceFields
  1415. // paymentproviderinstanceDescProviderKey is the schema descriptor for provider_key field.
  1416. paymentproviderinstanceDescProviderKey := paymentproviderinstanceFields[0].Descriptor()
  1417. // paymentproviderinstance.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
  1418. paymentproviderinstance.ProviderKeyValidator = func() func(string) error {
  1419. validators := paymentproviderinstanceDescProviderKey.Validators
  1420. fns := [...]func(string) error{
  1421. validators[0].(func(string) error),
  1422. validators[1].(func(string) error),
  1423. }
  1424. return func(provider_key string) error {
  1425. for _, fn := range fns {
  1426. if err := fn(provider_key); err != nil {
  1427. return err
  1428. }
  1429. }
  1430. return nil
  1431. }
  1432. }()
  1433. // paymentproviderinstanceDescName is the schema descriptor for name field.
  1434. paymentproviderinstanceDescName := paymentproviderinstanceFields[1].Descriptor()
  1435. // paymentproviderinstance.DefaultName holds the default value on creation for the name field.
  1436. paymentproviderinstance.DefaultName = paymentproviderinstanceDescName.Default.(string)
  1437. // paymentproviderinstance.NameValidator is a validator for the "name" field. It is called by the builders before save.
  1438. paymentproviderinstance.NameValidator = paymentproviderinstanceDescName.Validators[0].(func(string) error)
  1439. // paymentproviderinstanceDescSupportedTypes is the schema descriptor for supported_types field.
  1440. paymentproviderinstanceDescSupportedTypes := paymentproviderinstanceFields[3].Descriptor()
  1441. // paymentproviderinstance.DefaultSupportedTypes holds the default value on creation for the supported_types field.
  1442. paymentproviderinstance.DefaultSupportedTypes = paymentproviderinstanceDescSupportedTypes.Default.(string)
  1443. // paymentproviderinstance.SupportedTypesValidator is a validator for the "supported_types" field. It is called by the builders before save.
  1444. paymentproviderinstance.SupportedTypesValidator = paymentproviderinstanceDescSupportedTypes.Validators[0].(func(string) error)
  1445. // paymentproviderinstanceDescEnabled is the schema descriptor for enabled field.
  1446. paymentproviderinstanceDescEnabled := paymentproviderinstanceFields[4].Descriptor()
  1447. // paymentproviderinstance.DefaultEnabled holds the default value on creation for the enabled field.
  1448. paymentproviderinstance.DefaultEnabled = paymentproviderinstanceDescEnabled.Default.(bool)
  1449. // paymentproviderinstanceDescPaymentMode is the schema descriptor for payment_mode field.
  1450. paymentproviderinstanceDescPaymentMode := paymentproviderinstanceFields[5].Descriptor()
  1451. // paymentproviderinstance.DefaultPaymentMode holds the default value on creation for the payment_mode field.
  1452. paymentproviderinstance.DefaultPaymentMode = paymentproviderinstanceDescPaymentMode.Default.(string)
  1453. // paymentproviderinstance.PaymentModeValidator is a validator for the "payment_mode" field. It is called by the builders before save.
  1454. paymentproviderinstance.PaymentModeValidator = paymentproviderinstanceDescPaymentMode.Validators[0].(func(string) error)
  1455. // paymentproviderinstanceDescSortOrder is the schema descriptor for sort_order field.
  1456. paymentproviderinstanceDescSortOrder := paymentproviderinstanceFields[6].Descriptor()
  1457. // paymentproviderinstance.DefaultSortOrder holds the default value on creation for the sort_order field.
  1458. paymentproviderinstance.DefaultSortOrder = paymentproviderinstanceDescSortOrder.Default.(int)
  1459. // paymentproviderinstanceDescLimits is the schema descriptor for limits field.
  1460. paymentproviderinstanceDescLimits := paymentproviderinstanceFields[7].Descriptor()
  1461. // paymentproviderinstance.DefaultLimits holds the default value on creation for the limits field.
  1462. paymentproviderinstance.DefaultLimits = paymentproviderinstanceDescLimits.Default.(string)
  1463. // paymentproviderinstanceDescRefundEnabled is the schema descriptor for refund_enabled field.
  1464. paymentproviderinstanceDescRefundEnabled := paymentproviderinstanceFields[8].Descriptor()
  1465. // paymentproviderinstance.DefaultRefundEnabled holds the default value on creation for the refund_enabled field.
  1466. paymentproviderinstance.DefaultRefundEnabled = paymentproviderinstanceDescRefundEnabled.Default.(bool)
  1467. // paymentproviderinstanceDescAllowUserRefund is the schema descriptor for allow_user_refund field.
  1468. paymentproviderinstanceDescAllowUserRefund := paymentproviderinstanceFields[9].Descriptor()
  1469. // paymentproviderinstance.DefaultAllowUserRefund holds the default value on creation for the allow_user_refund field.
  1470. paymentproviderinstance.DefaultAllowUserRefund = paymentproviderinstanceDescAllowUserRefund.Default.(bool)
  1471. // paymentproviderinstanceDescCreatedAt is the schema descriptor for created_at field.
  1472. paymentproviderinstanceDescCreatedAt := paymentproviderinstanceFields[10].Descriptor()
  1473. // paymentproviderinstance.DefaultCreatedAt holds the default value on creation for the created_at field.
  1474. paymentproviderinstance.DefaultCreatedAt = paymentproviderinstanceDescCreatedAt.Default.(func() time.Time)
  1475. // paymentproviderinstanceDescUpdatedAt is the schema descriptor for updated_at field.
  1476. paymentproviderinstanceDescUpdatedAt := paymentproviderinstanceFields[11].Descriptor()
  1477. // paymentproviderinstance.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1478. paymentproviderinstance.DefaultUpdatedAt = paymentproviderinstanceDescUpdatedAt.Default.(func() time.Time)
  1479. // paymentproviderinstance.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1480. paymentproviderinstance.UpdateDefaultUpdatedAt = paymentproviderinstanceDescUpdatedAt.UpdateDefault.(func() time.Time)
  1481. pendingauthsessionMixin := schema.PendingAuthSession{}.Mixin()
  1482. pendingauthsessionMixinFields0 := pendingauthsessionMixin[0].Fields()
  1483. _ = pendingauthsessionMixinFields0
  1484. pendingauthsessionFields := schema.PendingAuthSession{}.Fields()
  1485. _ = pendingauthsessionFields
  1486. // pendingauthsessionDescCreatedAt is the schema descriptor for created_at field.
  1487. pendingauthsessionDescCreatedAt := pendingauthsessionMixinFields0[0].Descriptor()
  1488. // pendingauthsession.DefaultCreatedAt holds the default value on creation for the created_at field.
  1489. pendingauthsession.DefaultCreatedAt = pendingauthsessionDescCreatedAt.Default.(func() time.Time)
  1490. // pendingauthsessionDescUpdatedAt is the schema descriptor for updated_at field.
  1491. pendingauthsessionDescUpdatedAt := pendingauthsessionMixinFields0[1].Descriptor()
  1492. // pendingauthsession.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1493. pendingauthsession.DefaultUpdatedAt = pendingauthsessionDescUpdatedAt.Default.(func() time.Time)
  1494. // pendingauthsession.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1495. pendingauthsession.UpdateDefaultUpdatedAt = pendingauthsessionDescUpdatedAt.UpdateDefault.(func() time.Time)
  1496. // pendingauthsessionDescSessionToken is the schema descriptor for session_token field.
  1497. pendingauthsessionDescSessionToken := pendingauthsessionFields[0].Descriptor()
  1498. // pendingauthsession.SessionTokenValidator is a validator for the "session_token" field. It is called by the builders before save.
  1499. pendingauthsession.SessionTokenValidator = func() func(string) error {
  1500. validators := pendingauthsessionDescSessionToken.Validators
  1501. fns := [...]func(string) error{
  1502. validators[0].(func(string) error),
  1503. validators[1].(func(string) error),
  1504. }
  1505. return func(session_token string) error {
  1506. for _, fn := range fns {
  1507. if err := fn(session_token); err != nil {
  1508. return err
  1509. }
  1510. }
  1511. return nil
  1512. }
  1513. }()
  1514. // pendingauthsessionDescIntent is the schema descriptor for intent field.
  1515. pendingauthsessionDescIntent := pendingauthsessionFields[1].Descriptor()
  1516. // pendingauthsession.IntentValidator is a validator for the "intent" field. It is called by the builders before save.
  1517. pendingauthsession.IntentValidator = func() func(string) error {
  1518. validators := pendingauthsessionDescIntent.Validators
  1519. fns := [...]func(string) error{
  1520. validators[0].(func(string) error),
  1521. validators[1].(func(string) error),
  1522. validators[2].(func(string) error),
  1523. }
  1524. return func(intent string) error {
  1525. for _, fn := range fns {
  1526. if err := fn(intent); err != nil {
  1527. return err
  1528. }
  1529. }
  1530. return nil
  1531. }
  1532. }()
  1533. // pendingauthsessionDescProviderType is the schema descriptor for provider_type field.
  1534. pendingauthsessionDescProviderType := pendingauthsessionFields[2].Descriptor()
  1535. // pendingauthsession.ProviderTypeValidator is a validator for the "provider_type" field. It is called by the builders before save.
  1536. pendingauthsession.ProviderTypeValidator = func() func(string) error {
  1537. validators := pendingauthsessionDescProviderType.Validators
  1538. fns := [...]func(string) error{
  1539. validators[0].(func(string) error),
  1540. validators[1].(func(string) error),
  1541. validators[2].(func(string) error),
  1542. }
  1543. return func(provider_type string) error {
  1544. for _, fn := range fns {
  1545. if err := fn(provider_type); err != nil {
  1546. return err
  1547. }
  1548. }
  1549. return nil
  1550. }
  1551. }()
  1552. // pendingauthsessionDescProviderKey is the schema descriptor for provider_key field.
  1553. pendingauthsessionDescProviderKey := pendingauthsessionFields[3].Descriptor()
  1554. // pendingauthsession.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
  1555. pendingauthsession.ProviderKeyValidator = pendingauthsessionDescProviderKey.Validators[0].(func(string) error)
  1556. // pendingauthsessionDescProviderSubject is the schema descriptor for provider_subject field.
  1557. pendingauthsessionDescProviderSubject := pendingauthsessionFields[4].Descriptor()
  1558. // pendingauthsession.ProviderSubjectValidator is a validator for the "provider_subject" field. It is called by the builders before save.
  1559. pendingauthsession.ProviderSubjectValidator = pendingauthsessionDescProviderSubject.Validators[0].(func(string) error)
  1560. // pendingauthsessionDescRedirectTo is the schema descriptor for redirect_to field.
  1561. pendingauthsessionDescRedirectTo := pendingauthsessionFields[6].Descriptor()
  1562. // pendingauthsession.DefaultRedirectTo holds the default value on creation for the redirect_to field.
  1563. pendingauthsession.DefaultRedirectTo = pendingauthsessionDescRedirectTo.Default.(string)
  1564. // pendingauthsessionDescResolvedEmail is the schema descriptor for resolved_email field.
  1565. pendingauthsessionDescResolvedEmail := pendingauthsessionFields[7].Descriptor()
  1566. // pendingauthsession.DefaultResolvedEmail holds the default value on creation for the resolved_email field.
  1567. pendingauthsession.DefaultResolvedEmail = pendingauthsessionDescResolvedEmail.Default.(string)
  1568. // pendingauthsessionDescRegistrationPasswordHash is the schema descriptor for registration_password_hash field.
  1569. pendingauthsessionDescRegistrationPasswordHash := pendingauthsessionFields[8].Descriptor()
  1570. // pendingauthsession.DefaultRegistrationPasswordHash holds the default value on creation for the registration_password_hash field.
  1571. pendingauthsession.DefaultRegistrationPasswordHash = pendingauthsessionDescRegistrationPasswordHash.Default.(string)
  1572. // pendingauthsessionDescUpstreamIdentityClaims is the schema descriptor for upstream_identity_claims field.
  1573. pendingauthsessionDescUpstreamIdentityClaims := pendingauthsessionFields[9].Descriptor()
  1574. // pendingauthsession.DefaultUpstreamIdentityClaims holds the default value on creation for the upstream_identity_claims field.
  1575. pendingauthsession.DefaultUpstreamIdentityClaims = pendingauthsessionDescUpstreamIdentityClaims.Default.(func() map[string]interface{})
  1576. // pendingauthsessionDescLocalFlowState is the schema descriptor for local_flow_state field.
  1577. pendingauthsessionDescLocalFlowState := pendingauthsessionFields[10].Descriptor()
  1578. // pendingauthsession.DefaultLocalFlowState holds the default value on creation for the local_flow_state field.
  1579. pendingauthsession.DefaultLocalFlowState = pendingauthsessionDescLocalFlowState.Default.(func() map[string]interface{})
  1580. // pendingauthsessionDescBrowserSessionKey is the schema descriptor for browser_session_key field.
  1581. pendingauthsessionDescBrowserSessionKey := pendingauthsessionFields[11].Descriptor()
  1582. // pendingauthsession.DefaultBrowserSessionKey holds the default value on creation for the browser_session_key field.
  1583. pendingauthsession.DefaultBrowserSessionKey = pendingauthsessionDescBrowserSessionKey.Default.(string)
  1584. // pendingauthsessionDescCompletionCodeHash is the schema descriptor for completion_code_hash field.
  1585. pendingauthsessionDescCompletionCodeHash := pendingauthsessionFields[12].Descriptor()
  1586. // pendingauthsession.DefaultCompletionCodeHash holds the default value on creation for the completion_code_hash field.
  1587. pendingauthsession.DefaultCompletionCodeHash = pendingauthsessionDescCompletionCodeHash.Default.(string)
  1588. promocodeFields := schema.PromoCode{}.Fields()
  1589. _ = promocodeFields
  1590. // promocodeDescCode is the schema descriptor for code field.
  1591. promocodeDescCode := promocodeFields[0].Descriptor()
  1592. // promocode.CodeValidator is a validator for the "code" field. It is called by the builders before save.
  1593. promocode.CodeValidator = func() func(string) error {
  1594. validators := promocodeDescCode.Validators
  1595. fns := [...]func(string) error{
  1596. validators[0].(func(string) error),
  1597. validators[1].(func(string) error),
  1598. }
  1599. return func(code string) error {
  1600. for _, fn := range fns {
  1601. if err := fn(code); err != nil {
  1602. return err
  1603. }
  1604. }
  1605. return nil
  1606. }
  1607. }()
  1608. // promocodeDescBonusAmount is the schema descriptor for bonus_amount field.
  1609. promocodeDescBonusAmount := promocodeFields[1].Descriptor()
  1610. // promocode.DefaultBonusAmount holds the default value on creation for the bonus_amount field.
  1611. promocode.DefaultBonusAmount = promocodeDescBonusAmount.Default.(float64)
  1612. // promocodeDescMaxUses is the schema descriptor for max_uses field.
  1613. promocodeDescMaxUses := promocodeFields[2].Descriptor()
  1614. // promocode.DefaultMaxUses holds the default value on creation for the max_uses field.
  1615. promocode.DefaultMaxUses = promocodeDescMaxUses.Default.(int)
  1616. // promocodeDescUsedCount is the schema descriptor for used_count field.
  1617. promocodeDescUsedCount := promocodeFields[3].Descriptor()
  1618. // promocode.DefaultUsedCount holds the default value on creation for the used_count field.
  1619. promocode.DefaultUsedCount = promocodeDescUsedCount.Default.(int)
  1620. // promocodeDescStatus is the schema descriptor for status field.
  1621. promocodeDescStatus := promocodeFields[4].Descriptor()
  1622. // promocode.DefaultStatus holds the default value on creation for the status field.
  1623. promocode.DefaultStatus = promocodeDescStatus.Default.(string)
  1624. // promocode.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  1625. promocode.StatusValidator = promocodeDescStatus.Validators[0].(func(string) error)
  1626. // promocodeDescCreatedAt is the schema descriptor for created_at field.
  1627. promocodeDescCreatedAt := promocodeFields[7].Descriptor()
  1628. // promocode.DefaultCreatedAt holds the default value on creation for the created_at field.
  1629. promocode.DefaultCreatedAt = promocodeDescCreatedAt.Default.(func() time.Time)
  1630. // promocodeDescUpdatedAt is the schema descriptor for updated_at field.
  1631. promocodeDescUpdatedAt := promocodeFields[8].Descriptor()
  1632. // promocode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1633. promocode.DefaultUpdatedAt = promocodeDescUpdatedAt.Default.(func() time.Time)
  1634. // promocode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1635. promocode.UpdateDefaultUpdatedAt = promocodeDescUpdatedAt.UpdateDefault.(func() time.Time)
  1636. promocodeusageFields := schema.PromoCodeUsage{}.Fields()
  1637. _ = promocodeusageFields
  1638. // promocodeusageDescUsedAt is the schema descriptor for used_at field.
  1639. promocodeusageDescUsedAt := promocodeusageFields[3].Descriptor()
  1640. // promocodeusage.DefaultUsedAt holds the default value on creation for the used_at field.
  1641. promocodeusage.DefaultUsedAt = promocodeusageDescUsedAt.Default.(func() time.Time)
  1642. proxyMixin := schema.Proxy{}.Mixin()
  1643. proxyMixinHooks1 := proxyMixin[1].Hooks()
  1644. proxy.Hooks[0] = proxyMixinHooks1[0]
  1645. proxyMixinInters1 := proxyMixin[1].Interceptors()
  1646. proxy.Interceptors[0] = proxyMixinInters1[0]
  1647. proxyMixinFields0 := proxyMixin[0].Fields()
  1648. _ = proxyMixinFields0
  1649. proxyFields := schema.Proxy{}.Fields()
  1650. _ = proxyFields
  1651. // proxyDescCreatedAt is the schema descriptor for created_at field.
  1652. proxyDescCreatedAt := proxyMixinFields0[0].Descriptor()
  1653. // proxy.DefaultCreatedAt holds the default value on creation for the created_at field.
  1654. proxy.DefaultCreatedAt = proxyDescCreatedAt.Default.(func() time.Time)
  1655. // proxyDescUpdatedAt is the schema descriptor for updated_at field.
  1656. proxyDescUpdatedAt := proxyMixinFields0[1].Descriptor()
  1657. // proxy.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1658. proxy.DefaultUpdatedAt = proxyDescUpdatedAt.Default.(func() time.Time)
  1659. // proxy.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1660. proxy.UpdateDefaultUpdatedAt = proxyDescUpdatedAt.UpdateDefault.(func() time.Time)
  1661. // proxyDescName is the schema descriptor for name field.
  1662. proxyDescName := proxyFields[0].Descriptor()
  1663. // proxy.NameValidator is a validator for the "name" field. It is called by the builders before save.
  1664. proxy.NameValidator = func() func(string) error {
  1665. validators := proxyDescName.Validators
  1666. fns := [...]func(string) error{
  1667. validators[0].(func(string) error),
  1668. validators[1].(func(string) error),
  1669. }
  1670. return func(name string) error {
  1671. for _, fn := range fns {
  1672. if err := fn(name); err != nil {
  1673. return err
  1674. }
  1675. }
  1676. return nil
  1677. }
  1678. }()
  1679. // proxyDescProtocol is the schema descriptor for protocol field.
  1680. proxyDescProtocol := proxyFields[1].Descriptor()
  1681. // proxy.ProtocolValidator is a validator for the "protocol" field. It is called by the builders before save.
  1682. proxy.ProtocolValidator = func() func(string) error {
  1683. validators := proxyDescProtocol.Validators
  1684. fns := [...]func(string) error{
  1685. validators[0].(func(string) error),
  1686. validators[1].(func(string) error),
  1687. }
  1688. return func(protocol string) error {
  1689. for _, fn := range fns {
  1690. if err := fn(protocol); err != nil {
  1691. return err
  1692. }
  1693. }
  1694. return nil
  1695. }
  1696. }()
  1697. // proxyDescHost is the schema descriptor for host field.
  1698. proxyDescHost := proxyFields[2].Descriptor()
  1699. // proxy.HostValidator is a validator for the "host" field. It is called by the builders before save.
  1700. proxy.HostValidator = func() func(string) error {
  1701. validators := proxyDescHost.Validators
  1702. fns := [...]func(string) error{
  1703. validators[0].(func(string) error),
  1704. validators[1].(func(string) error),
  1705. }
  1706. return func(host string) error {
  1707. for _, fn := range fns {
  1708. if err := fn(host); err != nil {
  1709. return err
  1710. }
  1711. }
  1712. return nil
  1713. }
  1714. }()
  1715. // proxyDescUsername is the schema descriptor for username field.
  1716. proxyDescUsername := proxyFields[4].Descriptor()
  1717. // proxy.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
  1718. proxy.UsernameValidator = proxyDescUsername.Validators[0].(func(string) error)
  1719. // proxyDescPassword is the schema descriptor for password field.
  1720. proxyDescPassword := proxyFields[5].Descriptor()
  1721. // proxy.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
  1722. proxy.PasswordValidator = proxyDescPassword.Validators[0].(func(string) error)
  1723. // proxyDescStatus is the schema descriptor for status field.
  1724. proxyDescStatus := proxyFields[6].Descriptor()
  1725. // proxy.DefaultStatus holds the default value on creation for the status field.
  1726. proxy.DefaultStatus = proxyDescStatus.Default.(string)
  1727. // proxy.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  1728. proxy.StatusValidator = proxyDescStatus.Validators[0].(func(string) error)
  1729. // proxyDescFallbackMode is the schema descriptor for fallback_mode field.
  1730. proxyDescFallbackMode := proxyFields[8].Descriptor()
  1731. // proxy.DefaultFallbackMode holds the default value on creation for the fallback_mode field.
  1732. proxy.DefaultFallbackMode = proxyDescFallbackMode.Default.(string)
  1733. // proxy.FallbackModeValidator is a validator for the "fallback_mode" field. It is called by the builders before save.
  1734. proxy.FallbackModeValidator = proxyDescFallbackMode.Validators[0].(func(string) error)
  1735. // proxyDescExpiryWarnDays is the schema descriptor for expiry_warn_days field.
  1736. proxyDescExpiryWarnDays := proxyFields[10].Descriptor()
  1737. // proxy.DefaultExpiryWarnDays holds the default value on creation for the expiry_warn_days field.
  1738. proxy.DefaultExpiryWarnDays = proxyDescExpiryWarnDays.Default.(int)
  1739. redeemcodeFields := schema.RedeemCode{}.Fields()
  1740. _ = redeemcodeFields
  1741. // redeemcodeDescCode is the schema descriptor for code field.
  1742. redeemcodeDescCode := redeemcodeFields[0].Descriptor()
  1743. // redeemcode.CodeValidator is a validator for the "code" field. It is called by the builders before save.
  1744. redeemcode.CodeValidator = func() func(string) error {
  1745. validators := redeemcodeDescCode.Validators
  1746. fns := [...]func(string) error{
  1747. validators[0].(func(string) error),
  1748. validators[1].(func(string) error),
  1749. }
  1750. return func(code string) error {
  1751. for _, fn := range fns {
  1752. if err := fn(code); err != nil {
  1753. return err
  1754. }
  1755. }
  1756. return nil
  1757. }
  1758. }()
  1759. // redeemcodeDescType is the schema descriptor for type field.
  1760. redeemcodeDescType := redeemcodeFields[1].Descriptor()
  1761. // redeemcode.DefaultType holds the default value on creation for the type field.
  1762. redeemcode.DefaultType = redeemcodeDescType.Default.(string)
  1763. // redeemcode.TypeValidator is a validator for the "type" field. It is called by the builders before save.
  1764. redeemcode.TypeValidator = redeemcodeDescType.Validators[0].(func(string) error)
  1765. // redeemcodeDescValue is the schema descriptor for value field.
  1766. redeemcodeDescValue := redeemcodeFields[2].Descriptor()
  1767. // redeemcode.DefaultValue holds the default value on creation for the value field.
  1768. redeemcode.DefaultValue = redeemcodeDescValue.Default.(float64)
  1769. // redeemcodeDescStatus is the schema descriptor for status field.
  1770. redeemcodeDescStatus := redeemcodeFields[3].Descriptor()
  1771. // redeemcode.DefaultStatus holds the default value on creation for the status field.
  1772. redeemcode.DefaultStatus = redeemcodeDescStatus.Default.(string)
  1773. // redeemcode.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  1774. redeemcode.StatusValidator = redeemcodeDescStatus.Validators[0].(func(string) error)
  1775. // redeemcodeDescCreatedAt is the schema descriptor for created_at field.
  1776. redeemcodeDescCreatedAt := redeemcodeFields[7].Descriptor()
  1777. // redeemcode.DefaultCreatedAt holds the default value on creation for the created_at field.
  1778. redeemcode.DefaultCreatedAt = redeemcodeDescCreatedAt.Default.(func() time.Time)
  1779. // redeemcodeDescValidityDays is the schema descriptor for validity_days field.
  1780. redeemcodeDescValidityDays := redeemcodeFields[10].Descriptor()
  1781. // redeemcode.DefaultValidityDays holds the default value on creation for the validity_days field.
  1782. redeemcode.DefaultValidityDays = redeemcodeDescValidityDays.Default.(int)
  1783. securitypolicykeywordMixin := schema.SecurityPolicyKeyword{}.Mixin()
  1784. securitypolicykeywordMixinHooks1 := securitypolicykeywordMixin[1].Hooks()
  1785. securitypolicykeyword.Hooks[0] = securitypolicykeywordMixinHooks1[0]
  1786. securitypolicykeywordMixinInters1 := securitypolicykeywordMixin[1].Interceptors()
  1787. securitypolicykeyword.Interceptors[0] = securitypolicykeywordMixinInters1[0]
  1788. securitypolicykeywordMixinFields0 := securitypolicykeywordMixin[0].Fields()
  1789. _ = securitypolicykeywordMixinFields0
  1790. securitypolicykeywordFields := schema.SecurityPolicyKeyword{}.Fields()
  1791. _ = securitypolicykeywordFields
  1792. // securitypolicykeywordDescCreatedAt is the schema descriptor for created_at field.
  1793. securitypolicykeywordDescCreatedAt := securitypolicykeywordMixinFields0[0].Descriptor()
  1794. // securitypolicykeyword.DefaultCreatedAt holds the default value on creation for the created_at field.
  1795. securitypolicykeyword.DefaultCreatedAt = securitypolicykeywordDescCreatedAt.Default.(func() time.Time)
  1796. // securitypolicykeywordDescUpdatedAt is the schema descriptor for updated_at field.
  1797. securitypolicykeywordDescUpdatedAt := securitypolicykeywordMixinFields0[1].Descriptor()
  1798. // securitypolicykeyword.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1799. securitypolicykeyword.DefaultUpdatedAt = securitypolicykeywordDescUpdatedAt.Default.(func() time.Time)
  1800. // securitypolicykeyword.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1801. securitypolicykeyword.UpdateDefaultUpdatedAt = securitypolicykeywordDescUpdatedAt.UpdateDefault.(func() time.Time)
  1802. // securitypolicykeywordDescKeyword is the schema descriptor for keyword field.
  1803. securitypolicykeywordDescKeyword := securitypolicykeywordFields[1].Descriptor()
  1804. // securitypolicykeyword.KeywordValidator is a validator for the "keyword" field. It is called by the builders before save.
  1805. securitypolicykeyword.KeywordValidator = func() func(string) error {
  1806. validators := securitypolicykeywordDescKeyword.Validators
  1807. fns := [...]func(string) error{
  1808. validators[0].(func(string) error),
  1809. validators[1].(func(string) error),
  1810. }
  1811. return func(keyword string) error {
  1812. for _, fn := range fns {
  1813. if err := fn(keyword); err != nil {
  1814. return err
  1815. }
  1816. }
  1817. return nil
  1818. }
  1819. }()
  1820. // securitypolicykeywordDescCategory is the schema descriptor for category field.
  1821. securitypolicykeywordDescCategory := securitypolicykeywordFields[2].Descriptor()
  1822. // securitypolicykeyword.DefaultCategory holds the default value on creation for the category field.
  1823. securitypolicykeyword.DefaultCategory = securitypolicykeywordDescCategory.Default.(string)
  1824. // securitypolicykeyword.CategoryValidator is a validator for the "category" field. It is called by the builders before save.
  1825. securitypolicykeyword.CategoryValidator = securitypolicykeywordDescCategory.Validators[0].(func(string) error)
  1826. // securitypolicykeywordDescEnabled is the schema descriptor for enabled field.
  1827. securitypolicykeywordDescEnabled := securitypolicykeywordFields[3].Descriptor()
  1828. // securitypolicykeyword.DefaultEnabled holds the default value on creation for the enabled field.
  1829. securitypolicykeyword.DefaultEnabled = securitypolicykeywordDescEnabled.Default.(bool)
  1830. securitysecretMixin := schema.SecuritySecret{}.Mixin()
  1831. securitysecretMixinFields0 := securitysecretMixin[0].Fields()
  1832. _ = securitysecretMixinFields0
  1833. securitysecretFields := schema.SecuritySecret{}.Fields()
  1834. _ = securitysecretFields
  1835. // securitysecretDescCreatedAt is the schema descriptor for created_at field.
  1836. securitysecretDescCreatedAt := securitysecretMixinFields0[0].Descriptor()
  1837. // securitysecret.DefaultCreatedAt holds the default value on creation for the created_at field.
  1838. securitysecret.DefaultCreatedAt = securitysecretDescCreatedAt.Default.(func() time.Time)
  1839. // securitysecretDescUpdatedAt is the schema descriptor for updated_at field.
  1840. securitysecretDescUpdatedAt := securitysecretMixinFields0[1].Descriptor()
  1841. // securitysecret.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1842. securitysecret.DefaultUpdatedAt = securitysecretDescUpdatedAt.Default.(func() time.Time)
  1843. // securitysecret.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1844. securitysecret.UpdateDefaultUpdatedAt = securitysecretDescUpdatedAt.UpdateDefault.(func() time.Time)
  1845. // securitysecretDescKey is the schema descriptor for key field.
  1846. securitysecretDescKey := securitysecretFields[0].Descriptor()
  1847. // securitysecret.KeyValidator is a validator for the "key" field. It is called by the builders before save.
  1848. securitysecret.KeyValidator = func() func(string) error {
  1849. validators := securitysecretDescKey.Validators
  1850. fns := [...]func(string) error{
  1851. validators[0].(func(string) error),
  1852. validators[1].(func(string) error),
  1853. }
  1854. return func(key string) error {
  1855. for _, fn := range fns {
  1856. if err := fn(key); err != nil {
  1857. return err
  1858. }
  1859. }
  1860. return nil
  1861. }
  1862. }()
  1863. // securitysecretDescValue is the schema descriptor for value field.
  1864. securitysecretDescValue := securitysecretFields[1].Descriptor()
  1865. // securitysecret.ValueValidator is a validator for the "value" field. It is called by the builders before save.
  1866. securitysecret.ValueValidator = securitysecretDescValue.Validators[0].(func(string) error)
  1867. settingFields := schema.Setting{}.Fields()
  1868. _ = settingFields
  1869. // settingDescKey is the schema descriptor for key field.
  1870. settingDescKey := settingFields[0].Descriptor()
  1871. // setting.KeyValidator is a validator for the "key" field. It is called by the builders before save.
  1872. setting.KeyValidator = func() func(string) error {
  1873. validators := settingDescKey.Validators
  1874. fns := [...]func(string) error{
  1875. validators[0].(func(string) error),
  1876. validators[1].(func(string) error),
  1877. }
  1878. return func(key string) error {
  1879. for _, fn := range fns {
  1880. if err := fn(key); err != nil {
  1881. return err
  1882. }
  1883. }
  1884. return nil
  1885. }
  1886. }()
  1887. // settingDescUpdatedAt is the schema descriptor for updated_at field.
  1888. settingDescUpdatedAt := settingFields[2].Descriptor()
  1889. // setting.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1890. setting.DefaultUpdatedAt = settingDescUpdatedAt.Default.(func() time.Time)
  1891. // setting.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1892. setting.UpdateDefaultUpdatedAt = settingDescUpdatedAt.UpdateDefault.(func() time.Time)
  1893. subscriptionplanFields := schema.SubscriptionPlan{}.Fields()
  1894. _ = subscriptionplanFields
  1895. // subscriptionplanDescName is the schema descriptor for name field.
  1896. subscriptionplanDescName := subscriptionplanFields[1].Descriptor()
  1897. // subscriptionplan.NameValidator is a validator for the "name" field. It is called by the builders before save.
  1898. subscriptionplan.NameValidator = func() func(string) error {
  1899. validators := subscriptionplanDescName.Validators
  1900. fns := [...]func(string) error{
  1901. validators[0].(func(string) error),
  1902. validators[1].(func(string) error),
  1903. }
  1904. return func(name string) error {
  1905. for _, fn := range fns {
  1906. if err := fn(name); err != nil {
  1907. return err
  1908. }
  1909. }
  1910. return nil
  1911. }
  1912. }()
  1913. // subscriptionplanDescDescription is the schema descriptor for description field.
  1914. subscriptionplanDescDescription := subscriptionplanFields[2].Descriptor()
  1915. // subscriptionplan.DefaultDescription holds the default value on creation for the description field.
  1916. subscriptionplan.DefaultDescription = subscriptionplanDescDescription.Default.(string)
  1917. // subscriptionplanDescCurrency is the schema descriptor for currency field.
  1918. subscriptionplanDescCurrency := subscriptionplanFields[5].Descriptor()
  1919. // subscriptionplan.DefaultCurrency holds the default value on creation for the currency field.
  1920. subscriptionplan.DefaultCurrency = subscriptionplanDescCurrency.Default.(string)
  1921. // subscriptionplan.CurrencyValidator is a validator for the "currency" field. It is called by the builders before save.
  1922. subscriptionplan.CurrencyValidator = subscriptionplanDescCurrency.Validators[0].(func(string) error)
  1923. // subscriptionplanDescValidityDays is the schema descriptor for validity_days field.
  1924. subscriptionplanDescValidityDays := subscriptionplanFields[6].Descriptor()
  1925. // subscriptionplan.DefaultValidityDays holds the default value on creation for the validity_days field.
  1926. subscriptionplan.DefaultValidityDays = subscriptionplanDescValidityDays.Default.(int)
  1927. // subscriptionplanDescValidityUnit is the schema descriptor for validity_unit field.
  1928. subscriptionplanDescValidityUnit := subscriptionplanFields[7].Descriptor()
  1929. // subscriptionplan.DefaultValidityUnit holds the default value on creation for the validity_unit field.
  1930. subscriptionplan.DefaultValidityUnit = subscriptionplanDescValidityUnit.Default.(string)
  1931. // subscriptionplan.ValidityUnitValidator is a validator for the "validity_unit" field. It is called by the builders before save.
  1932. subscriptionplan.ValidityUnitValidator = subscriptionplanDescValidityUnit.Validators[0].(func(string) error)
  1933. // subscriptionplanDescFeatures is the schema descriptor for features field.
  1934. subscriptionplanDescFeatures := subscriptionplanFields[8].Descriptor()
  1935. // subscriptionplan.DefaultFeatures holds the default value on creation for the features field.
  1936. subscriptionplan.DefaultFeatures = subscriptionplanDescFeatures.Default.(string)
  1937. // subscriptionplanDescProductName is the schema descriptor for product_name field.
  1938. subscriptionplanDescProductName := subscriptionplanFields[9].Descriptor()
  1939. // subscriptionplan.DefaultProductName holds the default value on creation for the product_name field.
  1940. subscriptionplan.DefaultProductName = subscriptionplanDescProductName.Default.(string)
  1941. // subscriptionplan.ProductNameValidator is a validator for the "product_name" field. It is called by the builders before save.
  1942. subscriptionplan.ProductNameValidator = subscriptionplanDescProductName.Validators[0].(func(string) error)
  1943. // subscriptionplanDescForSale is the schema descriptor for for_sale field.
  1944. subscriptionplanDescForSale := subscriptionplanFields[10].Descriptor()
  1945. // subscriptionplan.DefaultForSale holds the default value on creation for the for_sale field.
  1946. subscriptionplan.DefaultForSale = subscriptionplanDescForSale.Default.(bool)
  1947. // subscriptionplanDescSortOrder is the schema descriptor for sort_order field.
  1948. subscriptionplanDescSortOrder := subscriptionplanFields[11].Descriptor()
  1949. // subscriptionplan.DefaultSortOrder holds the default value on creation for the sort_order field.
  1950. subscriptionplan.DefaultSortOrder = subscriptionplanDescSortOrder.Default.(int)
  1951. // subscriptionplanDescCreatedAt is the schema descriptor for created_at field.
  1952. subscriptionplanDescCreatedAt := subscriptionplanFields[12].Descriptor()
  1953. // subscriptionplan.DefaultCreatedAt holds the default value on creation for the created_at field.
  1954. subscriptionplan.DefaultCreatedAt = subscriptionplanDescCreatedAt.Default.(func() time.Time)
  1955. // subscriptionplanDescUpdatedAt is the schema descriptor for updated_at field.
  1956. subscriptionplanDescUpdatedAt := subscriptionplanFields[13].Descriptor()
  1957. // subscriptionplan.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1958. subscriptionplan.DefaultUpdatedAt = subscriptionplanDescUpdatedAt.Default.(func() time.Time)
  1959. // subscriptionplan.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1960. subscriptionplan.UpdateDefaultUpdatedAt = subscriptionplanDescUpdatedAt.UpdateDefault.(func() time.Time)
  1961. tlsfingerprintprofileMixin := schema.TLSFingerprintProfile{}.Mixin()
  1962. tlsfingerprintprofileMixinFields0 := tlsfingerprintprofileMixin[0].Fields()
  1963. _ = tlsfingerprintprofileMixinFields0
  1964. tlsfingerprintprofileFields := schema.TLSFingerprintProfile{}.Fields()
  1965. _ = tlsfingerprintprofileFields
  1966. // tlsfingerprintprofileDescCreatedAt is the schema descriptor for created_at field.
  1967. tlsfingerprintprofileDescCreatedAt := tlsfingerprintprofileMixinFields0[0].Descriptor()
  1968. // tlsfingerprintprofile.DefaultCreatedAt holds the default value on creation for the created_at field.
  1969. tlsfingerprintprofile.DefaultCreatedAt = tlsfingerprintprofileDescCreatedAt.Default.(func() time.Time)
  1970. // tlsfingerprintprofileDescUpdatedAt is the schema descriptor for updated_at field.
  1971. tlsfingerprintprofileDescUpdatedAt := tlsfingerprintprofileMixinFields0[1].Descriptor()
  1972. // tlsfingerprintprofile.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  1973. tlsfingerprintprofile.DefaultUpdatedAt = tlsfingerprintprofileDescUpdatedAt.Default.(func() time.Time)
  1974. // tlsfingerprintprofile.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  1975. tlsfingerprintprofile.UpdateDefaultUpdatedAt = tlsfingerprintprofileDescUpdatedAt.UpdateDefault.(func() time.Time)
  1976. // tlsfingerprintprofileDescName is the schema descriptor for name field.
  1977. tlsfingerprintprofileDescName := tlsfingerprintprofileFields[0].Descriptor()
  1978. // tlsfingerprintprofile.NameValidator is a validator for the "name" field. It is called by the builders before save.
  1979. tlsfingerprintprofile.NameValidator = func() func(string) error {
  1980. validators := tlsfingerprintprofileDescName.Validators
  1981. fns := [...]func(string) error{
  1982. validators[0].(func(string) error),
  1983. validators[1].(func(string) error),
  1984. }
  1985. return func(name string) error {
  1986. for _, fn := range fns {
  1987. if err := fn(name); err != nil {
  1988. return err
  1989. }
  1990. }
  1991. return nil
  1992. }
  1993. }()
  1994. // tlsfingerprintprofileDescEnableGrease is the schema descriptor for enable_grease field.
  1995. tlsfingerprintprofileDescEnableGrease := tlsfingerprintprofileFields[2].Descriptor()
  1996. // tlsfingerprintprofile.DefaultEnableGrease holds the default value on creation for the enable_grease field.
  1997. tlsfingerprintprofile.DefaultEnableGrease = tlsfingerprintprofileDescEnableGrease.Default.(bool)
  1998. usagecleanuptaskMixin := schema.UsageCleanupTask{}.Mixin()
  1999. usagecleanuptaskMixinFields0 := usagecleanuptaskMixin[0].Fields()
  2000. _ = usagecleanuptaskMixinFields0
  2001. usagecleanuptaskFields := schema.UsageCleanupTask{}.Fields()
  2002. _ = usagecleanuptaskFields
  2003. // usagecleanuptaskDescCreatedAt is the schema descriptor for created_at field.
  2004. usagecleanuptaskDescCreatedAt := usagecleanuptaskMixinFields0[0].Descriptor()
  2005. // usagecleanuptask.DefaultCreatedAt holds the default value on creation for the created_at field.
  2006. usagecleanuptask.DefaultCreatedAt = usagecleanuptaskDescCreatedAt.Default.(func() time.Time)
  2007. // usagecleanuptaskDescUpdatedAt is the schema descriptor for updated_at field.
  2008. usagecleanuptaskDescUpdatedAt := usagecleanuptaskMixinFields0[1].Descriptor()
  2009. // usagecleanuptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  2010. usagecleanuptask.DefaultUpdatedAt = usagecleanuptaskDescUpdatedAt.Default.(func() time.Time)
  2011. // usagecleanuptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  2012. usagecleanuptask.UpdateDefaultUpdatedAt = usagecleanuptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
  2013. // usagecleanuptaskDescStatus is the schema descriptor for status field.
  2014. usagecleanuptaskDescStatus := usagecleanuptaskFields[0].Descriptor()
  2015. // usagecleanuptask.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  2016. usagecleanuptask.StatusValidator = func() func(string) error {
  2017. validators := usagecleanuptaskDescStatus.Validators
  2018. fns := [...]func(string) error{
  2019. validators[0].(func(string) error),
  2020. validators[1].(func(string) error),
  2021. }
  2022. return func(status string) error {
  2023. for _, fn := range fns {
  2024. if err := fn(status); err != nil {
  2025. return err
  2026. }
  2027. }
  2028. return nil
  2029. }
  2030. }()
  2031. // usagecleanuptaskDescDeletedRows is the schema descriptor for deleted_rows field.
  2032. usagecleanuptaskDescDeletedRows := usagecleanuptaskFields[3].Descriptor()
  2033. // usagecleanuptask.DefaultDeletedRows holds the default value on creation for the deleted_rows field.
  2034. usagecleanuptask.DefaultDeletedRows = usagecleanuptaskDescDeletedRows.Default.(int64)
  2035. usagelogFields := schema.UsageLog{}.Fields()
  2036. _ = usagelogFields
  2037. // usagelogDescRequestID is the schema descriptor for request_id field.
  2038. usagelogDescRequestID := usagelogFields[3].Descriptor()
  2039. // usagelog.RequestIDValidator is a validator for the "request_id" field. It is called by the builders before save.
  2040. usagelog.RequestIDValidator = func() func(string) error {
  2041. validators := usagelogDescRequestID.Validators
  2042. fns := [...]func(string) error{
  2043. validators[0].(func(string) error),
  2044. validators[1].(func(string) error),
  2045. }
  2046. return func(request_id string) error {
  2047. for _, fn := range fns {
  2048. if err := fn(request_id); err != nil {
  2049. return err
  2050. }
  2051. }
  2052. return nil
  2053. }
  2054. }()
  2055. // usagelogDescModel is the schema descriptor for model field.
  2056. usagelogDescModel := usagelogFields[4].Descriptor()
  2057. // usagelog.ModelValidator is a validator for the "model" field. It is called by the builders before save.
  2058. usagelog.ModelValidator = func() func(string) error {
  2059. validators := usagelogDescModel.Validators
  2060. fns := [...]func(string) error{
  2061. validators[0].(func(string) error),
  2062. validators[1].(func(string) error),
  2063. }
  2064. return func(model string) error {
  2065. for _, fn := range fns {
  2066. if err := fn(model); err != nil {
  2067. return err
  2068. }
  2069. }
  2070. return nil
  2071. }
  2072. }()
  2073. // usagelogDescRequestedModel is the schema descriptor for requested_model field.
  2074. usagelogDescRequestedModel := usagelogFields[5].Descriptor()
  2075. // usagelog.RequestedModelValidator is a validator for the "requested_model" field. It is called by the builders before save.
  2076. usagelog.RequestedModelValidator = usagelogDescRequestedModel.Validators[0].(func(string) error)
  2077. // usagelogDescUpstreamModel is the schema descriptor for upstream_model field.
  2078. usagelogDescUpstreamModel := usagelogFields[6].Descriptor()
  2079. // usagelog.UpstreamModelValidator is a validator for the "upstream_model" field. It is called by the builders before save.
  2080. usagelog.UpstreamModelValidator = usagelogDescUpstreamModel.Validators[0].(func(string) error)
  2081. // usagelogDescUpstreamResponseModel is the schema descriptor for upstream_response_model field.
  2082. usagelogDescUpstreamResponseModel := usagelogFields[7].Descriptor()
  2083. // usagelog.UpstreamResponseModelValidator is a validator for the "upstream_response_model" field. It is called by the builders before save.
  2084. usagelog.UpstreamResponseModelValidator = usagelogDescUpstreamResponseModel.Validators[0].(func(string) error)
  2085. // usagelogDescModelMappingChain is the schema descriptor for model_mapping_chain field.
  2086. usagelogDescModelMappingChain := usagelogFields[10].Descriptor()
  2087. // usagelog.ModelMappingChainValidator is a validator for the "model_mapping_chain" field. It is called by the builders before save.
  2088. usagelog.ModelMappingChainValidator = usagelogDescModelMappingChain.Validators[0].(func(string) error)
  2089. // usagelogDescBillingTier is the schema descriptor for billing_tier field.
  2090. usagelogDescBillingTier := usagelogFields[11].Descriptor()
  2091. // usagelog.BillingTierValidator is a validator for the "billing_tier" field. It is called by the builders before save.
  2092. usagelog.BillingTierValidator = usagelogDescBillingTier.Validators[0].(func(string) error)
  2093. // usagelogDescBillingMode is the schema descriptor for billing_mode field.
  2094. usagelogDescBillingMode := usagelogFields[12].Descriptor()
  2095. // usagelog.BillingModeValidator is a validator for the "billing_mode" field. It is called by the builders before save.
  2096. usagelog.BillingModeValidator = usagelogDescBillingMode.Validators[0].(func(string) error)
  2097. // usagelogDescInputTokens is the schema descriptor for input_tokens field.
  2098. usagelogDescInputTokens := usagelogFields[15].Descriptor()
  2099. // usagelog.DefaultInputTokens holds the default value on creation for the input_tokens field.
  2100. usagelog.DefaultInputTokens = usagelogDescInputTokens.Default.(int)
  2101. // usagelogDescOutputTokens is the schema descriptor for output_tokens field.
  2102. usagelogDescOutputTokens := usagelogFields[16].Descriptor()
  2103. // usagelog.DefaultOutputTokens holds the default value on creation for the output_tokens field.
  2104. usagelog.DefaultOutputTokens = usagelogDescOutputTokens.Default.(int)
  2105. // usagelogDescCacheCreationTokens is the schema descriptor for cache_creation_tokens field.
  2106. usagelogDescCacheCreationTokens := usagelogFields[17].Descriptor()
  2107. // usagelog.DefaultCacheCreationTokens holds the default value on creation for the cache_creation_tokens field.
  2108. usagelog.DefaultCacheCreationTokens = usagelogDescCacheCreationTokens.Default.(int)
  2109. // usagelogDescCacheReadTokens is the schema descriptor for cache_read_tokens field.
  2110. usagelogDescCacheReadTokens := usagelogFields[18].Descriptor()
  2111. // usagelog.DefaultCacheReadTokens holds the default value on creation for the cache_read_tokens field.
  2112. usagelog.DefaultCacheReadTokens = usagelogDescCacheReadTokens.Default.(int)
  2113. // usagelogDescCacheCreation5mTokens is the schema descriptor for cache_creation_5m_tokens field.
  2114. usagelogDescCacheCreation5mTokens := usagelogFields[19].Descriptor()
  2115. // usagelog.DefaultCacheCreation5mTokens holds the default value on creation for the cache_creation_5m_tokens field.
  2116. usagelog.DefaultCacheCreation5mTokens = usagelogDescCacheCreation5mTokens.Default.(int)
  2117. // usagelogDescCacheCreation1hTokens is the schema descriptor for cache_creation_1h_tokens field.
  2118. usagelogDescCacheCreation1hTokens := usagelogFields[20].Descriptor()
  2119. // usagelog.DefaultCacheCreation1hTokens holds the default value on creation for the cache_creation_1h_tokens field.
  2120. usagelog.DefaultCacheCreation1hTokens = usagelogDescCacheCreation1hTokens.Default.(int)
  2121. // usagelogDescInputCost is the schema descriptor for input_cost field.
  2122. usagelogDescInputCost := usagelogFields[21].Descriptor()
  2123. // usagelog.DefaultInputCost holds the default value on creation for the input_cost field.
  2124. usagelog.DefaultInputCost = usagelogDescInputCost.Default.(float64)
  2125. // usagelogDescOutputCost is the schema descriptor for output_cost field.
  2126. usagelogDescOutputCost := usagelogFields[22].Descriptor()
  2127. // usagelog.DefaultOutputCost holds the default value on creation for the output_cost field.
  2128. usagelog.DefaultOutputCost = usagelogDescOutputCost.Default.(float64)
  2129. // usagelogDescCacheCreationCost is the schema descriptor for cache_creation_cost field.
  2130. usagelogDescCacheCreationCost := usagelogFields[23].Descriptor()
  2131. // usagelog.DefaultCacheCreationCost holds the default value on creation for the cache_creation_cost field.
  2132. usagelog.DefaultCacheCreationCost = usagelogDescCacheCreationCost.Default.(float64)
  2133. // usagelogDescCacheReadCost is the schema descriptor for cache_read_cost field.
  2134. usagelogDescCacheReadCost := usagelogFields[24].Descriptor()
  2135. // usagelog.DefaultCacheReadCost holds the default value on creation for the cache_read_cost field.
  2136. usagelog.DefaultCacheReadCost = usagelogDescCacheReadCost.Default.(float64)
  2137. // usagelogDescTotalCost is the schema descriptor for total_cost field.
  2138. usagelogDescTotalCost := usagelogFields[25].Descriptor()
  2139. // usagelog.DefaultTotalCost holds the default value on creation for the total_cost field.
  2140. usagelog.DefaultTotalCost = usagelogDescTotalCost.Default.(float64)
  2141. // usagelogDescActualCost is the schema descriptor for actual_cost field.
  2142. usagelogDescActualCost := usagelogFields[26].Descriptor()
  2143. // usagelog.DefaultActualCost holds the default value on creation for the actual_cost field.
  2144. usagelog.DefaultActualCost = usagelogDescActualCost.Default.(float64)
  2145. // usagelogDescRateMultiplier is the schema descriptor for rate_multiplier field.
  2146. usagelogDescRateMultiplier := usagelogFields[27].Descriptor()
  2147. // usagelog.DefaultRateMultiplier holds the default value on creation for the rate_multiplier field.
  2148. usagelog.DefaultRateMultiplier = usagelogDescRateMultiplier.Default.(float64)
  2149. // usagelogDescLongContextBillingApplied is the schema descriptor for long_context_billing_applied field.
  2150. usagelogDescLongContextBillingApplied := usagelogFields[28].Descriptor()
  2151. // usagelog.DefaultLongContextBillingApplied holds the default value on creation for the long_context_billing_applied field.
  2152. usagelog.DefaultLongContextBillingApplied = usagelogDescLongContextBillingApplied.Default.(bool)
  2153. // usagelogDescBillingType is the schema descriptor for billing_type field.
  2154. usagelogDescBillingType := usagelogFields[30].Descriptor()
  2155. // usagelog.DefaultBillingType holds the default value on creation for the billing_type field.
  2156. usagelog.DefaultBillingType = usagelogDescBillingType.Default.(int8)
  2157. // usagelogDescStream is the schema descriptor for stream field.
  2158. usagelogDescStream := usagelogFields[31].Descriptor()
  2159. // usagelog.DefaultStream holds the default value on creation for the stream field.
  2160. usagelog.DefaultStream = usagelogDescStream.Default.(bool)
  2161. // usagelogDescUserAgent is the schema descriptor for user_agent field.
  2162. usagelogDescUserAgent := usagelogFields[34].Descriptor()
  2163. // usagelog.UserAgentValidator is a validator for the "user_agent" field. It is called by the builders before save.
  2164. usagelog.UserAgentValidator = usagelogDescUserAgent.Validators[0].(func(string) error)
  2165. // usagelogDescIPAddress is the schema descriptor for ip_address field.
  2166. usagelogDescIPAddress := usagelogFields[35].Descriptor()
  2167. // usagelog.IPAddressValidator is a validator for the "ip_address" field. It is called by the builders before save.
  2168. usagelog.IPAddressValidator = usagelogDescIPAddress.Validators[0].(func(string) error)
  2169. // usagelogDescImageCount is the schema descriptor for image_count field.
  2170. usagelogDescImageCount := usagelogFields[36].Descriptor()
  2171. // usagelog.DefaultImageCount holds the default value on creation for the image_count field.
  2172. usagelog.DefaultImageCount = usagelogDescImageCount.Default.(int)
  2173. // usagelogDescImageSize is the schema descriptor for image_size field.
  2174. usagelogDescImageSize := usagelogFields[37].Descriptor()
  2175. // usagelog.ImageSizeValidator is a validator for the "image_size" field. It is called by the builders before save.
  2176. usagelog.ImageSizeValidator = usagelogDescImageSize.Validators[0].(func(string) error)
  2177. // usagelogDescImageInputSize is the schema descriptor for image_input_size field.
  2178. usagelogDescImageInputSize := usagelogFields[38].Descriptor()
  2179. // usagelog.ImageInputSizeValidator is a validator for the "image_input_size" field. It is called by the builders before save.
  2180. usagelog.ImageInputSizeValidator = usagelogDescImageInputSize.Validators[0].(func(string) error)
  2181. // usagelogDescImageOutputSize is the schema descriptor for image_output_size field.
  2182. usagelogDescImageOutputSize := usagelogFields[39].Descriptor()
  2183. // usagelog.ImageOutputSizeValidator is a validator for the "image_output_size" field. It is called by the builders before save.
  2184. usagelog.ImageOutputSizeValidator = usagelogDescImageOutputSize.Validators[0].(func(string) error)
  2185. // usagelogDescImageSizeSource is the schema descriptor for image_size_source field.
  2186. usagelogDescImageSizeSource := usagelogFields[40].Descriptor()
  2187. // usagelog.ImageSizeSourceValidator is a validator for the "image_size_source" field. It is called by the builders before save.
  2188. usagelog.ImageSizeSourceValidator = usagelogDescImageSizeSource.Validators[0].(func(string) error)
  2189. // usagelogDescVideoCount is the schema descriptor for video_count field.
  2190. usagelogDescVideoCount := usagelogFields[42].Descriptor()
  2191. // usagelog.DefaultVideoCount holds the default value on creation for the video_count field.
  2192. usagelog.DefaultVideoCount = usagelogDescVideoCount.Default.(int)
  2193. // usagelogDescVideoResolution is the schema descriptor for video_resolution field.
  2194. usagelogDescVideoResolution := usagelogFields[43].Descriptor()
  2195. // usagelog.VideoResolutionValidator is a validator for the "video_resolution" field. It is called by the builders before save.
  2196. usagelog.VideoResolutionValidator = usagelogDescVideoResolution.Validators[0].(func(string) error)
  2197. // usagelogDescCacheTTLOverridden is the schema descriptor for cache_ttl_overridden field.
  2198. usagelogDescCacheTTLOverridden := usagelogFields[45].Descriptor()
  2199. // usagelog.DefaultCacheTTLOverridden holds the default value on creation for the cache_ttl_overridden field.
  2200. usagelog.DefaultCacheTTLOverridden = usagelogDescCacheTTLOverridden.Default.(bool)
  2201. // usagelogDescCreatedAt is the schema descriptor for created_at field.
  2202. usagelogDescCreatedAt := usagelogFields[46].Descriptor()
  2203. // usagelog.DefaultCreatedAt holds the default value on creation for the created_at field.
  2204. usagelog.DefaultCreatedAt = usagelogDescCreatedAt.Default.(func() time.Time)
  2205. userMixin := schema.User{}.Mixin()
  2206. userMixinHooks1 := userMixin[1].Hooks()
  2207. user.Hooks[0] = userMixinHooks1[0]
  2208. userMixinInters1 := userMixin[1].Interceptors()
  2209. user.Interceptors[0] = userMixinInters1[0]
  2210. userMixinFields0 := userMixin[0].Fields()
  2211. _ = userMixinFields0
  2212. userFields := schema.User{}.Fields()
  2213. _ = userFields
  2214. // userDescCreatedAt is the schema descriptor for created_at field.
  2215. userDescCreatedAt := userMixinFields0[0].Descriptor()
  2216. // user.DefaultCreatedAt holds the default value on creation for the created_at field.
  2217. user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
  2218. // userDescUpdatedAt is the schema descriptor for updated_at field.
  2219. userDescUpdatedAt := userMixinFields0[1].Descriptor()
  2220. // user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  2221. user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
  2222. // user.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  2223. user.UpdateDefaultUpdatedAt = userDescUpdatedAt.UpdateDefault.(func() time.Time)
  2224. // userDescEmail is the schema descriptor for email field.
  2225. userDescEmail := userFields[0].Descriptor()
  2226. // user.EmailValidator is a validator for the "email" field. It is called by the builders before save.
  2227. user.EmailValidator = func() func(string) error {
  2228. validators := userDescEmail.Validators
  2229. fns := [...]func(string) error{
  2230. validators[0].(func(string) error),
  2231. validators[1].(func(string) error),
  2232. }
  2233. return func(email string) error {
  2234. for _, fn := range fns {
  2235. if err := fn(email); err != nil {
  2236. return err
  2237. }
  2238. }
  2239. return nil
  2240. }
  2241. }()
  2242. // userDescPasswordHash is the schema descriptor for password_hash field.
  2243. userDescPasswordHash := userFields[1].Descriptor()
  2244. // user.PasswordHashValidator is a validator for the "password_hash" field. It is called by the builders before save.
  2245. user.PasswordHashValidator = func() func(string) error {
  2246. validators := userDescPasswordHash.Validators
  2247. fns := [...]func(string) error{
  2248. validators[0].(func(string) error),
  2249. validators[1].(func(string) error),
  2250. }
  2251. return func(password_hash string) error {
  2252. for _, fn := range fns {
  2253. if err := fn(password_hash); err != nil {
  2254. return err
  2255. }
  2256. }
  2257. return nil
  2258. }
  2259. }()
  2260. // userDescRole is the schema descriptor for role field.
  2261. userDescRole := userFields[2].Descriptor()
  2262. // user.DefaultRole holds the default value on creation for the role field.
  2263. user.DefaultRole = userDescRole.Default.(string)
  2264. // user.RoleValidator is a validator for the "role" field. It is called by the builders before save.
  2265. user.RoleValidator = userDescRole.Validators[0].(func(string) error)
  2266. // userDescBalance is the schema descriptor for balance field.
  2267. userDescBalance := userFields[3].Descriptor()
  2268. // user.DefaultBalance holds the default value on creation for the balance field.
  2269. user.DefaultBalance = userDescBalance.Default.(float64)
  2270. // userDescFrozenBalance is the schema descriptor for frozen_balance field.
  2271. userDescFrozenBalance := userFields[4].Descriptor()
  2272. // user.DefaultFrozenBalance holds the default value on creation for the frozen_balance field.
  2273. user.DefaultFrozenBalance = userDescFrozenBalance.Default.(float64)
  2274. // userDescConcurrency is the schema descriptor for concurrency field.
  2275. userDescConcurrency := userFields[5].Descriptor()
  2276. // user.DefaultConcurrency holds the default value on creation for the concurrency field.
  2277. user.DefaultConcurrency = userDescConcurrency.Default.(int)
  2278. // userDescStatus is the schema descriptor for status field.
  2279. userDescStatus := userFields[6].Descriptor()
  2280. // user.DefaultStatus holds the default value on creation for the status field.
  2281. user.DefaultStatus = userDescStatus.Default.(string)
  2282. // user.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  2283. user.StatusValidator = userDescStatus.Validators[0].(func(string) error)
  2284. // userDescUsername is the schema descriptor for username field.
  2285. userDescUsername := userFields[7].Descriptor()
  2286. // user.DefaultUsername holds the default value on creation for the username field.
  2287. user.DefaultUsername = userDescUsername.Default.(string)
  2288. // user.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
  2289. user.UsernameValidator = userDescUsername.Validators[0].(func(string) error)
  2290. // userDescNotes is the schema descriptor for notes field.
  2291. userDescNotes := userFields[8].Descriptor()
  2292. // user.DefaultNotes holds the default value on creation for the notes field.
  2293. user.DefaultNotes = userDescNotes.Default.(string)
  2294. // userDescTotpEnabled is the schema descriptor for totp_enabled field.
  2295. userDescTotpEnabled := userFields[10].Descriptor()
  2296. // user.DefaultTotpEnabled holds the default value on creation for the totp_enabled field.
  2297. user.DefaultTotpEnabled = userDescTotpEnabled.Default.(bool)
  2298. // userDescSignupSource is the schema descriptor for signup_source field.
  2299. userDescSignupSource := userFields[12].Descriptor()
  2300. // user.DefaultSignupSource holds the default value on creation for the signup_source field.
  2301. user.DefaultSignupSource = userDescSignupSource.Default.(string)
  2302. // user.SignupSourceValidator is a validator for the "signup_source" field. It is called by the builders before save.
  2303. user.SignupSourceValidator = userDescSignupSource.Validators[0].(func(string) error)
  2304. // userDescRestrictPublicGroups is the schema descriptor for restrict_public_groups field.
  2305. userDescRestrictPublicGroups := userFields[15].Descriptor()
  2306. // user.DefaultRestrictPublicGroups holds the default value on creation for the restrict_public_groups field.
  2307. user.DefaultRestrictPublicGroups = userDescRestrictPublicGroups.Default.(bool)
  2308. // userDescBalanceNotifyEnabled is the schema descriptor for balance_notify_enabled field.
  2309. userDescBalanceNotifyEnabled := userFields[16].Descriptor()
  2310. // user.DefaultBalanceNotifyEnabled holds the default value on creation for the balance_notify_enabled field.
  2311. user.DefaultBalanceNotifyEnabled = userDescBalanceNotifyEnabled.Default.(bool)
  2312. // userDescBalanceNotifyThresholdType is the schema descriptor for balance_notify_threshold_type field.
  2313. userDescBalanceNotifyThresholdType := userFields[17].Descriptor()
  2314. // user.DefaultBalanceNotifyThresholdType holds the default value on creation for the balance_notify_threshold_type field.
  2315. user.DefaultBalanceNotifyThresholdType = userDescBalanceNotifyThresholdType.Default.(string)
  2316. // userDescBalanceNotifyExtraEmails is the schema descriptor for balance_notify_extra_emails field.
  2317. userDescBalanceNotifyExtraEmails := userFields[19].Descriptor()
  2318. // user.DefaultBalanceNotifyExtraEmails holds the default value on creation for the balance_notify_extra_emails field.
  2319. user.DefaultBalanceNotifyExtraEmails = userDescBalanceNotifyExtraEmails.Default.(string)
  2320. // userDescTotalRecharged is the schema descriptor for total_recharged field.
  2321. userDescTotalRecharged := userFields[20].Descriptor()
  2322. // user.DefaultTotalRecharged holds the default value on creation for the total_recharged field.
  2323. user.DefaultTotalRecharged = userDescTotalRecharged.Default.(float64)
  2324. // userDescRpmLimit is the schema descriptor for rpm_limit field.
  2325. userDescRpmLimit := userFields[21].Descriptor()
  2326. // user.DefaultRpmLimit holds the default value on creation for the rpm_limit field.
  2327. user.DefaultRpmLimit = userDescRpmLimit.Default.(int)
  2328. userallowedgroupFields := schema.UserAllowedGroup{}.Fields()
  2329. _ = userallowedgroupFields
  2330. // userallowedgroupDescCreatedAt is the schema descriptor for created_at field.
  2331. userallowedgroupDescCreatedAt := userallowedgroupFields[2].Descriptor()
  2332. // userallowedgroup.DefaultCreatedAt holds the default value on creation for the created_at field.
  2333. userallowedgroup.DefaultCreatedAt = userallowedgroupDescCreatedAt.Default.(func() time.Time)
  2334. userattributedefinitionMixin := schema.UserAttributeDefinition{}.Mixin()
  2335. userattributedefinitionMixinHooks1 := userattributedefinitionMixin[1].Hooks()
  2336. userattributedefinition.Hooks[0] = userattributedefinitionMixinHooks1[0]
  2337. userattributedefinitionMixinInters1 := userattributedefinitionMixin[1].Interceptors()
  2338. userattributedefinition.Interceptors[0] = userattributedefinitionMixinInters1[0]
  2339. userattributedefinitionMixinFields0 := userattributedefinitionMixin[0].Fields()
  2340. _ = userattributedefinitionMixinFields0
  2341. userattributedefinitionFields := schema.UserAttributeDefinition{}.Fields()
  2342. _ = userattributedefinitionFields
  2343. // userattributedefinitionDescCreatedAt is the schema descriptor for created_at field.
  2344. userattributedefinitionDescCreatedAt := userattributedefinitionMixinFields0[0].Descriptor()
  2345. // userattributedefinition.DefaultCreatedAt holds the default value on creation for the created_at field.
  2346. userattributedefinition.DefaultCreatedAt = userattributedefinitionDescCreatedAt.Default.(func() time.Time)
  2347. // userattributedefinitionDescUpdatedAt is the schema descriptor for updated_at field.
  2348. userattributedefinitionDescUpdatedAt := userattributedefinitionMixinFields0[1].Descriptor()
  2349. // userattributedefinition.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  2350. userattributedefinition.DefaultUpdatedAt = userattributedefinitionDescUpdatedAt.Default.(func() time.Time)
  2351. // userattributedefinition.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  2352. userattributedefinition.UpdateDefaultUpdatedAt = userattributedefinitionDescUpdatedAt.UpdateDefault.(func() time.Time)
  2353. // userattributedefinitionDescKey is the schema descriptor for key field.
  2354. userattributedefinitionDescKey := userattributedefinitionFields[0].Descriptor()
  2355. // userattributedefinition.KeyValidator is a validator for the "key" field. It is called by the builders before save.
  2356. userattributedefinition.KeyValidator = func() func(string) error {
  2357. validators := userattributedefinitionDescKey.Validators
  2358. fns := [...]func(string) error{
  2359. validators[0].(func(string) error),
  2360. validators[1].(func(string) error),
  2361. }
  2362. return func(key string) error {
  2363. for _, fn := range fns {
  2364. if err := fn(key); err != nil {
  2365. return err
  2366. }
  2367. }
  2368. return nil
  2369. }
  2370. }()
  2371. // userattributedefinitionDescName is the schema descriptor for name field.
  2372. userattributedefinitionDescName := userattributedefinitionFields[1].Descriptor()
  2373. // userattributedefinition.NameValidator is a validator for the "name" field. It is called by the builders before save.
  2374. userattributedefinition.NameValidator = func() func(string) error {
  2375. validators := userattributedefinitionDescName.Validators
  2376. fns := [...]func(string) error{
  2377. validators[0].(func(string) error),
  2378. validators[1].(func(string) error),
  2379. }
  2380. return func(name string) error {
  2381. for _, fn := range fns {
  2382. if err := fn(name); err != nil {
  2383. return err
  2384. }
  2385. }
  2386. return nil
  2387. }
  2388. }()
  2389. // userattributedefinitionDescDescription is the schema descriptor for description field.
  2390. userattributedefinitionDescDescription := userattributedefinitionFields[2].Descriptor()
  2391. // userattributedefinition.DefaultDescription holds the default value on creation for the description field.
  2392. userattributedefinition.DefaultDescription = userattributedefinitionDescDescription.Default.(string)
  2393. // userattributedefinitionDescType is the schema descriptor for type field.
  2394. userattributedefinitionDescType := userattributedefinitionFields[3].Descriptor()
  2395. // userattributedefinition.TypeValidator is a validator for the "type" field. It is called by the builders before save.
  2396. userattributedefinition.TypeValidator = func() func(string) error {
  2397. validators := userattributedefinitionDescType.Validators
  2398. fns := [...]func(string) error{
  2399. validators[0].(func(string) error),
  2400. validators[1].(func(string) error),
  2401. }
  2402. return func(_type string) error {
  2403. for _, fn := range fns {
  2404. if err := fn(_type); err != nil {
  2405. return err
  2406. }
  2407. }
  2408. return nil
  2409. }
  2410. }()
  2411. // userattributedefinitionDescOptions is the schema descriptor for options field.
  2412. userattributedefinitionDescOptions := userattributedefinitionFields[4].Descriptor()
  2413. // userattributedefinition.DefaultOptions holds the default value on creation for the options field.
  2414. userattributedefinition.DefaultOptions = userattributedefinitionDescOptions.Default.([]map[string]interface{})
  2415. // userattributedefinitionDescRequired is the schema descriptor for required field.
  2416. userattributedefinitionDescRequired := userattributedefinitionFields[5].Descriptor()
  2417. // userattributedefinition.DefaultRequired holds the default value on creation for the required field.
  2418. userattributedefinition.DefaultRequired = userattributedefinitionDescRequired.Default.(bool)
  2419. // userattributedefinitionDescValidation is the schema descriptor for validation field.
  2420. userattributedefinitionDescValidation := userattributedefinitionFields[6].Descriptor()
  2421. // userattributedefinition.DefaultValidation holds the default value on creation for the validation field.
  2422. userattributedefinition.DefaultValidation = userattributedefinitionDescValidation.Default.(map[string]interface{})
  2423. // userattributedefinitionDescPlaceholder is the schema descriptor for placeholder field.
  2424. userattributedefinitionDescPlaceholder := userattributedefinitionFields[7].Descriptor()
  2425. // userattributedefinition.DefaultPlaceholder holds the default value on creation for the placeholder field.
  2426. userattributedefinition.DefaultPlaceholder = userattributedefinitionDescPlaceholder.Default.(string)
  2427. // userattributedefinition.PlaceholderValidator is a validator for the "placeholder" field. It is called by the builders before save.
  2428. userattributedefinition.PlaceholderValidator = userattributedefinitionDescPlaceholder.Validators[0].(func(string) error)
  2429. // userattributedefinitionDescDisplayOrder is the schema descriptor for display_order field.
  2430. userattributedefinitionDescDisplayOrder := userattributedefinitionFields[8].Descriptor()
  2431. // userattributedefinition.DefaultDisplayOrder holds the default value on creation for the display_order field.
  2432. userattributedefinition.DefaultDisplayOrder = userattributedefinitionDescDisplayOrder.Default.(int)
  2433. // userattributedefinitionDescEnabled is the schema descriptor for enabled field.
  2434. userattributedefinitionDescEnabled := userattributedefinitionFields[9].Descriptor()
  2435. // userattributedefinition.DefaultEnabled holds the default value on creation for the enabled field.
  2436. userattributedefinition.DefaultEnabled = userattributedefinitionDescEnabled.Default.(bool)
  2437. userattributevalueMixin := schema.UserAttributeValue{}.Mixin()
  2438. userattributevalueMixinFields0 := userattributevalueMixin[0].Fields()
  2439. _ = userattributevalueMixinFields0
  2440. userattributevalueFields := schema.UserAttributeValue{}.Fields()
  2441. _ = userattributevalueFields
  2442. // userattributevalueDescCreatedAt is the schema descriptor for created_at field.
  2443. userattributevalueDescCreatedAt := userattributevalueMixinFields0[0].Descriptor()
  2444. // userattributevalue.DefaultCreatedAt holds the default value on creation for the created_at field.
  2445. userattributevalue.DefaultCreatedAt = userattributevalueDescCreatedAt.Default.(func() time.Time)
  2446. // userattributevalueDescUpdatedAt is the schema descriptor for updated_at field.
  2447. userattributevalueDescUpdatedAt := userattributevalueMixinFields0[1].Descriptor()
  2448. // userattributevalue.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  2449. userattributevalue.DefaultUpdatedAt = userattributevalueDescUpdatedAt.Default.(func() time.Time)
  2450. // userattributevalue.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  2451. userattributevalue.UpdateDefaultUpdatedAt = userattributevalueDescUpdatedAt.UpdateDefault.(func() time.Time)
  2452. // userattributevalueDescValue is the schema descriptor for value field.
  2453. userattributevalueDescValue := userattributevalueFields[2].Descriptor()
  2454. // userattributevalue.DefaultValue holds the default value on creation for the value field.
  2455. userattributevalue.DefaultValue = userattributevalueDescValue.Default.(string)
  2456. userplatformquotaMixin := schema.UserPlatformQuota{}.Mixin()
  2457. userplatformquotaMixinHooks1 := userplatformquotaMixin[1].Hooks()
  2458. userplatformquota.Hooks[0] = userplatformquotaMixinHooks1[0]
  2459. userplatformquotaMixinInters1 := userplatformquotaMixin[1].Interceptors()
  2460. userplatformquota.Interceptors[0] = userplatformquotaMixinInters1[0]
  2461. userplatformquotaMixinFields0 := userplatformquotaMixin[0].Fields()
  2462. _ = userplatformquotaMixinFields0
  2463. userplatformquotaFields := schema.UserPlatformQuota{}.Fields()
  2464. _ = userplatformquotaFields
  2465. // userplatformquotaDescCreatedAt is the schema descriptor for created_at field.
  2466. userplatformquotaDescCreatedAt := userplatformquotaMixinFields0[0].Descriptor()
  2467. // userplatformquota.DefaultCreatedAt holds the default value on creation for the created_at field.
  2468. userplatformquota.DefaultCreatedAt = userplatformquotaDescCreatedAt.Default.(func() time.Time)
  2469. // userplatformquotaDescUpdatedAt is the schema descriptor for updated_at field.
  2470. userplatformquotaDescUpdatedAt := userplatformquotaMixinFields0[1].Descriptor()
  2471. // userplatformquota.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  2472. userplatformquota.DefaultUpdatedAt = userplatformquotaDescUpdatedAt.Default.(func() time.Time)
  2473. // userplatformquota.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  2474. userplatformquota.UpdateDefaultUpdatedAt = userplatformquotaDescUpdatedAt.UpdateDefault.(func() time.Time)
  2475. // userplatformquotaDescPlatform is the schema descriptor for platform field.
  2476. userplatformquotaDescPlatform := userplatformquotaFields[1].Descriptor()
  2477. // userplatformquota.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
  2478. userplatformquota.PlatformValidator = func() func(string) error {
  2479. validators := userplatformquotaDescPlatform.Validators
  2480. fns := [...]func(string) error{
  2481. validators[0].(func(string) error),
  2482. validators[1].(func(string) error),
  2483. validators[2].(func(string) error),
  2484. }
  2485. return func(platform string) error {
  2486. for _, fn := range fns {
  2487. if err := fn(platform); err != nil {
  2488. return err
  2489. }
  2490. }
  2491. return nil
  2492. }
  2493. }()
  2494. // userplatformquotaDescDailyUsageUsd is the schema descriptor for daily_usage_usd field.
  2495. userplatformquotaDescDailyUsageUsd := userplatformquotaFields[5].Descriptor()
  2496. // userplatformquota.DefaultDailyUsageUsd holds the default value on creation for the daily_usage_usd field.
  2497. userplatformquota.DefaultDailyUsageUsd = userplatformquotaDescDailyUsageUsd.Default.(float64)
  2498. // userplatformquotaDescWeeklyUsageUsd is the schema descriptor for weekly_usage_usd field.
  2499. userplatformquotaDescWeeklyUsageUsd := userplatformquotaFields[6].Descriptor()
  2500. // userplatformquota.DefaultWeeklyUsageUsd holds the default value on creation for the weekly_usage_usd field.
  2501. userplatformquota.DefaultWeeklyUsageUsd = userplatformquotaDescWeeklyUsageUsd.Default.(float64)
  2502. // userplatformquotaDescMonthlyUsageUsd is the schema descriptor for monthly_usage_usd field.
  2503. userplatformquotaDescMonthlyUsageUsd := userplatformquotaFields[7].Descriptor()
  2504. // userplatformquota.DefaultMonthlyUsageUsd holds the default value on creation for the monthly_usage_usd field.
  2505. userplatformquota.DefaultMonthlyUsageUsd = userplatformquotaDescMonthlyUsageUsd.Default.(float64)
  2506. usersubscriptionMixin := schema.UserSubscription{}.Mixin()
  2507. usersubscriptionMixinHooks1 := usersubscriptionMixin[1].Hooks()
  2508. usersubscription.Hooks[0] = usersubscriptionMixinHooks1[0]
  2509. usersubscriptionMixinInters1 := usersubscriptionMixin[1].Interceptors()
  2510. usersubscription.Interceptors[0] = usersubscriptionMixinInters1[0]
  2511. usersubscriptionMixinFields0 := usersubscriptionMixin[0].Fields()
  2512. _ = usersubscriptionMixinFields0
  2513. usersubscriptionFields := schema.UserSubscription{}.Fields()
  2514. _ = usersubscriptionFields
  2515. // usersubscriptionDescCreatedAt is the schema descriptor for created_at field.
  2516. usersubscriptionDescCreatedAt := usersubscriptionMixinFields0[0].Descriptor()
  2517. // usersubscription.DefaultCreatedAt holds the default value on creation for the created_at field.
  2518. usersubscription.DefaultCreatedAt = usersubscriptionDescCreatedAt.Default.(func() time.Time)
  2519. // usersubscriptionDescUpdatedAt is the schema descriptor for updated_at field.
  2520. usersubscriptionDescUpdatedAt := usersubscriptionMixinFields0[1].Descriptor()
  2521. // usersubscription.DefaultUpdatedAt holds the default value on creation for the updated_at field.
  2522. usersubscription.DefaultUpdatedAt = usersubscriptionDescUpdatedAt.Default.(func() time.Time)
  2523. // usersubscription.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
  2524. usersubscription.UpdateDefaultUpdatedAt = usersubscriptionDescUpdatedAt.UpdateDefault.(func() time.Time)
  2525. // usersubscriptionDescStatus is the schema descriptor for status field.
  2526. usersubscriptionDescStatus := usersubscriptionFields[4].Descriptor()
  2527. // usersubscription.DefaultStatus holds the default value on creation for the status field.
  2528. usersubscription.DefaultStatus = usersubscriptionDescStatus.Default.(string)
  2529. // usersubscription.StatusValidator is a validator for the "status" field. It is called by the builders before save.
  2530. usersubscription.StatusValidator = usersubscriptionDescStatus.Validators[0].(func(string) error)
  2531. // usersubscriptionDescDailyUsageUsd is the schema descriptor for daily_usage_usd field.
  2532. usersubscriptionDescDailyUsageUsd := usersubscriptionFields[8].Descriptor()
  2533. // usersubscription.DefaultDailyUsageUsd holds the default value on creation for the daily_usage_usd field.
  2534. usersubscription.DefaultDailyUsageUsd = usersubscriptionDescDailyUsageUsd.Default.(float64)
  2535. // usersubscriptionDescWeeklyUsageUsd is the schema descriptor for weekly_usage_usd field.
  2536. usersubscriptionDescWeeklyUsageUsd := usersubscriptionFields[9].Descriptor()
  2537. // usersubscription.DefaultWeeklyUsageUsd holds the default value on creation for the weekly_usage_usd field.
  2538. usersubscription.DefaultWeeklyUsageUsd = usersubscriptionDescWeeklyUsageUsd.Default.(float64)
  2539. // usersubscriptionDescMonthlyUsageUsd is the schema descriptor for monthly_usage_usd field.
  2540. usersubscriptionDescMonthlyUsageUsd := usersubscriptionFields[10].Descriptor()
  2541. // usersubscription.DefaultMonthlyUsageUsd holds the default value on creation for the monthly_usage_usd field.
  2542. usersubscription.DefaultMonthlyUsageUsd = usersubscriptionDescMonthlyUsageUsd.Default.(float64)
  2543. // usersubscriptionDescAssignedAt is the schema descriptor for assigned_at field.
  2544. usersubscriptionDescAssignedAt := usersubscriptionFields[12].Descriptor()
  2545. // usersubscription.DefaultAssignedAt holds the default value on creation for the assigned_at field.
  2546. usersubscription.DefaultAssignedAt = usersubscriptionDescAssignedAt.Default.(func() time.Time)
  2547. }
  2548. const (
  2549. Version = "v0.14.5" // Version of ent codegen.
  2550. Sum = "h1:Rj2WOYJtCkWyFo6a+5wB3EfBRP0rnx1fMk6gGA0UUe4=" // Sum of ent codegen.
  2551. )