| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556 |
- // Code generated by ent, DO NOT EDIT.
- package runtime
- import (
- "time"
- "github.com/Wei-Shaw/sub2api/ent/account"
- "github.com/Wei-Shaw/sub2api/ent/accountgroup"
- "github.com/Wei-Shaw/sub2api/ent/announcement"
- "github.com/Wei-Shaw/sub2api/ent/announcementread"
- "github.com/Wei-Shaw/sub2api/ent/apikey"
- "github.com/Wei-Shaw/sub2api/ent/authidentity"
- "github.com/Wei-Shaw/sub2api/ent/authidentitychannel"
- "github.com/Wei-Shaw/sub2api/ent/batchimageevent"
- "github.com/Wei-Shaw/sub2api/ent/batchimageitem"
- "github.com/Wei-Shaw/sub2api/ent/batchimagejob"
- "github.com/Wei-Shaw/sub2api/ent/channelmonitor"
- "github.com/Wei-Shaw/sub2api/ent/channelmonitordailyrollup"
- "github.com/Wei-Shaw/sub2api/ent/channelmonitorhistory"
- "github.com/Wei-Shaw/sub2api/ent/channelmonitorrequesttemplate"
- "github.com/Wei-Shaw/sub2api/ent/compositemodelroute"
- "github.com/Wei-Shaw/sub2api/ent/errorpassthroughrule"
- "github.com/Wei-Shaw/sub2api/ent/group"
- "github.com/Wei-Shaw/sub2api/ent/idempotencyrecord"
- "github.com/Wei-Shaw/sub2api/ent/identityadoptiondecision"
- "github.com/Wei-Shaw/sub2api/ent/paymentauditlog"
- "github.com/Wei-Shaw/sub2api/ent/paymentorder"
- "github.com/Wei-Shaw/sub2api/ent/paymentproviderinstance"
- "github.com/Wei-Shaw/sub2api/ent/pendingauthsession"
- "github.com/Wei-Shaw/sub2api/ent/promocode"
- "github.com/Wei-Shaw/sub2api/ent/promocodeusage"
- "github.com/Wei-Shaw/sub2api/ent/proxy"
- "github.com/Wei-Shaw/sub2api/ent/redeemcode"
- "github.com/Wei-Shaw/sub2api/ent/schema"
- "github.com/Wei-Shaw/sub2api/ent/securitypolicykeyword"
- "github.com/Wei-Shaw/sub2api/ent/securitysecret"
- "github.com/Wei-Shaw/sub2api/ent/setting"
- "github.com/Wei-Shaw/sub2api/ent/subscriptionplan"
- "github.com/Wei-Shaw/sub2api/ent/tlsfingerprintprofile"
- "github.com/Wei-Shaw/sub2api/ent/usagecleanuptask"
- "github.com/Wei-Shaw/sub2api/ent/usagelog"
- "github.com/Wei-Shaw/sub2api/ent/user"
- "github.com/Wei-Shaw/sub2api/ent/userallowedgroup"
- "github.com/Wei-Shaw/sub2api/ent/userattributedefinition"
- "github.com/Wei-Shaw/sub2api/ent/userattributevalue"
- "github.com/Wei-Shaw/sub2api/ent/userplatformquota"
- "github.com/Wei-Shaw/sub2api/ent/usersubscription"
- "github.com/Wei-Shaw/sub2api/internal/domain"
- )
- // The init function reads all schema descriptors with runtime code
- // (default values, validators, hooks and policies) and stitches it
- // to their package variables.
- func init() {
- apikeyMixin := schema.APIKey{}.Mixin()
- apikeyMixinHooks1 := apikeyMixin[1].Hooks()
- apikey.Hooks[0] = apikeyMixinHooks1[0]
- apikeyMixinInters1 := apikeyMixin[1].Interceptors()
- apikey.Interceptors[0] = apikeyMixinInters1[0]
- apikeyMixinFields0 := apikeyMixin[0].Fields()
- _ = apikeyMixinFields0
- apikeyFields := schema.APIKey{}.Fields()
- _ = apikeyFields
- // apikeyDescCreatedAt is the schema descriptor for created_at field.
- apikeyDescCreatedAt := apikeyMixinFields0[0].Descriptor()
- // apikey.DefaultCreatedAt holds the default value on creation for the created_at field.
- apikey.DefaultCreatedAt = apikeyDescCreatedAt.Default.(func() time.Time)
- // apikeyDescUpdatedAt is the schema descriptor for updated_at field.
- apikeyDescUpdatedAt := apikeyMixinFields0[1].Descriptor()
- // apikey.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- apikey.DefaultUpdatedAt = apikeyDescUpdatedAt.Default.(func() time.Time)
- // apikey.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- apikey.UpdateDefaultUpdatedAt = apikeyDescUpdatedAt.UpdateDefault.(func() time.Time)
- // apikeyDescKey is the schema descriptor for key field.
- apikeyDescKey := apikeyFields[1].Descriptor()
- // apikey.KeyValidator is a validator for the "key" field. It is called by the builders before save.
- apikey.KeyValidator = func() func(string) error {
- validators := apikeyDescKey.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(key string) error {
- for _, fn := range fns {
- if err := fn(key); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // apikeyDescKeyHash is the schema descriptor for key_hash field.
- apikeyDescKeyHash := apikeyFields[2].Descriptor()
- // apikey.KeyHashValidator is a validator for the "key_hash" field. It is called by the builders before save.
- apikey.KeyHashValidator = apikeyDescKeyHash.Validators[0].(func(string) error)
- // apikeyDescKeyPrefix is the schema descriptor for key_prefix field.
- apikeyDescKeyPrefix := apikeyFields[3].Descriptor()
- // apikey.KeyPrefixValidator is a validator for the "key_prefix" field. It is called by the builders before save.
- apikey.KeyPrefixValidator = apikeyDescKeyPrefix.Validators[0].(func(string) error)
- // apikeyDescName is the schema descriptor for name field.
- apikeyDescName := apikeyFields[4].Descriptor()
- // apikey.NameValidator is a validator for the "name" field. It is called by the builders before save.
- apikey.NameValidator = func() func(string) error {
- validators := apikeyDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // apikeyDescStatus is the schema descriptor for status field.
- apikeyDescStatus := apikeyFields[6].Descriptor()
- // apikey.DefaultStatus holds the default value on creation for the status field.
- apikey.DefaultStatus = apikeyDescStatus.Default.(string)
- // apikey.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- apikey.StatusValidator = apikeyDescStatus.Validators[0].(func(string) error)
- // apikeyDescQuota is the schema descriptor for quota field.
- apikeyDescQuota := apikeyFields[10].Descriptor()
- // apikey.DefaultQuota holds the default value on creation for the quota field.
- apikey.DefaultQuota = apikeyDescQuota.Default.(float64)
- // apikeyDescQuotaUsed is the schema descriptor for quota_used field.
- apikeyDescQuotaUsed := apikeyFields[11].Descriptor()
- // apikey.DefaultQuotaUsed holds the default value on creation for the quota_used field.
- apikey.DefaultQuotaUsed = apikeyDescQuotaUsed.Default.(float64)
- // apikeyDescRateLimit5h is the schema descriptor for rate_limit_5h field.
- apikeyDescRateLimit5h := apikeyFields[13].Descriptor()
- // apikey.DefaultRateLimit5h holds the default value on creation for the rate_limit_5h field.
- apikey.DefaultRateLimit5h = apikeyDescRateLimit5h.Default.(float64)
- // apikeyDescRateLimit1d is the schema descriptor for rate_limit_1d field.
- apikeyDescRateLimit1d := apikeyFields[14].Descriptor()
- // apikey.DefaultRateLimit1d holds the default value on creation for the rate_limit_1d field.
- apikey.DefaultRateLimit1d = apikeyDescRateLimit1d.Default.(float64)
- // apikeyDescRateLimit7d is the schema descriptor for rate_limit_7d field.
- apikeyDescRateLimit7d := apikeyFields[15].Descriptor()
- // apikey.DefaultRateLimit7d holds the default value on creation for the rate_limit_7d field.
- apikey.DefaultRateLimit7d = apikeyDescRateLimit7d.Default.(float64)
- // apikeyDescUsage5h is the schema descriptor for usage_5h field.
- apikeyDescUsage5h := apikeyFields[16].Descriptor()
- // apikey.DefaultUsage5h holds the default value on creation for the usage_5h field.
- apikey.DefaultUsage5h = apikeyDescUsage5h.Default.(float64)
- // apikeyDescUsage1d is the schema descriptor for usage_1d field.
- apikeyDescUsage1d := apikeyFields[17].Descriptor()
- // apikey.DefaultUsage1d holds the default value on creation for the usage_1d field.
- apikey.DefaultUsage1d = apikeyDescUsage1d.Default.(float64)
- // apikeyDescUsage7d is the schema descriptor for usage_7d field.
- apikeyDescUsage7d := apikeyFields[18].Descriptor()
- // apikey.DefaultUsage7d holds the default value on creation for the usage_7d field.
- apikey.DefaultUsage7d = apikeyDescUsage7d.Default.(float64)
- accountMixin := schema.Account{}.Mixin()
- accountMixinHooks1 := accountMixin[1].Hooks()
- account.Hooks[0] = accountMixinHooks1[0]
- accountMixinInters1 := accountMixin[1].Interceptors()
- account.Interceptors[0] = accountMixinInters1[0]
- accountMixinFields0 := accountMixin[0].Fields()
- _ = accountMixinFields0
- accountFields := schema.Account{}.Fields()
- _ = accountFields
- // accountDescCreatedAt is the schema descriptor for created_at field.
- accountDescCreatedAt := accountMixinFields0[0].Descriptor()
- // account.DefaultCreatedAt holds the default value on creation for the created_at field.
- account.DefaultCreatedAt = accountDescCreatedAt.Default.(func() time.Time)
- // accountDescUpdatedAt is the schema descriptor for updated_at field.
- accountDescUpdatedAt := accountMixinFields0[1].Descriptor()
- // account.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- account.DefaultUpdatedAt = accountDescUpdatedAt.Default.(func() time.Time)
- // account.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- account.UpdateDefaultUpdatedAt = accountDescUpdatedAt.UpdateDefault.(func() time.Time)
- // accountDescName is the schema descriptor for name field.
- accountDescName := accountFields[0].Descriptor()
- // account.NameValidator is a validator for the "name" field. It is called by the builders before save.
- account.NameValidator = func() func(string) error {
- validators := accountDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // accountDescPlatform is the schema descriptor for platform field.
- accountDescPlatform := accountFields[2].Descriptor()
- // account.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
- account.PlatformValidator = func() func(string) error {
- validators := accountDescPlatform.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(platform string) error {
- for _, fn := range fns {
- if err := fn(platform); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // accountDescType is the schema descriptor for type field.
- accountDescType := accountFields[3].Descriptor()
- // account.TypeValidator is a validator for the "type" field. It is called by the builders before save.
- account.TypeValidator = func() func(string) error {
- validators := accountDescType.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(_type string) error {
- for _, fn := range fns {
- if err := fn(_type); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // accountDescCredentials is the schema descriptor for credentials field.
- accountDescCredentials := accountFields[4].Descriptor()
- // account.DefaultCredentials holds the default value on creation for the credentials field.
- account.DefaultCredentials = accountDescCredentials.Default.(func() map[string]interface{})
- // accountDescExtra is the schema descriptor for extra field.
- accountDescExtra := accountFields[5].Descriptor()
- // account.DefaultExtra holds the default value on creation for the extra field.
- account.DefaultExtra = accountDescExtra.Default.(func() map[string]interface{})
- // accountDescConcurrency is the schema descriptor for concurrency field.
- accountDescConcurrency := accountFields[8].Descriptor()
- // account.DefaultConcurrency holds the default value on creation for the concurrency field.
- account.DefaultConcurrency = accountDescConcurrency.Default.(int)
- // accountDescPriority is the schema descriptor for priority field.
- accountDescPriority := accountFields[10].Descriptor()
- // account.DefaultPriority holds the default value on creation for the priority field.
- account.DefaultPriority = accountDescPriority.Default.(int)
- // accountDescRateMultiplier is the schema descriptor for rate_multiplier field.
- accountDescRateMultiplier := accountFields[11].Descriptor()
- // account.DefaultRateMultiplier holds the default value on creation for the rate_multiplier field.
- account.DefaultRateMultiplier = accountDescRateMultiplier.Default.(float64)
- // accountDescStatus is the schema descriptor for status field.
- accountDescStatus := accountFields[12].Descriptor()
- // account.DefaultStatus holds the default value on creation for the status field.
- account.DefaultStatus = accountDescStatus.Default.(string)
- // account.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- account.StatusValidator = accountDescStatus.Validators[0].(func(string) error)
- // accountDescAutoPauseOnExpired is the schema descriptor for auto_pause_on_expired field.
- accountDescAutoPauseOnExpired := accountFields[16].Descriptor()
- // account.DefaultAutoPauseOnExpired holds the default value on creation for the auto_pause_on_expired field.
- account.DefaultAutoPauseOnExpired = accountDescAutoPauseOnExpired.Default.(bool)
- // accountDescSchedulable is the schema descriptor for schedulable field.
- accountDescSchedulable := accountFields[17].Descriptor()
- // account.DefaultSchedulable holds the default value on creation for the schedulable field.
- account.DefaultSchedulable = accountDescSchedulable.Default.(bool)
- // accountDescSessionWindowStatus is the schema descriptor for session_window_status field.
- accountDescSessionWindowStatus := accountFields[25].Descriptor()
- // account.SessionWindowStatusValidator is a validator for the "session_window_status" field. It is called by the builders before save.
- account.SessionWindowStatusValidator = accountDescSessionWindowStatus.Validators[0].(func(string) error)
- accountgroupFields := schema.AccountGroup{}.Fields()
- _ = accountgroupFields
- // accountgroupDescPriority is the schema descriptor for priority field.
- accountgroupDescPriority := accountgroupFields[2].Descriptor()
- // accountgroup.DefaultPriority holds the default value on creation for the priority field.
- accountgroup.DefaultPriority = accountgroupDescPriority.Default.(int)
- // accountgroupDescCreatedAt is the schema descriptor for created_at field.
- accountgroupDescCreatedAt := accountgroupFields[3].Descriptor()
- // accountgroup.DefaultCreatedAt holds the default value on creation for the created_at field.
- accountgroup.DefaultCreatedAt = accountgroupDescCreatedAt.Default.(func() time.Time)
- announcementFields := schema.Announcement{}.Fields()
- _ = announcementFields
- // announcementDescTitle is the schema descriptor for title field.
- announcementDescTitle := announcementFields[0].Descriptor()
- // announcement.TitleValidator is a validator for the "title" field. It is called by the builders before save.
- announcement.TitleValidator = func() func(string) error {
- validators := announcementDescTitle.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(title string) error {
- for _, fn := range fns {
- if err := fn(title); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // announcementDescContent is the schema descriptor for content field.
- announcementDescContent := announcementFields[1].Descriptor()
- // announcement.ContentValidator is a validator for the "content" field. It is called by the builders before save.
- announcement.ContentValidator = announcementDescContent.Validators[0].(func(string) error)
- // announcementDescStatus is the schema descriptor for status field.
- announcementDescStatus := announcementFields[2].Descriptor()
- // announcement.DefaultStatus holds the default value on creation for the status field.
- announcement.DefaultStatus = announcementDescStatus.Default.(string)
- // announcement.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- announcement.StatusValidator = announcementDescStatus.Validators[0].(func(string) error)
- // announcementDescNotifyMode is the schema descriptor for notify_mode field.
- announcementDescNotifyMode := announcementFields[3].Descriptor()
- // announcement.DefaultNotifyMode holds the default value on creation for the notify_mode field.
- announcement.DefaultNotifyMode = announcementDescNotifyMode.Default.(string)
- // announcement.NotifyModeValidator is a validator for the "notify_mode" field. It is called by the builders before save.
- announcement.NotifyModeValidator = announcementDescNotifyMode.Validators[0].(func(string) error)
- // announcementDescCreatedAt is the schema descriptor for created_at field.
- announcementDescCreatedAt := announcementFields[9].Descriptor()
- // announcement.DefaultCreatedAt holds the default value on creation for the created_at field.
- announcement.DefaultCreatedAt = announcementDescCreatedAt.Default.(func() time.Time)
- // announcementDescUpdatedAt is the schema descriptor for updated_at field.
- announcementDescUpdatedAt := announcementFields[10].Descriptor()
- // announcement.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- announcement.DefaultUpdatedAt = announcementDescUpdatedAt.Default.(func() time.Time)
- // announcement.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- announcement.UpdateDefaultUpdatedAt = announcementDescUpdatedAt.UpdateDefault.(func() time.Time)
- announcementreadFields := schema.AnnouncementRead{}.Fields()
- _ = announcementreadFields
- // announcementreadDescReadAt is the schema descriptor for read_at field.
- announcementreadDescReadAt := announcementreadFields[2].Descriptor()
- // announcementread.DefaultReadAt holds the default value on creation for the read_at field.
- announcementread.DefaultReadAt = announcementreadDescReadAt.Default.(func() time.Time)
- // announcementreadDescCreatedAt is the schema descriptor for created_at field.
- announcementreadDescCreatedAt := announcementreadFields[3].Descriptor()
- // announcementread.DefaultCreatedAt holds the default value on creation for the created_at field.
- announcementread.DefaultCreatedAt = announcementreadDescCreatedAt.Default.(func() time.Time)
- authidentityMixin := schema.AuthIdentity{}.Mixin()
- authidentityMixinFields0 := authidentityMixin[0].Fields()
- _ = authidentityMixinFields0
- authidentityFields := schema.AuthIdentity{}.Fields()
- _ = authidentityFields
- // authidentityDescCreatedAt is the schema descriptor for created_at field.
- authidentityDescCreatedAt := authidentityMixinFields0[0].Descriptor()
- // authidentity.DefaultCreatedAt holds the default value on creation for the created_at field.
- authidentity.DefaultCreatedAt = authidentityDescCreatedAt.Default.(func() time.Time)
- // authidentityDescUpdatedAt is the schema descriptor for updated_at field.
- authidentityDescUpdatedAt := authidentityMixinFields0[1].Descriptor()
- // authidentity.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- authidentity.DefaultUpdatedAt = authidentityDescUpdatedAt.Default.(func() time.Time)
- // authidentity.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- authidentity.UpdateDefaultUpdatedAt = authidentityDescUpdatedAt.UpdateDefault.(func() time.Time)
- // authidentityDescProviderType is the schema descriptor for provider_type field.
- authidentityDescProviderType := authidentityFields[1].Descriptor()
- // authidentity.ProviderTypeValidator is a validator for the "provider_type" field. It is called by the builders before save.
- authidentity.ProviderTypeValidator = func() func(string) error {
- validators := authidentityDescProviderType.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- validators[2].(func(string) error),
- }
- return func(provider_type string) error {
- for _, fn := range fns {
- if err := fn(provider_type); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // authidentityDescProviderKey is the schema descriptor for provider_key field.
- authidentityDescProviderKey := authidentityFields[2].Descriptor()
- // authidentity.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
- authidentity.ProviderKeyValidator = authidentityDescProviderKey.Validators[0].(func(string) error)
- // authidentityDescProviderSubject is the schema descriptor for provider_subject field.
- authidentityDescProviderSubject := authidentityFields[3].Descriptor()
- // authidentity.ProviderSubjectValidator is a validator for the "provider_subject" field. It is called by the builders before save.
- authidentity.ProviderSubjectValidator = authidentityDescProviderSubject.Validators[0].(func(string) error)
- // authidentityDescMetadata is the schema descriptor for metadata field.
- authidentityDescMetadata := authidentityFields[6].Descriptor()
- // authidentity.DefaultMetadata holds the default value on creation for the metadata field.
- authidentity.DefaultMetadata = authidentityDescMetadata.Default.(func() map[string]interface{})
- authidentitychannelMixin := schema.AuthIdentityChannel{}.Mixin()
- authidentitychannelMixinFields0 := authidentitychannelMixin[0].Fields()
- _ = authidentitychannelMixinFields0
- authidentitychannelFields := schema.AuthIdentityChannel{}.Fields()
- _ = authidentitychannelFields
- // authidentitychannelDescCreatedAt is the schema descriptor for created_at field.
- authidentitychannelDescCreatedAt := authidentitychannelMixinFields0[0].Descriptor()
- // authidentitychannel.DefaultCreatedAt holds the default value on creation for the created_at field.
- authidentitychannel.DefaultCreatedAt = authidentitychannelDescCreatedAt.Default.(func() time.Time)
- // authidentitychannelDescUpdatedAt is the schema descriptor for updated_at field.
- authidentitychannelDescUpdatedAt := authidentitychannelMixinFields0[1].Descriptor()
- // authidentitychannel.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- authidentitychannel.DefaultUpdatedAt = authidentitychannelDescUpdatedAt.Default.(func() time.Time)
- // authidentitychannel.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- authidentitychannel.UpdateDefaultUpdatedAt = authidentitychannelDescUpdatedAt.UpdateDefault.(func() time.Time)
- // authidentitychannelDescProviderType is the schema descriptor for provider_type field.
- authidentitychannelDescProviderType := authidentitychannelFields[1].Descriptor()
- // authidentitychannel.ProviderTypeValidator is a validator for the "provider_type" field. It is called by the builders before save.
- authidentitychannel.ProviderTypeValidator = func() func(string) error {
- validators := authidentitychannelDescProviderType.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- validators[2].(func(string) error),
- }
- return func(provider_type string) error {
- for _, fn := range fns {
- if err := fn(provider_type); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // authidentitychannelDescProviderKey is the schema descriptor for provider_key field.
- authidentitychannelDescProviderKey := authidentitychannelFields[2].Descriptor()
- // authidentitychannel.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
- authidentitychannel.ProviderKeyValidator = authidentitychannelDescProviderKey.Validators[0].(func(string) error)
- // authidentitychannelDescChannel is the schema descriptor for channel field.
- authidentitychannelDescChannel := authidentitychannelFields[3].Descriptor()
- // authidentitychannel.ChannelValidator is a validator for the "channel" field. It is called by the builders before save.
- authidentitychannel.ChannelValidator = func() func(string) error {
- validators := authidentitychannelDescChannel.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(channel string) error {
- for _, fn := range fns {
- if err := fn(channel); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // authidentitychannelDescChannelAppID is the schema descriptor for channel_app_id field.
- authidentitychannelDescChannelAppID := authidentitychannelFields[4].Descriptor()
- // authidentitychannel.ChannelAppIDValidator is a validator for the "channel_app_id" field. It is called by the builders before save.
- authidentitychannel.ChannelAppIDValidator = authidentitychannelDescChannelAppID.Validators[0].(func(string) error)
- // authidentitychannelDescChannelSubject is the schema descriptor for channel_subject field.
- authidentitychannelDescChannelSubject := authidentitychannelFields[5].Descriptor()
- // authidentitychannel.ChannelSubjectValidator is a validator for the "channel_subject" field. It is called by the builders before save.
- authidentitychannel.ChannelSubjectValidator = authidentitychannelDescChannelSubject.Validators[0].(func(string) error)
- // authidentitychannelDescMetadata is the schema descriptor for metadata field.
- authidentitychannelDescMetadata := authidentitychannelFields[6].Descriptor()
- // authidentitychannel.DefaultMetadata holds the default value on creation for the metadata field.
- authidentitychannel.DefaultMetadata = authidentitychannelDescMetadata.Default.(func() map[string]interface{})
- batchimageeventFields := schema.BatchImageEvent{}.Fields()
- _ = batchimageeventFields
- // batchimageeventDescJobID is the schema descriptor for job_id field.
- batchimageeventDescJobID := batchimageeventFields[0].Descriptor()
- // batchimageevent.JobIDValidator is a validator for the "job_id" field. It is called by the builders before save.
- batchimageevent.JobIDValidator = batchimageeventDescJobID.Validators[0].(func(string) error)
- // batchimageeventDescEventType is the schema descriptor for event_type field.
- batchimageeventDescEventType := batchimageeventFields[1].Descriptor()
- // batchimageevent.EventTypeValidator is a validator for the "event_type" field. It is called by the builders before save.
- batchimageevent.EventTypeValidator = batchimageeventDescEventType.Validators[0].(func(string) error)
- // batchimageeventDescEventHash is the schema descriptor for event_hash field.
- batchimageeventDescEventHash := batchimageeventFields[3].Descriptor()
- // batchimageevent.EventHashValidator is a validator for the "event_hash" field. It is called by the builders before save.
- batchimageevent.EventHashValidator = batchimageeventDescEventHash.Validators[0].(func(string) error)
- // batchimageeventDescCreatedAt is the schema descriptor for created_at field.
- batchimageeventDescCreatedAt := batchimageeventFields[4].Descriptor()
- // batchimageevent.DefaultCreatedAt holds the default value on creation for the created_at field.
- batchimageevent.DefaultCreatedAt = batchimageeventDescCreatedAt.Default.(func() time.Time)
- batchimageitemFields := schema.BatchImageItem{}.Fields()
- _ = batchimageitemFields
- // batchimageitemDescJobID is the schema descriptor for job_id field.
- batchimageitemDescJobID := batchimageitemFields[0].Descriptor()
- // batchimageitem.JobIDValidator is a validator for the "job_id" field. It is called by the builders before save.
- batchimageitem.JobIDValidator = batchimageitemDescJobID.Validators[0].(func(string) error)
- // batchimageitemDescCustomID is the schema descriptor for custom_id field.
- batchimageitemDescCustomID := batchimageitemFields[1].Descriptor()
- // batchimageitem.CustomIDValidator is a validator for the "custom_id" field. It is called by the builders before save.
- batchimageitem.CustomIDValidator = batchimageitemDescCustomID.Validators[0].(func(string) error)
- // batchimageitemDescStatus is the schema descriptor for status field.
- batchimageitemDescStatus := batchimageitemFields[2].Descriptor()
- // batchimageitem.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- batchimageitem.StatusValidator = batchimageitemDescStatus.Validators[0].(func(string) error)
- // batchimageitemDescRequestHash is the schema descriptor for request_hash field.
- batchimageitemDescRequestHash := batchimageitemFields[3].Descriptor()
- // batchimageitem.RequestHashValidator is a validator for the "request_hash" field. It is called by the builders before save.
- batchimageitem.RequestHashValidator = batchimageitemDescRequestHash.Validators[0].(func(string) error)
- // batchimageitemDescProviderSourceObject is the schema descriptor for provider_source_object field.
- batchimageitemDescProviderSourceObject := batchimageitemFields[5].Descriptor()
- // batchimageitem.ProviderSourceObjectValidator is a validator for the "provider_source_object" field. It is called by the builders before save.
- batchimageitem.ProviderSourceObjectValidator = batchimageitemDescProviderSourceObject.Validators[0].(func(string) error)
- // batchimageitemDescMimeType is the schema descriptor for mime_type field.
- batchimageitemDescMimeType := batchimageitemFields[9].Descriptor()
- // batchimageitem.MimeTypeValidator is a validator for the "mime_type" field. It is called by the builders before save.
- batchimageitem.MimeTypeValidator = batchimageitemDescMimeType.Validators[0].(func(string) error)
- // batchimageitemDescFileExtension is the schema descriptor for file_extension field.
- batchimageitemDescFileExtension := batchimageitemFields[10].Descriptor()
- // batchimageitem.FileExtensionValidator is a validator for the "file_extension" field. It is called by the builders before save.
- batchimageitem.FileExtensionValidator = batchimageitemDescFileExtension.Validators[0].(func(string) error)
- // batchimageitemDescImageCount is the schema descriptor for image_count field.
- batchimageitemDescImageCount := batchimageitemFields[11].Descriptor()
- // batchimageitem.DefaultImageCount holds the default value on creation for the image_count field.
- batchimageitem.DefaultImageCount = batchimageitemDescImageCount.Default.(int)
- // batchimageitemDescErrorCode is the schema descriptor for error_code field.
- batchimageitemDescErrorCode := batchimageitemFields[12].Descriptor()
- // batchimageitem.ErrorCodeValidator is a validator for the "error_code" field. It is called by the builders before save.
- batchimageitem.ErrorCodeValidator = batchimageitemDescErrorCode.Validators[0].(func(string) error)
- // batchimageitemDescCreatedAt is the schema descriptor for created_at field.
- batchimageitemDescCreatedAt := batchimageitemFields[15].Descriptor()
- // batchimageitem.DefaultCreatedAt holds the default value on creation for the created_at field.
- batchimageitem.DefaultCreatedAt = batchimageitemDescCreatedAt.Default.(func() time.Time)
- batchimagejobFields := schema.BatchImageJob{}.Fields()
- _ = batchimagejobFields
- // batchimagejobDescBatchID is the schema descriptor for batch_id field.
- batchimagejobDescBatchID := batchimagejobFields[0].Descriptor()
- // batchimagejob.BatchIDValidator is a validator for the "batch_id" field. It is called by the builders before save.
- batchimagejob.BatchIDValidator = batchimagejobDescBatchID.Validators[0].(func(string) error)
- // batchimagejobDescProvider is the schema descriptor for provider field.
- batchimagejobDescProvider := batchimagejobFields[4].Descriptor()
- // batchimagejob.ProviderValidator is a validator for the "provider" field. It is called by the builders before save.
- batchimagejob.ProviderValidator = batchimagejobDescProvider.Validators[0].(func(string) error)
- // batchimagejobDescModel is the schema descriptor for model field.
- batchimagejobDescModel := batchimagejobFields[5].Descriptor()
- // batchimagejob.ModelValidator is a validator for the "model" field. It is called by the builders before save.
- batchimagejob.ModelValidator = batchimagejobDescModel.Validators[0].(func(string) error)
- // batchimagejobDescTaskName is the schema descriptor for task_name field.
- batchimagejobDescTaskName := batchimagejobFields[6].Descriptor()
- // batchimagejob.DefaultTaskName holds the default value on creation for the task_name field.
- batchimagejob.DefaultTaskName = batchimagejobDescTaskName.Default.(string)
- // batchimagejob.TaskNameValidator is a validator for the "task_name" field. It is called by the builders before save.
- batchimagejob.TaskNameValidator = batchimagejobDescTaskName.Validators[0].(func(string) error)
- // batchimagejobDescStatus is the schema descriptor for status field.
- batchimagejobDescStatus := batchimagejobFields[7].Descriptor()
- // batchimagejob.DefaultStatus holds the default value on creation for the status field.
- batchimagejob.DefaultStatus = batchimagejobDescStatus.Default.(string)
- // batchimagejob.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- batchimagejob.StatusValidator = batchimagejobDescStatus.Validators[0].(func(string) error)
- // batchimagejobDescProviderJobName is the schema descriptor for provider_job_name field.
- batchimagejobDescProviderJobName := batchimagejobFields[8].Descriptor()
- // batchimagejob.ProviderJobNameValidator is a validator for the "provider_job_name" field. It is called by the builders before save.
- batchimagejob.ProviderJobNameValidator = batchimagejobDescProviderJobName.Validators[0].(func(string) error)
- // batchimagejobDescProviderInputRef is the schema descriptor for provider_input_ref field.
- batchimagejobDescProviderInputRef := batchimagejobFields[9].Descriptor()
- // batchimagejob.ProviderInputRefValidator is a validator for the "provider_input_ref" field. It is called by the builders before save.
- batchimagejob.ProviderInputRefValidator = batchimagejobDescProviderInputRef.Validators[0].(func(string) error)
- // batchimagejobDescProviderOutputRef is the schema descriptor for provider_output_ref field.
- batchimagejobDescProviderOutputRef := batchimagejobFields[10].Descriptor()
- // batchimagejob.ProviderOutputRefValidator is a validator for the "provider_output_ref" field. It is called by the builders before save.
- batchimagejob.ProviderOutputRefValidator = batchimagejobDescProviderOutputRef.Validators[0].(func(string) error)
- // batchimagejobDescGcsInputURI is the schema descriptor for gcs_input_uri field.
- batchimagejobDescGcsInputURI := batchimagejobFields[11].Descriptor()
- // batchimagejob.GcsInputURIValidator is a validator for the "gcs_input_uri" field. It is called by the builders before save.
- batchimagejob.GcsInputURIValidator = batchimagejobDescGcsInputURI.Validators[0].(func(string) error)
- // batchimagejobDescGcsOutputURI is the schema descriptor for gcs_output_uri field.
- batchimagejobDescGcsOutputURI := batchimagejobFields[12].Descriptor()
- // batchimagejob.GcsOutputURIValidator is a validator for the "gcs_output_uri" field. It is called by the builders before save.
- batchimagejob.GcsOutputURIValidator = batchimagejobDescGcsOutputURI.Validators[0].(func(string) error)
- // batchimagejobDescSuccessCount is the schema descriptor for success_count field.
- batchimagejobDescSuccessCount := batchimagejobFields[14].Descriptor()
- // batchimagejob.DefaultSuccessCount holds the default value on creation for the success_count field.
- batchimagejob.DefaultSuccessCount = batchimagejobDescSuccessCount.Default.(int)
- // batchimagejobDescFailCount is the schema descriptor for fail_count field.
- batchimagejobDescFailCount := batchimagejobFields[15].Descriptor()
- // batchimagejob.DefaultFailCount holds the default value on creation for the fail_count field.
- batchimagejob.DefaultFailCount = batchimagejobDescFailCount.Default.(int)
- // batchimagejobDescCancelledCount is the schema descriptor for cancelled_count field.
- batchimagejobDescCancelledCount := batchimagejobFields[16].Descriptor()
- // batchimagejob.DefaultCancelledCount holds the default value on creation for the cancelled_count field.
- batchimagejob.DefaultCancelledCount = batchimagejobDescCancelledCount.Default.(int)
- // batchimagejobDescEstimatedCost is the schema descriptor for estimated_cost field.
- batchimagejobDescEstimatedCost := batchimagejobFields[17].Descriptor()
- // batchimagejob.DefaultEstimatedCost holds the default value on creation for the estimated_cost field.
- batchimagejob.DefaultEstimatedCost = batchimagejobDescEstimatedCost.Default.(float64)
- // batchimagejobDescCurrency is the schema descriptor for currency field.
- batchimagejobDescCurrency := batchimagejobFields[20].Descriptor()
- // batchimagejob.DefaultCurrency holds the default value on creation for the currency field.
- batchimagejob.DefaultCurrency = batchimagejobDescCurrency.Default.(string)
- // batchimagejob.CurrencyValidator is a validator for the "currency" field. It is called by the builders before save.
- batchimagejob.CurrencyValidator = batchimagejobDescCurrency.Validators[0].(func(string) error)
- // batchimagejobDescHoldID is the schema descriptor for hold_id field.
- batchimagejobDescHoldID := batchimagejobFields[21].Descriptor()
- // batchimagejob.HoldIDValidator is a validator for the "hold_id" field. It is called by the builders before save.
- batchimagejob.HoldIDValidator = batchimagejobDescHoldID.Validators[0].(func(string) error)
- // batchimagejobDescIdempotencyKey is the schema descriptor for idempotency_key field.
- batchimagejobDescIdempotencyKey := batchimagejobFields[22].Descriptor()
- // batchimagejob.IdempotencyKeyValidator is a validator for the "idempotency_key" field. It is called by the builders before save.
- batchimagejob.IdempotencyKeyValidator = batchimagejobDescIdempotencyKey.Validators[0].(func(string) error)
- // batchimagejobDescRequestHash is the schema descriptor for request_hash field.
- batchimagejobDescRequestHash := batchimagejobFields[23].Descriptor()
- // batchimagejob.RequestHashValidator is a validator for the "request_hash" field. It is called by the builders before save.
- batchimagejob.RequestHashValidator = batchimagejobDescRequestHash.Validators[0].(func(string) error)
- // batchimagejobDescManifestHash is the schema descriptor for manifest_hash field.
- batchimagejobDescManifestHash := batchimagejobFields[24].Descriptor()
- // batchimagejob.ManifestHashValidator is a validator for the "manifest_hash" field. It is called by the builders before save.
- batchimagejob.ManifestHashValidator = batchimagejobDescManifestHash.Validators[0].(func(string) error)
- // batchimagejobDescRetryCount is the schema descriptor for retry_count field.
- batchimagejobDescRetryCount := batchimagejobFields[25].Descriptor()
- // batchimagejob.DefaultRetryCount holds the default value on creation for the retry_count field.
- batchimagejob.DefaultRetryCount = batchimagejobDescRetryCount.Default.(int)
- // batchimagejobDescVersion is the schema descriptor for version field.
- batchimagejobDescVersion := batchimagejobFields[26].Descriptor()
- // batchimagejob.DefaultVersion holds the default value on creation for the version field.
- batchimagejob.DefaultVersion = batchimagejobDescVersion.Default.(int)
- // batchimagejobDescLastErrorCode is the schema descriptor for last_error_code field.
- batchimagejobDescLastErrorCode := batchimagejobFields[32].Descriptor()
- // batchimagejob.LastErrorCodeValidator is a validator for the "last_error_code" field. It is called by the builders before save.
- batchimagejob.LastErrorCodeValidator = batchimagejobDescLastErrorCode.Validators[0].(func(string) error)
- // batchimagejobDescCreatedAt is the schema descriptor for created_at field.
- batchimagejobDescCreatedAt := batchimagejobFields[34].Descriptor()
- // batchimagejob.DefaultCreatedAt holds the default value on creation for the created_at field.
- batchimagejob.DefaultCreatedAt = batchimagejobDescCreatedAt.Default.(func() time.Time)
- // batchimagejobDescUpdatedAt is the schema descriptor for updated_at field.
- batchimagejobDescUpdatedAt := batchimagejobFields[35].Descriptor()
- // batchimagejob.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- batchimagejob.DefaultUpdatedAt = batchimagejobDescUpdatedAt.Default.(func() time.Time)
- // batchimagejob.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- batchimagejob.UpdateDefaultUpdatedAt = batchimagejobDescUpdatedAt.UpdateDefault.(func() time.Time)
- channelmonitorMixin := schema.ChannelMonitor{}.Mixin()
- channelmonitorMixinFields0 := channelmonitorMixin[0].Fields()
- _ = channelmonitorMixinFields0
- channelmonitorFields := schema.ChannelMonitor{}.Fields()
- _ = channelmonitorFields
- // channelmonitorDescCreatedAt is the schema descriptor for created_at field.
- channelmonitorDescCreatedAt := channelmonitorMixinFields0[0].Descriptor()
- // channelmonitor.DefaultCreatedAt holds the default value on creation for the created_at field.
- channelmonitor.DefaultCreatedAt = channelmonitorDescCreatedAt.Default.(func() time.Time)
- // channelmonitorDescUpdatedAt is the schema descriptor for updated_at field.
- channelmonitorDescUpdatedAt := channelmonitorMixinFields0[1].Descriptor()
- // channelmonitor.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- channelmonitor.DefaultUpdatedAt = channelmonitorDescUpdatedAt.Default.(func() time.Time)
- // channelmonitor.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- channelmonitor.UpdateDefaultUpdatedAt = channelmonitorDescUpdatedAt.UpdateDefault.(func() time.Time)
- // channelmonitorDescName is the schema descriptor for name field.
- channelmonitorDescName := channelmonitorFields[0].Descriptor()
- // channelmonitor.NameValidator is a validator for the "name" field. It is called by the builders before save.
- channelmonitor.NameValidator = func() func(string) error {
- validators := channelmonitorDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // channelmonitorDescCheckMode is the schema descriptor for check_mode field.
- channelmonitorDescCheckMode := channelmonitorFields[2].Descriptor()
- // channelmonitor.DefaultCheckMode holds the default value on creation for the check_mode field.
- channelmonitor.DefaultCheckMode = channelmonitorDescCheckMode.Default.(string)
- // channelmonitor.CheckModeValidator is a validator for the "check_mode" field. It is called by the builders before save.
- channelmonitor.CheckModeValidator = channelmonitorDescCheckMode.Validators[0].(func(string) error)
- // channelmonitorDescAPIMode is the schema descriptor for api_mode field.
- channelmonitorDescAPIMode := channelmonitorFields[4].Descriptor()
- // channelmonitor.DefaultAPIMode holds the default value on creation for the api_mode field.
- channelmonitor.DefaultAPIMode = channelmonitorDescAPIMode.Default.(string)
- // channelmonitor.APIModeValidator is a validator for the "api_mode" field. It is called by the builders before save.
- channelmonitor.APIModeValidator = channelmonitorDescAPIMode.Validators[0].(func(string) error)
- // channelmonitorDescEndpoint is the schema descriptor for endpoint field.
- channelmonitorDescEndpoint := channelmonitorFields[5].Descriptor()
- // channelmonitor.EndpointValidator is a validator for the "endpoint" field. It is called by the builders before save.
- channelmonitor.EndpointValidator = channelmonitorDescEndpoint.Validators[0].(func(string) error)
- // channelmonitorDescAPIKeyEncrypted is the schema descriptor for api_key_encrypted field.
- channelmonitorDescAPIKeyEncrypted := channelmonitorFields[6].Descriptor()
- // channelmonitor.APIKeyEncryptedValidator is a validator for the "api_key_encrypted" field. It is called by the builders before save.
- channelmonitor.APIKeyEncryptedValidator = channelmonitorDescAPIKeyEncrypted.Validators[0].(func(string) error)
- // channelmonitorDescPrimaryModel is the schema descriptor for primary_model field.
- channelmonitorDescPrimaryModel := channelmonitorFields[7].Descriptor()
- // channelmonitor.PrimaryModelValidator is a validator for the "primary_model" field. It is called by the builders before save.
- channelmonitor.PrimaryModelValidator = func() func(string) error {
- validators := channelmonitorDescPrimaryModel.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(primary_model string) error {
- for _, fn := range fns {
- if err := fn(primary_model); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // channelmonitorDescExtraModels is the schema descriptor for extra_models field.
- channelmonitorDescExtraModels := channelmonitorFields[8].Descriptor()
- // channelmonitor.DefaultExtraModels holds the default value on creation for the extra_models field.
- channelmonitor.DefaultExtraModels = channelmonitorDescExtraModels.Default.([]string)
- // channelmonitorDescGroupName is the schema descriptor for group_name field.
- channelmonitorDescGroupName := channelmonitorFields[9].Descriptor()
- // channelmonitor.DefaultGroupName holds the default value on creation for the group_name field.
- channelmonitor.DefaultGroupName = channelmonitorDescGroupName.Default.(string)
- // channelmonitor.GroupNameValidator is a validator for the "group_name" field. It is called by the builders before save.
- channelmonitor.GroupNameValidator = channelmonitorDescGroupName.Validators[0].(func(string) error)
- // channelmonitorDescEnabled is the schema descriptor for enabled field.
- channelmonitorDescEnabled := channelmonitorFields[10].Descriptor()
- // channelmonitor.DefaultEnabled holds the default value on creation for the enabled field.
- channelmonitor.DefaultEnabled = channelmonitorDescEnabled.Default.(bool)
- // channelmonitorDescIntervalSeconds is the schema descriptor for interval_seconds field.
- channelmonitorDescIntervalSeconds := channelmonitorFields[11].Descriptor()
- // channelmonitor.IntervalSecondsValidator is a validator for the "interval_seconds" field. It is called by the builders before save.
- channelmonitor.IntervalSecondsValidator = channelmonitorDescIntervalSeconds.Validators[0].(func(int) error)
- // channelmonitorDescJitterSeconds is the schema descriptor for jitter_seconds field.
- channelmonitorDescJitterSeconds := channelmonitorFields[12].Descriptor()
- // channelmonitor.DefaultJitterSeconds holds the default value on creation for the jitter_seconds field.
- channelmonitor.DefaultJitterSeconds = channelmonitorDescJitterSeconds.Default.(int)
- // channelmonitor.JitterSecondsValidator is a validator for the "jitter_seconds" field. It is called by the builders before save.
- channelmonitor.JitterSecondsValidator = channelmonitorDescJitterSeconds.Validators[0].(func(int) error)
- // channelmonitorDescExtraHeaders is the schema descriptor for extra_headers field.
- channelmonitorDescExtraHeaders := channelmonitorFields[16].Descriptor()
- // channelmonitor.DefaultExtraHeaders holds the default value on creation for the extra_headers field.
- channelmonitor.DefaultExtraHeaders = channelmonitorDescExtraHeaders.Default.(map[string]string)
- // channelmonitorDescBodyOverrideMode is the schema descriptor for body_override_mode field.
- channelmonitorDescBodyOverrideMode := channelmonitorFields[17].Descriptor()
- // channelmonitor.DefaultBodyOverrideMode holds the default value on creation for the body_override_mode field.
- channelmonitor.DefaultBodyOverrideMode = channelmonitorDescBodyOverrideMode.Default.(string)
- // channelmonitor.BodyOverrideModeValidator is a validator for the "body_override_mode" field. It is called by the builders before save.
- channelmonitor.BodyOverrideModeValidator = channelmonitorDescBodyOverrideMode.Validators[0].(func(string) error)
- channelmonitordailyrollupFields := schema.ChannelMonitorDailyRollup{}.Fields()
- _ = channelmonitordailyrollupFields
- // channelmonitordailyrollupDescModel is the schema descriptor for model field.
- channelmonitordailyrollupDescModel := channelmonitordailyrollupFields[1].Descriptor()
- // channelmonitordailyrollup.ModelValidator is a validator for the "model" field. It is called by the builders before save.
- channelmonitordailyrollup.ModelValidator = func() func(string) error {
- validators := channelmonitordailyrollupDescModel.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(model string) error {
- for _, fn := range fns {
- if err := fn(model); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // channelmonitordailyrollupDescTotalChecks is the schema descriptor for total_checks field.
- channelmonitordailyrollupDescTotalChecks := channelmonitordailyrollupFields[3].Descriptor()
- // channelmonitordailyrollup.DefaultTotalChecks holds the default value on creation for the total_checks field.
- channelmonitordailyrollup.DefaultTotalChecks = channelmonitordailyrollupDescTotalChecks.Default.(int)
- // channelmonitordailyrollupDescOkCount is the schema descriptor for ok_count field.
- channelmonitordailyrollupDescOkCount := channelmonitordailyrollupFields[4].Descriptor()
- // channelmonitordailyrollup.DefaultOkCount holds the default value on creation for the ok_count field.
- channelmonitordailyrollup.DefaultOkCount = channelmonitordailyrollupDescOkCount.Default.(int)
- // channelmonitordailyrollupDescOperationalCount is the schema descriptor for operational_count field.
- channelmonitordailyrollupDescOperationalCount := channelmonitordailyrollupFields[5].Descriptor()
- // channelmonitordailyrollup.DefaultOperationalCount holds the default value on creation for the operational_count field.
- channelmonitordailyrollup.DefaultOperationalCount = channelmonitordailyrollupDescOperationalCount.Default.(int)
- // channelmonitordailyrollupDescDegradedCount is the schema descriptor for degraded_count field.
- channelmonitordailyrollupDescDegradedCount := channelmonitordailyrollupFields[6].Descriptor()
- // channelmonitordailyrollup.DefaultDegradedCount holds the default value on creation for the degraded_count field.
- channelmonitordailyrollup.DefaultDegradedCount = channelmonitordailyrollupDescDegradedCount.Default.(int)
- // channelmonitordailyrollupDescFailedCount is the schema descriptor for failed_count field.
- channelmonitordailyrollupDescFailedCount := channelmonitordailyrollupFields[7].Descriptor()
- // channelmonitordailyrollup.DefaultFailedCount holds the default value on creation for the failed_count field.
- channelmonitordailyrollup.DefaultFailedCount = channelmonitordailyrollupDescFailedCount.Default.(int)
- // channelmonitordailyrollupDescErrorCount is the schema descriptor for error_count field.
- channelmonitordailyrollupDescErrorCount := channelmonitordailyrollupFields[8].Descriptor()
- // channelmonitordailyrollup.DefaultErrorCount holds the default value on creation for the error_count field.
- channelmonitordailyrollup.DefaultErrorCount = channelmonitordailyrollupDescErrorCount.Default.(int)
- // channelmonitordailyrollupDescSumLatencyMs is the schema descriptor for sum_latency_ms field.
- channelmonitordailyrollupDescSumLatencyMs := channelmonitordailyrollupFields[9].Descriptor()
- // channelmonitordailyrollup.DefaultSumLatencyMs holds the default value on creation for the sum_latency_ms field.
- channelmonitordailyrollup.DefaultSumLatencyMs = channelmonitordailyrollupDescSumLatencyMs.Default.(int64)
- // channelmonitordailyrollupDescCountLatency is the schema descriptor for count_latency field.
- channelmonitordailyrollupDescCountLatency := channelmonitordailyrollupFields[10].Descriptor()
- // channelmonitordailyrollup.DefaultCountLatency holds the default value on creation for the count_latency field.
- channelmonitordailyrollup.DefaultCountLatency = channelmonitordailyrollupDescCountLatency.Default.(int)
- // channelmonitordailyrollupDescSumPingLatencyMs is the schema descriptor for sum_ping_latency_ms field.
- channelmonitordailyrollupDescSumPingLatencyMs := channelmonitordailyrollupFields[11].Descriptor()
- // channelmonitordailyrollup.DefaultSumPingLatencyMs holds the default value on creation for the sum_ping_latency_ms field.
- channelmonitordailyrollup.DefaultSumPingLatencyMs = channelmonitordailyrollupDescSumPingLatencyMs.Default.(int64)
- // channelmonitordailyrollupDescCountPingLatency is the schema descriptor for count_ping_latency field.
- channelmonitordailyrollupDescCountPingLatency := channelmonitordailyrollupFields[12].Descriptor()
- // channelmonitordailyrollup.DefaultCountPingLatency holds the default value on creation for the count_ping_latency field.
- channelmonitordailyrollup.DefaultCountPingLatency = channelmonitordailyrollupDescCountPingLatency.Default.(int)
- // channelmonitordailyrollupDescComputedAt is the schema descriptor for computed_at field.
- channelmonitordailyrollupDescComputedAt := channelmonitordailyrollupFields[13].Descriptor()
- // channelmonitordailyrollup.DefaultComputedAt holds the default value on creation for the computed_at field.
- channelmonitordailyrollup.DefaultComputedAt = channelmonitordailyrollupDescComputedAt.Default.(func() time.Time)
- // channelmonitordailyrollup.UpdateDefaultComputedAt holds the default value on update for the computed_at field.
- channelmonitordailyrollup.UpdateDefaultComputedAt = channelmonitordailyrollupDescComputedAt.UpdateDefault.(func() time.Time)
- channelmonitorhistoryFields := schema.ChannelMonitorHistory{}.Fields()
- _ = channelmonitorhistoryFields
- // channelmonitorhistoryDescModel is the schema descriptor for model field.
- channelmonitorhistoryDescModel := channelmonitorhistoryFields[1].Descriptor()
- // channelmonitorhistory.ModelValidator is a validator for the "model" field. It is called by the builders before save.
- channelmonitorhistory.ModelValidator = func() func(string) error {
- validators := channelmonitorhistoryDescModel.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(model string) error {
- for _, fn := range fns {
- if err := fn(model); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // channelmonitorhistoryDescMessage is the schema descriptor for message field.
- channelmonitorhistoryDescMessage := channelmonitorhistoryFields[5].Descriptor()
- // channelmonitorhistory.DefaultMessage holds the default value on creation for the message field.
- channelmonitorhistory.DefaultMessage = channelmonitorhistoryDescMessage.Default.(string)
- // channelmonitorhistory.MessageValidator is a validator for the "message" field. It is called by the builders before save.
- channelmonitorhistory.MessageValidator = channelmonitorhistoryDescMessage.Validators[0].(func(string) error)
- // channelmonitorhistoryDescCheckedAt is the schema descriptor for checked_at field.
- channelmonitorhistoryDescCheckedAt := channelmonitorhistoryFields[7].Descriptor()
- // channelmonitorhistory.DefaultCheckedAt holds the default value on creation for the checked_at field.
- channelmonitorhistory.DefaultCheckedAt = channelmonitorhistoryDescCheckedAt.Default.(func() time.Time)
- channelmonitorrequesttemplateMixin := schema.ChannelMonitorRequestTemplate{}.Mixin()
- channelmonitorrequesttemplateMixinFields0 := channelmonitorrequesttemplateMixin[0].Fields()
- _ = channelmonitorrequesttemplateMixinFields0
- channelmonitorrequesttemplateFields := schema.ChannelMonitorRequestTemplate{}.Fields()
- _ = channelmonitorrequesttemplateFields
- // channelmonitorrequesttemplateDescCreatedAt is the schema descriptor for created_at field.
- channelmonitorrequesttemplateDescCreatedAt := channelmonitorrequesttemplateMixinFields0[0].Descriptor()
- // channelmonitorrequesttemplate.DefaultCreatedAt holds the default value on creation for the created_at field.
- channelmonitorrequesttemplate.DefaultCreatedAt = channelmonitorrequesttemplateDescCreatedAt.Default.(func() time.Time)
- // channelmonitorrequesttemplateDescUpdatedAt is the schema descriptor for updated_at field.
- channelmonitorrequesttemplateDescUpdatedAt := channelmonitorrequesttemplateMixinFields0[1].Descriptor()
- // channelmonitorrequesttemplate.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- channelmonitorrequesttemplate.DefaultUpdatedAt = channelmonitorrequesttemplateDescUpdatedAt.Default.(func() time.Time)
- // channelmonitorrequesttemplate.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- channelmonitorrequesttemplate.UpdateDefaultUpdatedAt = channelmonitorrequesttemplateDescUpdatedAt.UpdateDefault.(func() time.Time)
- // channelmonitorrequesttemplateDescName is the schema descriptor for name field.
- channelmonitorrequesttemplateDescName := channelmonitorrequesttemplateFields[0].Descriptor()
- // channelmonitorrequesttemplate.NameValidator is a validator for the "name" field. It is called by the builders before save.
- channelmonitorrequesttemplate.NameValidator = func() func(string) error {
- validators := channelmonitorrequesttemplateDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // channelmonitorrequesttemplateDescAPIMode is the schema descriptor for api_mode field.
- channelmonitorrequesttemplateDescAPIMode := channelmonitorrequesttemplateFields[2].Descriptor()
- // channelmonitorrequesttemplate.DefaultAPIMode holds the default value on creation for the api_mode field.
- channelmonitorrequesttemplate.DefaultAPIMode = channelmonitorrequesttemplateDescAPIMode.Default.(string)
- // channelmonitorrequesttemplate.APIModeValidator is a validator for the "api_mode" field. It is called by the builders before save.
- channelmonitorrequesttemplate.APIModeValidator = channelmonitorrequesttemplateDescAPIMode.Validators[0].(func(string) error)
- // channelmonitorrequesttemplateDescDescription is the schema descriptor for description field.
- channelmonitorrequesttemplateDescDescription := channelmonitorrequesttemplateFields[3].Descriptor()
- // channelmonitorrequesttemplate.DefaultDescription holds the default value on creation for the description field.
- channelmonitorrequesttemplate.DefaultDescription = channelmonitorrequesttemplateDescDescription.Default.(string)
- // channelmonitorrequesttemplate.DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
- channelmonitorrequesttemplate.DescriptionValidator = channelmonitorrequesttemplateDescDescription.Validators[0].(func(string) error)
- // channelmonitorrequesttemplateDescExtraHeaders is the schema descriptor for extra_headers field.
- channelmonitorrequesttemplateDescExtraHeaders := channelmonitorrequesttemplateFields[4].Descriptor()
- // channelmonitorrequesttemplate.DefaultExtraHeaders holds the default value on creation for the extra_headers field.
- channelmonitorrequesttemplate.DefaultExtraHeaders = channelmonitorrequesttemplateDescExtraHeaders.Default.(map[string]string)
- // channelmonitorrequesttemplateDescBodyOverrideMode is the schema descriptor for body_override_mode field.
- channelmonitorrequesttemplateDescBodyOverrideMode := channelmonitorrequesttemplateFields[5].Descriptor()
- // channelmonitorrequesttemplate.DefaultBodyOverrideMode holds the default value on creation for the body_override_mode field.
- channelmonitorrequesttemplate.DefaultBodyOverrideMode = channelmonitorrequesttemplateDescBodyOverrideMode.Default.(string)
- // channelmonitorrequesttemplate.BodyOverrideModeValidator is a validator for the "body_override_mode" field. It is called by the builders before save.
- channelmonitorrequesttemplate.BodyOverrideModeValidator = channelmonitorrequesttemplateDescBodyOverrideMode.Validators[0].(func(string) error)
- compositemodelrouteMixin := schema.CompositeModelRoute{}.Mixin()
- compositemodelrouteMixinHooks1 := compositemodelrouteMixin[1].Hooks()
- compositemodelroute.Hooks[0] = compositemodelrouteMixinHooks1[0]
- compositemodelrouteMixinInters1 := compositemodelrouteMixin[1].Interceptors()
- compositemodelroute.Interceptors[0] = compositemodelrouteMixinInters1[0]
- compositemodelrouteMixinFields0 := compositemodelrouteMixin[0].Fields()
- _ = compositemodelrouteMixinFields0
- compositemodelrouteFields := schema.CompositeModelRoute{}.Fields()
- _ = compositemodelrouteFields
- // compositemodelrouteDescCreatedAt is the schema descriptor for created_at field.
- compositemodelrouteDescCreatedAt := compositemodelrouteMixinFields0[0].Descriptor()
- // compositemodelroute.DefaultCreatedAt holds the default value on creation for the created_at field.
- compositemodelroute.DefaultCreatedAt = compositemodelrouteDescCreatedAt.Default.(func() time.Time)
- // compositemodelrouteDescUpdatedAt is the schema descriptor for updated_at field.
- compositemodelrouteDescUpdatedAt := compositemodelrouteMixinFields0[1].Descriptor()
- // compositemodelroute.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- compositemodelroute.DefaultUpdatedAt = compositemodelrouteDescUpdatedAt.Default.(func() time.Time)
- // compositemodelroute.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- compositemodelroute.UpdateDefaultUpdatedAt = compositemodelrouteDescUpdatedAt.UpdateDefault.(func() time.Time)
- // compositemodelrouteDescPublicModel is the schema descriptor for public_model field.
- compositemodelrouteDescPublicModel := compositemodelrouteFields[1].Descriptor()
- // compositemodelroute.PublicModelValidator is a validator for the "public_model" field. It is called by the builders before save.
- compositemodelroute.PublicModelValidator = func() func(string) error {
- validators := compositemodelrouteDescPublicModel.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(public_model string) error {
- for _, fn := range fns {
- if err := fn(public_model); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // compositemodelrouteDescMatchType is the schema descriptor for match_type field.
- compositemodelrouteDescMatchType := compositemodelrouteFields[2].Descriptor()
- // compositemodelroute.DefaultMatchType holds the default value on creation for the match_type field.
- compositemodelroute.DefaultMatchType = compositemodelrouteDescMatchType.Default.(string)
- // compositemodelroute.MatchTypeValidator is a validator for the "match_type" field. It is called by the builders before save.
- compositemodelroute.MatchTypeValidator = compositemodelrouteDescMatchType.Validators[0].(func(string) error)
- // compositemodelrouteDescTargetPlatform is the schema descriptor for target_platform field.
- compositemodelrouteDescTargetPlatform := compositemodelrouteFields[3].Descriptor()
- // compositemodelroute.DefaultTargetPlatform holds the default value on creation for the target_platform field.
- compositemodelroute.DefaultTargetPlatform = compositemodelrouteDescTargetPlatform.Default.(string)
- // compositemodelroute.TargetPlatformValidator is a validator for the "target_platform" field. It is called by the builders before save.
- compositemodelroute.TargetPlatformValidator = compositemodelrouteDescTargetPlatform.Validators[0].(func(string) error)
- // compositemodelrouteDescUpstreamModel is the schema descriptor for upstream_model field.
- compositemodelrouteDescUpstreamModel := compositemodelrouteFields[4].Descriptor()
- // compositemodelroute.DefaultUpstreamModel holds the default value on creation for the upstream_model field.
- compositemodelroute.DefaultUpstreamModel = compositemodelrouteDescUpstreamModel.Default.(string)
- // compositemodelroute.UpstreamModelValidator is a validator for the "upstream_model" field. It is called by the builders before save.
- compositemodelroute.UpstreamModelValidator = compositemodelrouteDescUpstreamModel.Validators[0].(func(string) error)
- // compositemodelrouteDescEndpoint is the schema descriptor for endpoint field.
- compositemodelrouteDescEndpoint := compositemodelrouteFields[5].Descriptor()
- // compositemodelroute.DefaultEndpoint holds the default value on creation for the endpoint field.
- compositemodelroute.DefaultEndpoint = compositemodelrouteDescEndpoint.Default.(string)
- // compositemodelroute.EndpointValidator is a validator for the "endpoint" field. It is called by the builders before save.
- compositemodelroute.EndpointValidator = compositemodelrouteDescEndpoint.Validators[0].(func(string) error)
- // compositemodelrouteDescPriority is the schema descriptor for priority field.
- compositemodelrouteDescPriority := compositemodelrouteFields[6].Descriptor()
- // compositemodelroute.DefaultPriority holds the default value on creation for the priority field.
- compositemodelroute.DefaultPriority = compositemodelrouteDescPriority.Default.(int)
- // compositemodelrouteDescEnabled is the schema descriptor for enabled field.
- compositemodelrouteDescEnabled := compositemodelrouteFields[7].Descriptor()
- // compositemodelroute.DefaultEnabled holds the default value on creation for the enabled field.
- compositemodelroute.DefaultEnabled = compositemodelrouteDescEnabled.Default.(bool)
- errorpassthroughruleMixin := schema.ErrorPassthroughRule{}.Mixin()
- errorpassthroughruleMixinFields0 := errorpassthroughruleMixin[0].Fields()
- _ = errorpassthroughruleMixinFields0
- errorpassthroughruleFields := schema.ErrorPassthroughRule{}.Fields()
- _ = errorpassthroughruleFields
- // errorpassthroughruleDescCreatedAt is the schema descriptor for created_at field.
- errorpassthroughruleDescCreatedAt := errorpassthroughruleMixinFields0[0].Descriptor()
- // errorpassthroughrule.DefaultCreatedAt holds the default value on creation for the created_at field.
- errorpassthroughrule.DefaultCreatedAt = errorpassthroughruleDescCreatedAt.Default.(func() time.Time)
- // errorpassthroughruleDescUpdatedAt is the schema descriptor for updated_at field.
- errorpassthroughruleDescUpdatedAt := errorpassthroughruleMixinFields0[1].Descriptor()
- // errorpassthroughrule.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- errorpassthroughrule.DefaultUpdatedAt = errorpassthroughruleDescUpdatedAt.Default.(func() time.Time)
- // errorpassthroughrule.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- errorpassthroughrule.UpdateDefaultUpdatedAt = errorpassthroughruleDescUpdatedAt.UpdateDefault.(func() time.Time)
- // errorpassthroughruleDescName is the schema descriptor for name field.
- errorpassthroughruleDescName := errorpassthroughruleFields[0].Descriptor()
- // errorpassthroughrule.NameValidator is a validator for the "name" field. It is called by the builders before save.
- errorpassthroughrule.NameValidator = func() func(string) error {
- validators := errorpassthroughruleDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // errorpassthroughruleDescEnabled is the schema descriptor for enabled field.
- errorpassthroughruleDescEnabled := errorpassthroughruleFields[1].Descriptor()
- // errorpassthroughrule.DefaultEnabled holds the default value on creation for the enabled field.
- errorpassthroughrule.DefaultEnabled = errorpassthroughruleDescEnabled.Default.(bool)
- // errorpassthroughruleDescPriority is the schema descriptor for priority field.
- errorpassthroughruleDescPriority := errorpassthroughruleFields[2].Descriptor()
- // errorpassthroughrule.DefaultPriority holds the default value on creation for the priority field.
- errorpassthroughrule.DefaultPriority = errorpassthroughruleDescPriority.Default.(int)
- // errorpassthroughruleDescMatchMode is the schema descriptor for match_mode field.
- errorpassthroughruleDescMatchMode := errorpassthroughruleFields[5].Descriptor()
- // errorpassthroughrule.DefaultMatchMode holds the default value on creation for the match_mode field.
- errorpassthroughrule.DefaultMatchMode = errorpassthroughruleDescMatchMode.Default.(string)
- // errorpassthroughrule.MatchModeValidator is a validator for the "match_mode" field. It is called by the builders before save.
- errorpassthroughrule.MatchModeValidator = errorpassthroughruleDescMatchMode.Validators[0].(func(string) error)
- // errorpassthroughruleDescPassthroughCode is the schema descriptor for passthrough_code field.
- errorpassthroughruleDescPassthroughCode := errorpassthroughruleFields[7].Descriptor()
- // errorpassthroughrule.DefaultPassthroughCode holds the default value on creation for the passthrough_code field.
- errorpassthroughrule.DefaultPassthroughCode = errorpassthroughruleDescPassthroughCode.Default.(bool)
- // errorpassthroughruleDescPassthroughBody is the schema descriptor for passthrough_body field.
- errorpassthroughruleDescPassthroughBody := errorpassthroughruleFields[9].Descriptor()
- // errorpassthroughrule.DefaultPassthroughBody holds the default value on creation for the passthrough_body field.
- errorpassthroughrule.DefaultPassthroughBody = errorpassthroughruleDescPassthroughBody.Default.(bool)
- // errorpassthroughruleDescSkipMonitoring is the schema descriptor for skip_monitoring field.
- errorpassthroughruleDescSkipMonitoring := errorpassthroughruleFields[11].Descriptor()
- // errorpassthroughrule.DefaultSkipMonitoring holds the default value on creation for the skip_monitoring field.
- errorpassthroughrule.DefaultSkipMonitoring = errorpassthroughruleDescSkipMonitoring.Default.(bool)
- groupMixin := schema.Group{}.Mixin()
- groupMixinHooks1 := groupMixin[1].Hooks()
- group.Hooks[0] = groupMixinHooks1[0]
- groupMixinInters1 := groupMixin[1].Interceptors()
- group.Interceptors[0] = groupMixinInters1[0]
- groupMixinFields0 := groupMixin[0].Fields()
- _ = groupMixinFields0
- groupFields := schema.Group{}.Fields()
- _ = groupFields
- // groupDescCreatedAt is the schema descriptor for created_at field.
- groupDescCreatedAt := groupMixinFields0[0].Descriptor()
- // group.DefaultCreatedAt holds the default value on creation for the created_at field.
- group.DefaultCreatedAt = groupDescCreatedAt.Default.(func() time.Time)
- // groupDescUpdatedAt is the schema descriptor for updated_at field.
- groupDescUpdatedAt := groupMixinFields0[1].Descriptor()
- // group.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- group.DefaultUpdatedAt = groupDescUpdatedAt.Default.(func() time.Time)
- // group.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- group.UpdateDefaultUpdatedAt = groupDescUpdatedAt.UpdateDefault.(func() time.Time)
- // groupDescName is the schema descriptor for name field.
- groupDescName := groupFields[0].Descriptor()
- // group.NameValidator is a validator for the "name" field. It is called by the builders before save.
- group.NameValidator = func() func(string) error {
- validators := groupDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // groupDescRateMultiplier is the schema descriptor for rate_multiplier field.
- groupDescRateMultiplier := groupFields[2].Descriptor()
- // group.DefaultRateMultiplier holds the default value on creation for the rate_multiplier field.
- group.DefaultRateMultiplier = groupDescRateMultiplier.Default.(float64)
- // groupDescPeakRateEnabled is the schema descriptor for peak_rate_enabled field.
- groupDescPeakRateEnabled := groupFields[3].Descriptor()
- // group.DefaultPeakRateEnabled holds the default value on creation for the peak_rate_enabled field.
- group.DefaultPeakRateEnabled = groupDescPeakRateEnabled.Default.(bool)
- // groupDescPeakStart is the schema descriptor for peak_start field.
- groupDescPeakStart := groupFields[4].Descriptor()
- // group.DefaultPeakStart holds the default value on creation for the peak_start field.
- group.DefaultPeakStart = groupDescPeakStart.Default.(string)
- // group.PeakStartValidator is a validator for the "peak_start" field. It is called by the builders before save.
- group.PeakStartValidator = groupDescPeakStart.Validators[0].(func(string) error)
- // groupDescPeakEnd is the schema descriptor for peak_end field.
- groupDescPeakEnd := groupFields[5].Descriptor()
- // group.DefaultPeakEnd holds the default value on creation for the peak_end field.
- group.DefaultPeakEnd = groupDescPeakEnd.Default.(string)
- // group.PeakEndValidator is a validator for the "peak_end" field. It is called by the builders before save.
- group.PeakEndValidator = groupDescPeakEnd.Validators[0].(func(string) error)
- // groupDescPeakRateMultiplier is the schema descriptor for peak_rate_multiplier field.
- groupDescPeakRateMultiplier := groupFields[6].Descriptor()
- // group.DefaultPeakRateMultiplier holds the default value on creation for the peak_rate_multiplier field.
- group.DefaultPeakRateMultiplier = groupDescPeakRateMultiplier.Default.(float64)
- // groupDescIsExclusive is the schema descriptor for is_exclusive field.
- groupDescIsExclusive := groupFields[7].Descriptor()
- // group.DefaultIsExclusive holds the default value on creation for the is_exclusive field.
- group.DefaultIsExclusive = groupDescIsExclusive.Default.(bool)
- // groupDescSecurityPolicyEnabled is the schema descriptor for security_policy_enabled field.
- groupDescSecurityPolicyEnabled := groupFields[8].Descriptor()
- // group.DefaultSecurityPolicyEnabled holds the default value on creation for the security_policy_enabled field.
- group.DefaultSecurityPolicyEnabled = groupDescSecurityPolicyEnabled.Default.(bool)
- // groupDescSecurityPolicyMode is the schema descriptor for security_policy_mode field.
- groupDescSecurityPolicyMode := groupFields[9].Descriptor()
- // group.DefaultSecurityPolicyMode holds the default value on creation for the security_policy_mode field.
- group.DefaultSecurityPolicyMode = groupDescSecurityPolicyMode.Default.(string)
- // group.SecurityPolicyModeValidator is a validator for the "security_policy_mode" field. It is called by the builders before save.
- group.SecurityPolicyModeValidator = groupDescSecurityPolicyMode.Validators[0].(func(string) error)
- // groupDescSecurityPolicyEmailEnabled is the schema descriptor for security_policy_email_enabled field.
- groupDescSecurityPolicyEmailEnabled := groupFields[10].Descriptor()
- // group.DefaultSecurityPolicyEmailEnabled holds the default value on creation for the security_policy_email_enabled field.
- group.DefaultSecurityPolicyEmailEnabled = groupDescSecurityPolicyEmailEnabled.Default.(bool)
- // groupDescStatus is the schema descriptor for status field.
- groupDescStatus := groupFields[11].Descriptor()
- // group.DefaultStatus holds the default value on creation for the status field.
- group.DefaultStatus = groupDescStatus.Default.(string)
- // group.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- group.StatusValidator = groupDescStatus.Validators[0].(func(string) error)
- // groupDescDuplicateOperationID is the schema descriptor for duplicate_operation_id field.
- groupDescDuplicateOperationID := groupFields[12].Descriptor()
- // group.DuplicateOperationIDValidator is a validator for the "duplicate_operation_id" field. It is called by the builders before save.
- group.DuplicateOperationIDValidator = groupDescDuplicateOperationID.Validators[0].(func(string) error)
- // groupDescPlatform is the schema descriptor for platform field.
- groupDescPlatform := groupFields[13].Descriptor()
- // group.DefaultPlatform holds the default value on creation for the platform field.
- group.DefaultPlatform = groupDescPlatform.Default.(string)
- // group.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
- group.PlatformValidator = groupDescPlatform.Validators[0].(func(string) error)
- // groupDescSubscriptionType is the schema descriptor for subscription_type field.
- groupDescSubscriptionType := groupFields[14].Descriptor()
- // group.DefaultSubscriptionType holds the default value on creation for the subscription_type field.
- group.DefaultSubscriptionType = groupDescSubscriptionType.Default.(string)
- // group.SubscriptionTypeValidator is a validator for the "subscription_type" field. It is called by the builders before save.
- group.SubscriptionTypeValidator = groupDescSubscriptionType.Validators[0].(func(string) error)
- // groupDescDefaultValidityDays is the schema descriptor for default_validity_days field.
- groupDescDefaultValidityDays := groupFields[18].Descriptor()
- // group.DefaultDefaultValidityDays holds the default value on creation for the default_validity_days field.
- group.DefaultDefaultValidityDays = groupDescDefaultValidityDays.Default.(int)
- // groupDescAllowImageGeneration is the schema descriptor for allow_image_generation field.
- groupDescAllowImageGeneration := groupFields[19].Descriptor()
- // group.DefaultAllowImageGeneration holds the default value on creation for the allow_image_generation field.
- group.DefaultAllowImageGeneration = groupDescAllowImageGeneration.Default.(bool)
- // groupDescAllowBatchImageGeneration is the schema descriptor for allow_batch_image_generation field.
- groupDescAllowBatchImageGeneration := groupFields[20].Descriptor()
- // group.DefaultAllowBatchImageGeneration holds the default value on creation for the allow_batch_image_generation field.
- group.DefaultAllowBatchImageGeneration = groupDescAllowBatchImageGeneration.Default.(bool)
- // groupDescImageRateIndependent is the schema descriptor for image_rate_independent field.
- groupDescImageRateIndependent := groupFields[21].Descriptor()
- // group.DefaultImageRateIndependent holds the default value on creation for the image_rate_independent field.
- group.DefaultImageRateIndependent = groupDescImageRateIndependent.Default.(bool)
- // groupDescImageRateMultiplier is the schema descriptor for image_rate_multiplier field.
- groupDescImageRateMultiplier := groupFields[22].Descriptor()
- // group.DefaultImageRateMultiplier holds the default value on creation for the image_rate_multiplier field.
- group.DefaultImageRateMultiplier = groupDescImageRateMultiplier.Default.(float64)
- // groupDescBatchImageDiscountMultiplier is the schema descriptor for batch_image_discount_multiplier field.
- groupDescBatchImageDiscountMultiplier := groupFields[26].Descriptor()
- // group.DefaultBatchImageDiscountMultiplier holds the default value on creation for the batch_image_discount_multiplier field.
- group.DefaultBatchImageDiscountMultiplier = groupDescBatchImageDiscountMultiplier.Default.(float64)
- // groupDescBatchImageHoldMultiplier is the schema descriptor for batch_image_hold_multiplier field.
- groupDescBatchImageHoldMultiplier := groupFields[27].Descriptor()
- // group.DefaultBatchImageHoldMultiplier holds the default value on creation for the batch_image_hold_multiplier field.
- group.DefaultBatchImageHoldMultiplier = groupDescBatchImageHoldMultiplier.Default.(float64)
- // groupDescVideoRateIndependent is the schema descriptor for video_rate_independent field.
- groupDescVideoRateIndependent := groupFields[28].Descriptor()
- // group.DefaultVideoRateIndependent holds the default value on creation for the video_rate_independent field.
- group.DefaultVideoRateIndependent = groupDescVideoRateIndependent.Default.(bool)
- // groupDescVideoRateMultiplier is the schema descriptor for video_rate_multiplier field.
- groupDescVideoRateMultiplier := groupFields[29].Descriptor()
- // group.DefaultVideoRateMultiplier holds the default value on creation for the video_rate_multiplier field.
- group.DefaultVideoRateMultiplier = groupDescVideoRateMultiplier.Default.(float64)
- // groupDescSearchPricePer1k is the schema descriptor for search_price_per_1k field.
- groupDescSearchPricePer1k := groupFields[35].Descriptor()
- // group.SearchPricePer1kValidator is a validator for the "search_price_per_1k" field. It is called by the builders before save.
- group.SearchPricePer1kValidator = groupDescSearchPricePer1k.Validators[0].(func(float64) error)
- // groupDescAudioRealtimePricePerMin is the schema descriptor for audio_realtime_price_per_min field.
- groupDescAudioRealtimePricePerMin := groupFields[36].Descriptor()
- // group.AudioRealtimePricePerMinValidator is a validator for the "audio_realtime_price_per_min" field. It is called by the builders before save.
- group.AudioRealtimePricePerMinValidator = groupDescAudioRealtimePricePerMin.Validators[0].(func(float64) error)
- // groupDescAudioTtsPricePerMillionChars is the schema descriptor for audio_tts_price_per_million_chars field.
- groupDescAudioTtsPricePerMillionChars := groupFields[37].Descriptor()
- // group.AudioTtsPricePerMillionCharsValidator is a validator for the "audio_tts_price_per_million_chars" field. It is called by the builders before save.
- group.AudioTtsPricePerMillionCharsValidator = groupDescAudioTtsPricePerMillionChars.Validators[0].(func(float64) error)
- // groupDescAudioSttPricePerHour is the schema descriptor for audio_stt_price_per_hour field.
- groupDescAudioSttPricePerHour := groupFields[38].Descriptor()
- // group.AudioSttPricePerHourValidator is a validator for the "audio_stt_price_per_hour" field. It is called by the builders before save.
- group.AudioSttPricePerHourValidator = groupDescAudioSttPricePerHour.Validators[0].(func(float64) error)
- // groupDescLongContextPricingEnabled is the schema descriptor for long_context_pricing_enabled field.
- groupDescLongContextPricingEnabled := groupFields[39].Descriptor()
- // group.DefaultLongContextPricingEnabled holds the default value on creation for the long_context_pricing_enabled field.
- group.DefaultLongContextPricingEnabled = groupDescLongContextPricingEnabled.Default.(bool)
- // groupDescClaudeCodeOnly is the schema descriptor for claude_code_only field.
- groupDescClaudeCodeOnly := groupFields[41].Descriptor()
- // group.DefaultClaudeCodeOnly holds the default value on creation for the claude_code_only field.
- group.DefaultClaudeCodeOnly = groupDescClaudeCodeOnly.Default.(bool)
- // groupDescModelRoutingEnabled is the schema descriptor for model_routing_enabled field.
- groupDescModelRoutingEnabled := groupFields[45].Descriptor()
- // group.DefaultModelRoutingEnabled holds the default value on creation for the model_routing_enabled field.
- group.DefaultModelRoutingEnabled = groupDescModelRoutingEnabled.Default.(bool)
- // groupDescMcpXMLInject is the schema descriptor for mcp_xml_inject field.
- groupDescMcpXMLInject := groupFields[46].Descriptor()
- // group.DefaultMcpXMLInject holds the default value on creation for the mcp_xml_inject field.
- group.DefaultMcpXMLInject = groupDescMcpXMLInject.Default.(bool)
- // groupDescSupportedModelScopes is the schema descriptor for supported_model_scopes field.
- groupDescSupportedModelScopes := groupFields[47].Descriptor()
- // group.DefaultSupportedModelScopes holds the default value on creation for the supported_model_scopes field.
- group.DefaultSupportedModelScopes = groupDescSupportedModelScopes.Default.([]string)
- // groupDescSortOrder is the schema descriptor for sort_order field.
- groupDescSortOrder := groupFields[48].Descriptor()
- // group.DefaultSortOrder holds the default value on creation for the sort_order field.
- group.DefaultSortOrder = groupDescSortOrder.Default.(int)
- // groupDescAllowMessagesDispatch is the schema descriptor for allow_messages_dispatch field.
- groupDescAllowMessagesDispatch := groupFields[49].Descriptor()
- // group.DefaultAllowMessagesDispatch holds the default value on creation for the allow_messages_dispatch field.
- group.DefaultAllowMessagesDispatch = groupDescAllowMessagesDispatch.Default.(bool)
- // groupDescAllowLive is the schema descriptor for allow_live field.
- groupDescAllowLive := groupFields[50].Descriptor()
- // group.DefaultAllowLive holds the default value on creation for the allow_live field.
- group.DefaultAllowLive = groupDescAllowLive.Default.(bool)
- // groupDescForceOpenaiFast is the schema descriptor for force_openai_fast field.
- groupDescForceOpenaiFast := groupFields[51].Descriptor()
- // group.DefaultForceOpenaiFast holds the default value on creation for the force_openai_fast field.
- group.DefaultForceOpenaiFast = groupDescForceOpenaiFast.Default.(bool)
- // groupDescFreeOpenaiFast is the schema descriptor for free_openai_fast field.
- groupDescFreeOpenaiFast := groupFields[52].Descriptor()
- // group.DefaultFreeOpenaiFast holds the default value on creation for the free_openai_fast field.
- group.DefaultFreeOpenaiFast = groupDescFreeOpenaiFast.Default.(bool)
- // groupDescRequireOauthOnly is the schema descriptor for require_oauth_only field.
- groupDescRequireOauthOnly := groupFields[53].Descriptor()
- // group.DefaultRequireOauthOnly holds the default value on creation for the require_oauth_only field.
- group.DefaultRequireOauthOnly = groupDescRequireOauthOnly.Default.(bool)
- // groupDescRequirePrivacySet is the schema descriptor for require_privacy_set field.
- groupDescRequirePrivacySet := groupFields[54].Descriptor()
- // group.DefaultRequirePrivacySet holds the default value on creation for the require_privacy_set field.
- group.DefaultRequirePrivacySet = groupDescRequirePrivacySet.Default.(bool)
- // groupDescDefaultMappedModel is the schema descriptor for default_mapped_model field.
- groupDescDefaultMappedModel := groupFields[55].Descriptor()
- // group.DefaultDefaultMappedModel holds the default value on creation for the default_mapped_model field.
- group.DefaultDefaultMappedModel = groupDescDefaultMappedModel.Default.(string)
- // group.DefaultMappedModelValidator is a validator for the "default_mapped_model" field. It is called by the builders before save.
- group.DefaultMappedModelValidator = groupDescDefaultMappedModel.Validators[0].(func(string) error)
- // groupDescMessagesDispatchModelConfig is the schema descriptor for messages_dispatch_model_config field.
- groupDescMessagesDispatchModelConfig := groupFields[56].Descriptor()
- // group.DefaultMessagesDispatchModelConfig holds the default value on creation for the messages_dispatch_model_config field.
- group.DefaultMessagesDispatchModelConfig = groupDescMessagesDispatchModelConfig.Default.(domain.OpenAIMessagesDispatchModelConfig)
- // groupDescModelAllowlist is the schema descriptor for model_allowlist field.
- groupDescModelAllowlist := groupFields[57].Descriptor()
- // group.DefaultModelAllowlist holds the default value on creation for the model_allowlist field.
- group.DefaultModelAllowlist = groupDescModelAllowlist.Default.(domain.GroupModelAllowlist)
- // groupDescCodexModelsManifestConfig is the schema descriptor for codex_models_manifest_config field.
- groupDescCodexModelsManifestConfig := groupFields[58].Descriptor()
- // group.DefaultCodexModelsManifestConfig holds the default value on creation for the codex_models_manifest_config field.
- group.DefaultCodexModelsManifestConfig = groupDescCodexModelsManifestConfig.Default.(domain.GroupCodexModelsManifestConfig)
- // groupDescRpmLimit is the schema descriptor for rpm_limit field.
- groupDescRpmLimit := groupFields[59].Descriptor()
- // group.DefaultRpmLimit holds the default value on creation for the rpm_limit field.
- group.DefaultRpmLimit = groupDescRpmLimit.Default.(int)
- // groupDescMaxReasoningEffort is the schema descriptor for max_reasoning_effort field.
- groupDescMaxReasoningEffort := groupFields[60].Descriptor()
- // group.DefaultMaxReasoningEffort holds the default value on creation for the max_reasoning_effort field.
- group.DefaultMaxReasoningEffort = groupDescMaxReasoningEffort.Default.(string)
- // group.MaxReasoningEffortValidator is a validator for the "max_reasoning_effort" field. It is called by the builders before save.
- group.MaxReasoningEffortValidator = groupDescMaxReasoningEffort.Validators[0].(func(string) error)
- // groupDescMaxReasoningEffortOverLimit is the schema descriptor for max_reasoning_effort_over_limit field.
- groupDescMaxReasoningEffortOverLimit := groupFields[61].Descriptor()
- // group.DefaultMaxReasoningEffortOverLimit holds the default value on creation for the max_reasoning_effort_over_limit field.
- group.DefaultMaxReasoningEffortOverLimit = groupDescMaxReasoningEffortOverLimit.Default.(string)
- // group.MaxReasoningEffortOverLimitValidator is a validator for the "max_reasoning_effort_over_limit" field. It is called by the builders before save.
- group.MaxReasoningEffortOverLimitValidator = groupDescMaxReasoningEffortOverLimit.Validators[0].(func(string) error)
- // groupDescReasoningEffortMappings is the schema descriptor for reasoning_effort_mappings field.
- groupDescReasoningEffortMappings := groupFields[62].Descriptor()
- // group.DefaultReasoningEffortMappings holds the default value on creation for the reasoning_effort_mappings field.
- group.DefaultReasoningEffortMappings = groupDescReasoningEffortMappings.Default.([]domain.ReasoningEffortMapping)
- // groupDescProfitControlEnabled is the schema descriptor for profit_control_enabled field.
- groupDescProfitControlEnabled := groupFields[63].Descriptor()
- // group.DefaultProfitControlEnabled holds the default value on creation for the profit_control_enabled field.
- group.DefaultProfitControlEnabled = groupDescProfitControlEnabled.Default.(bool)
- // groupDescProfitMinMargin is the schema descriptor for profit_min_margin field.
- groupDescProfitMinMargin := groupFields[64].Descriptor()
- // group.DefaultProfitMinMargin holds the default value on creation for the profit_min_margin field.
- group.DefaultProfitMinMargin = groupDescProfitMinMargin.Default.(float64)
- // groupDescProfitSafetyBuffer is the schema descriptor for profit_safety_buffer field.
- groupDescProfitSafetyBuffer := groupFields[65].Descriptor()
- // group.DefaultProfitSafetyBuffer holds the default value on creation for the profit_safety_buffer field.
- group.DefaultProfitSafetyBuffer = groupDescProfitSafetyBuffer.Default.(float64)
- idempotencyrecordMixin := schema.IdempotencyRecord{}.Mixin()
- idempotencyrecordMixinFields0 := idempotencyrecordMixin[0].Fields()
- _ = idempotencyrecordMixinFields0
- idempotencyrecordFields := schema.IdempotencyRecord{}.Fields()
- _ = idempotencyrecordFields
- // idempotencyrecordDescCreatedAt is the schema descriptor for created_at field.
- idempotencyrecordDescCreatedAt := idempotencyrecordMixinFields0[0].Descriptor()
- // idempotencyrecord.DefaultCreatedAt holds the default value on creation for the created_at field.
- idempotencyrecord.DefaultCreatedAt = idempotencyrecordDescCreatedAt.Default.(func() time.Time)
- // idempotencyrecordDescUpdatedAt is the schema descriptor for updated_at field.
- idempotencyrecordDescUpdatedAt := idempotencyrecordMixinFields0[1].Descriptor()
- // idempotencyrecord.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- idempotencyrecord.DefaultUpdatedAt = idempotencyrecordDescUpdatedAt.Default.(func() time.Time)
- // idempotencyrecord.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- idempotencyrecord.UpdateDefaultUpdatedAt = idempotencyrecordDescUpdatedAt.UpdateDefault.(func() time.Time)
- // idempotencyrecordDescScope is the schema descriptor for scope field.
- idempotencyrecordDescScope := idempotencyrecordFields[0].Descriptor()
- // idempotencyrecord.ScopeValidator is a validator for the "scope" field. It is called by the builders before save.
- idempotencyrecord.ScopeValidator = idempotencyrecordDescScope.Validators[0].(func(string) error)
- // idempotencyrecordDescIdempotencyKeyHash is the schema descriptor for idempotency_key_hash field.
- idempotencyrecordDescIdempotencyKeyHash := idempotencyrecordFields[1].Descriptor()
- // idempotencyrecord.IdempotencyKeyHashValidator is a validator for the "idempotency_key_hash" field. It is called by the builders before save.
- idempotencyrecord.IdempotencyKeyHashValidator = idempotencyrecordDescIdempotencyKeyHash.Validators[0].(func(string) error)
- // idempotencyrecordDescRequestFingerprint is the schema descriptor for request_fingerprint field.
- idempotencyrecordDescRequestFingerprint := idempotencyrecordFields[2].Descriptor()
- // idempotencyrecord.RequestFingerprintValidator is a validator for the "request_fingerprint" field. It is called by the builders before save.
- idempotencyrecord.RequestFingerprintValidator = idempotencyrecordDescRequestFingerprint.Validators[0].(func(string) error)
- // idempotencyrecordDescStatus is the schema descriptor for status field.
- idempotencyrecordDescStatus := idempotencyrecordFields[3].Descriptor()
- // idempotencyrecord.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- idempotencyrecord.StatusValidator = idempotencyrecordDescStatus.Validators[0].(func(string) error)
- // idempotencyrecordDescErrorReason is the schema descriptor for error_reason field.
- idempotencyrecordDescErrorReason := idempotencyrecordFields[6].Descriptor()
- // idempotencyrecord.ErrorReasonValidator is a validator for the "error_reason" field. It is called by the builders before save.
- idempotencyrecord.ErrorReasonValidator = idempotencyrecordDescErrorReason.Validators[0].(func(string) error)
- identityadoptiondecisionMixin := schema.IdentityAdoptionDecision{}.Mixin()
- identityadoptiondecisionMixinFields0 := identityadoptiondecisionMixin[0].Fields()
- _ = identityadoptiondecisionMixinFields0
- identityadoptiondecisionFields := schema.IdentityAdoptionDecision{}.Fields()
- _ = identityadoptiondecisionFields
- // identityadoptiondecisionDescCreatedAt is the schema descriptor for created_at field.
- identityadoptiondecisionDescCreatedAt := identityadoptiondecisionMixinFields0[0].Descriptor()
- // identityadoptiondecision.DefaultCreatedAt holds the default value on creation for the created_at field.
- identityadoptiondecision.DefaultCreatedAt = identityadoptiondecisionDescCreatedAt.Default.(func() time.Time)
- // identityadoptiondecisionDescUpdatedAt is the schema descriptor for updated_at field.
- identityadoptiondecisionDescUpdatedAt := identityadoptiondecisionMixinFields0[1].Descriptor()
- // identityadoptiondecision.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- identityadoptiondecision.DefaultUpdatedAt = identityadoptiondecisionDescUpdatedAt.Default.(func() time.Time)
- // identityadoptiondecision.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- identityadoptiondecision.UpdateDefaultUpdatedAt = identityadoptiondecisionDescUpdatedAt.UpdateDefault.(func() time.Time)
- // identityadoptiondecisionDescAdoptDisplayName is the schema descriptor for adopt_display_name field.
- identityadoptiondecisionDescAdoptDisplayName := identityadoptiondecisionFields[2].Descriptor()
- // identityadoptiondecision.DefaultAdoptDisplayName holds the default value on creation for the adopt_display_name field.
- identityadoptiondecision.DefaultAdoptDisplayName = identityadoptiondecisionDescAdoptDisplayName.Default.(bool)
- // identityadoptiondecisionDescAdoptAvatar is the schema descriptor for adopt_avatar field.
- identityadoptiondecisionDescAdoptAvatar := identityadoptiondecisionFields[3].Descriptor()
- // identityadoptiondecision.DefaultAdoptAvatar holds the default value on creation for the adopt_avatar field.
- identityadoptiondecision.DefaultAdoptAvatar = identityadoptiondecisionDescAdoptAvatar.Default.(bool)
- // identityadoptiondecisionDescDecidedAt is the schema descriptor for decided_at field.
- identityadoptiondecisionDescDecidedAt := identityadoptiondecisionFields[4].Descriptor()
- // identityadoptiondecision.DefaultDecidedAt holds the default value on creation for the decided_at field.
- identityadoptiondecision.DefaultDecidedAt = identityadoptiondecisionDescDecidedAt.Default.(func() time.Time)
- paymentauditlogFields := schema.PaymentAuditLog{}.Fields()
- _ = paymentauditlogFields
- // paymentauditlogDescOrderID is the schema descriptor for order_id field.
- paymentauditlogDescOrderID := paymentauditlogFields[0].Descriptor()
- // paymentauditlog.OrderIDValidator is a validator for the "order_id" field. It is called by the builders before save.
- paymentauditlog.OrderIDValidator = paymentauditlogDescOrderID.Validators[0].(func(string) error)
- // paymentauditlogDescAction is the schema descriptor for action field.
- paymentauditlogDescAction := paymentauditlogFields[1].Descriptor()
- // paymentauditlog.ActionValidator is a validator for the "action" field. It is called by the builders before save.
- paymentauditlog.ActionValidator = paymentauditlogDescAction.Validators[0].(func(string) error)
- // paymentauditlogDescDetail is the schema descriptor for detail field.
- paymentauditlogDescDetail := paymentauditlogFields[2].Descriptor()
- // paymentauditlog.DefaultDetail holds the default value on creation for the detail field.
- paymentauditlog.DefaultDetail = paymentauditlogDescDetail.Default.(string)
- // paymentauditlogDescOperator is the schema descriptor for operator field.
- paymentauditlogDescOperator := paymentauditlogFields[3].Descriptor()
- // paymentauditlog.DefaultOperator holds the default value on creation for the operator field.
- paymentauditlog.DefaultOperator = paymentauditlogDescOperator.Default.(string)
- // paymentauditlog.OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
- paymentauditlog.OperatorValidator = paymentauditlogDescOperator.Validators[0].(func(string) error)
- // paymentauditlogDescCreatedAt is the schema descriptor for created_at field.
- paymentauditlogDescCreatedAt := paymentauditlogFields[4].Descriptor()
- // paymentauditlog.DefaultCreatedAt holds the default value on creation for the created_at field.
- paymentauditlog.DefaultCreatedAt = paymentauditlogDescCreatedAt.Default.(func() time.Time)
- paymentorderFields := schema.PaymentOrder{}.Fields()
- _ = paymentorderFields
- // paymentorderDescUserEmail is the schema descriptor for user_email field.
- paymentorderDescUserEmail := paymentorderFields[1].Descriptor()
- // paymentorder.UserEmailValidator is a validator for the "user_email" field. It is called by the builders before save.
- paymentorder.UserEmailValidator = paymentorderDescUserEmail.Validators[0].(func(string) error)
- // paymentorderDescUserName is the schema descriptor for user_name field.
- paymentorderDescUserName := paymentorderFields[2].Descriptor()
- // paymentorder.UserNameValidator is a validator for the "user_name" field. It is called by the builders before save.
- paymentorder.UserNameValidator = paymentorderDescUserName.Validators[0].(func(string) error)
- // paymentorderDescFeeRate is the schema descriptor for fee_rate field.
- paymentorderDescFeeRate := paymentorderFields[6].Descriptor()
- // paymentorder.DefaultFeeRate holds the default value on creation for the fee_rate field.
- paymentorder.DefaultFeeRate = paymentorderDescFeeRate.Default.(float64)
- // paymentorderDescRechargeCode is the schema descriptor for recharge_code field.
- paymentorderDescRechargeCode := paymentorderFields[7].Descriptor()
- // paymentorder.RechargeCodeValidator is a validator for the "recharge_code" field. It is called by the builders before save.
- paymentorder.RechargeCodeValidator = paymentorderDescRechargeCode.Validators[0].(func(string) error)
- // paymentorderDescOutTradeNo is the schema descriptor for out_trade_no field.
- paymentorderDescOutTradeNo := paymentorderFields[8].Descriptor()
- // paymentorder.DefaultOutTradeNo holds the default value on creation for the out_trade_no field.
- paymentorder.DefaultOutTradeNo = paymentorderDescOutTradeNo.Default.(string)
- // paymentorder.OutTradeNoValidator is a validator for the "out_trade_no" field. It is called by the builders before save.
- paymentorder.OutTradeNoValidator = paymentorderDescOutTradeNo.Validators[0].(func(string) error)
- // paymentorderDescPaymentType is the schema descriptor for payment_type field.
- paymentorderDescPaymentType := paymentorderFields[9].Descriptor()
- // paymentorder.PaymentTypeValidator is a validator for the "payment_type" field. It is called by the builders before save.
- paymentorder.PaymentTypeValidator = paymentorderDescPaymentType.Validators[0].(func(string) error)
- // paymentorderDescPaymentTradeNo is the schema descriptor for payment_trade_no field.
- paymentorderDescPaymentTradeNo := paymentorderFields[10].Descriptor()
- // paymentorder.PaymentTradeNoValidator is a validator for the "payment_trade_no" field. It is called by the builders before save.
- paymentorder.PaymentTradeNoValidator = paymentorderDescPaymentTradeNo.Validators[0].(func(string) error)
- // paymentorderDescOrderType is the schema descriptor for order_type field.
- paymentorderDescOrderType := paymentorderFields[14].Descriptor()
- // paymentorder.DefaultOrderType holds the default value on creation for the order_type field.
- paymentorder.DefaultOrderType = paymentorderDescOrderType.Default.(string)
- // paymentorder.OrderTypeValidator is a validator for the "order_type" field. It is called by the builders before save.
- paymentorder.OrderTypeValidator = paymentorderDescOrderType.Validators[0].(func(string) error)
- // paymentorderDescProviderInstanceID is the schema descriptor for provider_instance_id field.
- paymentorderDescProviderInstanceID := paymentorderFields[18].Descriptor()
- // paymentorder.ProviderInstanceIDValidator is a validator for the "provider_instance_id" field. It is called by the builders before save.
- paymentorder.ProviderInstanceIDValidator = paymentorderDescProviderInstanceID.Validators[0].(func(string) error)
- // paymentorderDescProviderKey is the schema descriptor for provider_key field.
- paymentorderDescProviderKey := paymentorderFields[19].Descriptor()
- // paymentorder.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
- paymentorder.ProviderKeyValidator = paymentorderDescProviderKey.Validators[0].(func(string) error)
- // paymentorderDescStatus is the schema descriptor for status field.
- paymentorderDescStatus := paymentorderFields[21].Descriptor()
- // paymentorder.DefaultStatus holds the default value on creation for the status field.
- paymentorder.DefaultStatus = paymentorderDescStatus.Default.(string)
- // paymentorder.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- paymentorder.StatusValidator = paymentorderDescStatus.Validators[0].(func(string) error)
- // paymentorderDescRefundAmount is the schema descriptor for refund_amount field.
- paymentorderDescRefundAmount := paymentorderFields[22].Descriptor()
- // paymentorder.DefaultRefundAmount holds the default value on creation for the refund_amount field.
- paymentorder.DefaultRefundAmount = paymentorderDescRefundAmount.Default.(float64)
- // paymentorderDescForceRefund is the schema descriptor for force_refund field.
- paymentorderDescForceRefund := paymentorderFields[25].Descriptor()
- // paymentorder.DefaultForceRefund holds the default value on creation for the force_refund field.
- paymentorder.DefaultForceRefund = paymentorderDescForceRefund.Default.(bool)
- // paymentorderDescRefundRequestedBy is the schema descriptor for refund_requested_by field.
- paymentorderDescRefundRequestedBy := paymentorderFields[28].Descriptor()
- // paymentorder.RefundRequestedByValidator is a validator for the "refund_requested_by" field. It is called by the builders before save.
- paymentorder.RefundRequestedByValidator = paymentorderDescRefundRequestedBy.Validators[0].(func(string) error)
- // paymentorderDescClientIP is the schema descriptor for client_ip field.
- paymentorderDescClientIP := paymentorderFields[34].Descriptor()
- // paymentorder.ClientIPValidator is a validator for the "client_ip" field. It is called by the builders before save.
- paymentorder.ClientIPValidator = paymentorderDescClientIP.Validators[0].(func(string) error)
- // paymentorderDescSrcHost is the schema descriptor for src_host field.
- paymentorderDescSrcHost := paymentorderFields[35].Descriptor()
- // paymentorder.SrcHostValidator is a validator for the "src_host" field. It is called by the builders before save.
- paymentorder.SrcHostValidator = paymentorderDescSrcHost.Validators[0].(func(string) error)
- // paymentorderDescCreatedAt is the schema descriptor for created_at field.
- paymentorderDescCreatedAt := paymentorderFields[37].Descriptor()
- // paymentorder.DefaultCreatedAt holds the default value on creation for the created_at field.
- paymentorder.DefaultCreatedAt = paymentorderDescCreatedAt.Default.(func() time.Time)
- // paymentorderDescUpdatedAt is the schema descriptor for updated_at field.
- paymentorderDescUpdatedAt := paymentorderFields[38].Descriptor()
- // paymentorder.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- paymentorder.DefaultUpdatedAt = paymentorderDescUpdatedAt.Default.(func() time.Time)
- // paymentorder.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- paymentorder.UpdateDefaultUpdatedAt = paymentorderDescUpdatedAt.UpdateDefault.(func() time.Time)
- paymentproviderinstanceFields := schema.PaymentProviderInstance{}.Fields()
- _ = paymentproviderinstanceFields
- // paymentproviderinstanceDescProviderKey is the schema descriptor for provider_key field.
- paymentproviderinstanceDescProviderKey := paymentproviderinstanceFields[0].Descriptor()
- // paymentproviderinstance.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
- paymentproviderinstance.ProviderKeyValidator = func() func(string) error {
- validators := paymentproviderinstanceDescProviderKey.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(provider_key string) error {
- for _, fn := range fns {
- if err := fn(provider_key); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // paymentproviderinstanceDescName is the schema descriptor for name field.
- paymentproviderinstanceDescName := paymentproviderinstanceFields[1].Descriptor()
- // paymentproviderinstance.DefaultName holds the default value on creation for the name field.
- paymentproviderinstance.DefaultName = paymentproviderinstanceDescName.Default.(string)
- // paymentproviderinstance.NameValidator is a validator for the "name" field. It is called by the builders before save.
- paymentproviderinstance.NameValidator = paymentproviderinstanceDescName.Validators[0].(func(string) error)
- // paymentproviderinstanceDescSupportedTypes is the schema descriptor for supported_types field.
- paymentproviderinstanceDescSupportedTypes := paymentproviderinstanceFields[3].Descriptor()
- // paymentproviderinstance.DefaultSupportedTypes holds the default value on creation for the supported_types field.
- paymentproviderinstance.DefaultSupportedTypes = paymentproviderinstanceDescSupportedTypes.Default.(string)
- // paymentproviderinstance.SupportedTypesValidator is a validator for the "supported_types" field. It is called by the builders before save.
- paymentproviderinstance.SupportedTypesValidator = paymentproviderinstanceDescSupportedTypes.Validators[0].(func(string) error)
- // paymentproviderinstanceDescEnabled is the schema descriptor for enabled field.
- paymentproviderinstanceDescEnabled := paymentproviderinstanceFields[4].Descriptor()
- // paymentproviderinstance.DefaultEnabled holds the default value on creation for the enabled field.
- paymentproviderinstance.DefaultEnabled = paymentproviderinstanceDescEnabled.Default.(bool)
- // paymentproviderinstanceDescPaymentMode is the schema descriptor for payment_mode field.
- paymentproviderinstanceDescPaymentMode := paymentproviderinstanceFields[5].Descriptor()
- // paymentproviderinstance.DefaultPaymentMode holds the default value on creation for the payment_mode field.
- paymentproviderinstance.DefaultPaymentMode = paymentproviderinstanceDescPaymentMode.Default.(string)
- // paymentproviderinstance.PaymentModeValidator is a validator for the "payment_mode" field. It is called by the builders before save.
- paymentproviderinstance.PaymentModeValidator = paymentproviderinstanceDescPaymentMode.Validators[0].(func(string) error)
- // paymentproviderinstanceDescSortOrder is the schema descriptor for sort_order field.
- paymentproviderinstanceDescSortOrder := paymentproviderinstanceFields[6].Descriptor()
- // paymentproviderinstance.DefaultSortOrder holds the default value on creation for the sort_order field.
- paymentproviderinstance.DefaultSortOrder = paymentproviderinstanceDescSortOrder.Default.(int)
- // paymentproviderinstanceDescLimits is the schema descriptor for limits field.
- paymentproviderinstanceDescLimits := paymentproviderinstanceFields[7].Descriptor()
- // paymentproviderinstance.DefaultLimits holds the default value on creation for the limits field.
- paymentproviderinstance.DefaultLimits = paymentproviderinstanceDescLimits.Default.(string)
- // paymentproviderinstanceDescRefundEnabled is the schema descriptor for refund_enabled field.
- paymentproviderinstanceDescRefundEnabled := paymentproviderinstanceFields[8].Descriptor()
- // paymentproviderinstance.DefaultRefundEnabled holds the default value on creation for the refund_enabled field.
- paymentproviderinstance.DefaultRefundEnabled = paymentproviderinstanceDescRefundEnabled.Default.(bool)
- // paymentproviderinstanceDescAllowUserRefund is the schema descriptor for allow_user_refund field.
- paymentproviderinstanceDescAllowUserRefund := paymentproviderinstanceFields[9].Descriptor()
- // paymentproviderinstance.DefaultAllowUserRefund holds the default value on creation for the allow_user_refund field.
- paymentproviderinstance.DefaultAllowUserRefund = paymentproviderinstanceDescAllowUserRefund.Default.(bool)
- // paymentproviderinstanceDescCreatedAt is the schema descriptor for created_at field.
- paymentproviderinstanceDescCreatedAt := paymentproviderinstanceFields[10].Descriptor()
- // paymentproviderinstance.DefaultCreatedAt holds the default value on creation for the created_at field.
- paymentproviderinstance.DefaultCreatedAt = paymentproviderinstanceDescCreatedAt.Default.(func() time.Time)
- // paymentproviderinstanceDescUpdatedAt is the schema descriptor for updated_at field.
- paymentproviderinstanceDescUpdatedAt := paymentproviderinstanceFields[11].Descriptor()
- // paymentproviderinstance.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- paymentproviderinstance.DefaultUpdatedAt = paymentproviderinstanceDescUpdatedAt.Default.(func() time.Time)
- // paymentproviderinstance.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- paymentproviderinstance.UpdateDefaultUpdatedAt = paymentproviderinstanceDescUpdatedAt.UpdateDefault.(func() time.Time)
- pendingauthsessionMixin := schema.PendingAuthSession{}.Mixin()
- pendingauthsessionMixinFields0 := pendingauthsessionMixin[0].Fields()
- _ = pendingauthsessionMixinFields0
- pendingauthsessionFields := schema.PendingAuthSession{}.Fields()
- _ = pendingauthsessionFields
- // pendingauthsessionDescCreatedAt is the schema descriptor for created_at field.
- pendingauthsessionDescCreatedAt := pendingauthsessionMixinFields0[0].Descriptor()
- // pendingauthsession.DefaultCreatedAt holds the default value on creation for the created_at field.
- pendingauthsession.DefaultCreatedAt = pendingauthsessionDescCreatedAt.Default.(func() time.Time)
- // pendingauthsessionDescUpdatedAt is the schema descriptor for updated_at field.
- pendingauthsessionDescUpdatedAt := pendingauthsessionMixinFields0[1].Descriptor()
- // pendingauthsession.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- pendingauthsession.DefaultUpdatedAt = pendingauthsessionDescUpdatedAt.Default.(func() time.Time)
- // pendingauthsession.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- pendingauthsession.UpdateDefaultUpdatedAt = pendingauthsessionDescUpdatedAt.UpdateDefault.(func() time.Time)
- // pendingauthsessionDescSessionToken is the schema descriptor for session_token field.
- pendingauthsessionDescSessionToken := pendingauthsessionFields[0].Descriptor()
- // pendingauthsession.SessionTokenValidator is a validator for the "session_token" field. It is called by the builders before save.
- pendingauthsession.SessionTokenValidator = func() func(string) error {
- validators := pendingauthsessionDescSessionToken.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(session_token string) error {
- for _, fn := range fns {
- if err := fn(session_token); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // pendingauthsessionDescIntent is the schema descriptor for intent field.
- pendingauthsessionDescIntent := pendingauthsessionFields[1].Descriptor()
- // pendingauthsession.IntentValidator is a validator for the "intent" field. It is called by the builders before save.
- pendingauthsession.IntentValidator = func() func(string) error {
- validators := pendingauthsessionDescIntent.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- validators[2].(func(string) error),
- }
- return func(intent string) error {
- for _, fn := range fns {
- if err := fn(intent); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // pendingauthsessionDescProviderType is the schema descriptor for provider_type field.
- pendingauthsessionDescProviderType := pendingauthsessionFields[2].Descriptor()
- // pendingauthsession.ProviderTypeValidator is a validator for the "provider_type" field. It is called by the builders before save.
- pendingauthsession.ProviderTypeValidator = func() func(string) error {
- validators := pendingauthsessionDescProviderType.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- validators[2].(func(string) error),
- }
- return func(provider_type string) error {
- for _, fn := range fns {
- if err := fn(provider_type); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // pendingauthsessionDescProviderKey is the schema descriptor for provider_key field.
- pendingauthsessionDescProviderKey := pendingauthsessionFields[3].Descriptor()
- // pendingauthsession.ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
- pendingauthsession.ProviderKeyValidator = pendingauthsessionDescProviderKey.Validators[0].(func(string) error)
- // pendingauthsessionDescProviderSubject is the schema descriptor for provider_subject field.
- pendingauthsessionDescProviderSubject := pendingauthsessionFields[4].Descriptor()
- // pendingauthsession.ProviderSubjectValidator is a validator for the "provider_subject" field. It is called by the builders before save.
- pendingauthsession.ProviderSubjectValidator = pendingauthsessionDescProviderSubject.Validators[0].(func(string) error)
- // pendingauthsessionDescRedirectTo is the schema descriptor for redirect_to field.
- pendingauthsessionDescRedirectTo := pendingauthsessionFields[6].Descriptor()
- // pendingauthsession.DefaultRedirectTo holds the default value on creation for the redirect_to field.
- pendingauthsession.DefaultRedirectTo = pendingauthsessionDescRedirectTo.Default.(string)
- // pendingauthsessionDescResolvedEmail is the schema descriptor for resolved_email field.
- pendingauthsessionDescResolvedEmail := pendingauthsessionFields[7].Descriptor()
- // pendingauthsession.DefaultResolvedEmail holds the default value on creation for the resolved_email field.
- pendingauthsession.DefaultResolvedEmail = pendingauthsessionDescResolvedEmail.Default.(string)
- // pendingauthsessionDescRegistrationPasswordHash is the schema descriptor for registration_password_hash field.
- pendingauthsessionDescRegistrationPasswordHash := pendingauthsessionFields[8].Descriptor()
- // pendingauthsession.DefaultRegistrationPasswordHash holds the default value on creation for the registration_password_hash field.
- pendingauthsession.DefaultRegistrationPasswordHash = pendingauthsessionDescRegistrationPasswordHash.Default.(string)
- // pendingauthsessionDescUpstreamIdentityClaims is the schema descriptor for upstream_identity_claims field.
- pendingauthsessionDescUpstreamIdentityClaims := pendingauthsessionFields[9].Descriptor()
- // pendingauthsession.DefaultUpstreamIdentityClaims holds the default value on creation for the upstream_identity_claims field.
- pendingauthsession.DefaultUpstreamIdentityClaims = pendingauthsessionDescUpstreamIdentityClaims.Default.(func() map[string]interface{})
- // pendingauthsessionDescLocalFlowState is the schema descriptor for local_flow_state field.
- pendingauthsessionDescLocalFlowState := pendingauthsessionFields[10].Descriptor()
- // pendingauthsession.DefaultLocalFlowState holds the default value on creation for the local_flow_state field.
- pendingauthsession.DefaultLocalFlowState = pendingauthsessionDescLocalFlowState.Default.(func() map[string]interface{})
- // pendingauthsessionDescBrowserSessionKey is the schema descriptor for browser_session_key field.
- pendingauthsessionDescBrowserSessionKey := pendingauthsessionFields[11].Descriptor()
- // pendingauthsession.DefaultBrowserSessionKey holds the default value on creation for the browser_session_key field.
- pendingauthsession.DefaultBrowserSessionKey = pendingauthsessionDescBrowserSessionKey.Default.(string)
- // pendingauthsessionDescCompletionCodeHash is the schema descriptor for completion_code_hash field.
- pendingauthsessionDescCompletionCodeHash := pendingauthsessionFields[12].Descriptor()
- // pendingauthsession.DefaultCompletionCodeHash holds the default value on creation for the completion_code_hash field.
- pendingauthsession.DefaultCompletionCodeHash = pendingauthsessionDescCompletionCodeHash.Default.(string)
- promocodeFields := schema.PromoCode{}.Fields()
- _ = promocodeFields
- // promocodeDescCode is the schema descriptor for code field.
- promocodeDescCode := promocodeFields[0].Descriptor()
- // promocode.CodeValidator is a validator for the "code" field. It is called by the builders before save.
- promocode.CodeValidator = func() func(string) error {
- validators := promocodeDescCode.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(code string) error {
- for _, fn := range fns {
- if err := fn(code); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // promocodeDescBonusAmount is the schema descriptor for bonus_amount field.
- promocodeDescBonusAmount := promocodeFields[1].Descriptor()
- // promocode.DefaultBonusAmount holds the default value on creation for the bonus_amount field.
- promocode.DefaultBonusAmount = promocodeDescBonusAmount.Default.(float64)
- // promocodeDescMaxUses is the schema descriptor for max_uses field.
- promocodeDescMaxUses := promocodeFields[2].Descriptor()
- // promocode.DefaultMaxUses holds the default value on creation for the max_uses field.
- promocode.DefaultMaxUses = promocodeDescMaxUses.Default.(int)
- // promocodeDescUsedCount is the schema descriptor for used_count field.
- promocodeDescUsedCount := promocodeFields[3].Descriptor()
- // promocode.DefaultUsedCount holds the default value on creation for the used_count field.
- promocode.DefaultUsedCount = promocodeDescUsedCount.Default.(int)
- // promocodeDescStatus is the schema descriptor for status field.
- promocodeDescStatus := promocodeFields[4].Descriptor()
- // promocode.DefaultStatus holds the default value on creation for the status field.
- promocode.DefaultStatus = promocodeDescStatus.Default.(string)
- // promocode.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- promocode.StatusValidator = promocodeDescStatus.Validators[0].(func(string) error)
- // promocodeDescCreatedAt is the schema descriptor for created_at field.
- promocodeDescCreatedAt := promocodeFields[7].Descriptor()
- // promocode.DefaultCreatedAt holds the default value on creation for the created_at field.
- promocode.DefaultCreatedAt = promocodeDescCreatedAt.Default.(func() time.Time)
- // promocodeDescUpdatedAt is the schema descriptor for updated_at field.
- promocodeDescUpdatedAt := promocodeFields[8].Descriptor()
- // promocode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- promocode.DefaultUpdatedAt = promocodeDescUpdatedAt.Default.(func() time.Time)
- // promocode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- promocode.UpdateDefaultUpdatedAt = promocodeDescUpdatedAt.UpdateDefault.(func() time.Time)
- promocodeusageFields := schema.PromoCodeUsage{}.Fields()
- _ = promocodeusageFields
- // promocodeusageDescUsedAt is the schema descriptor for used_at field.
- promocodeusageDescUsedAt := promocodeusageFields[3].Descriptor()
- // promocodeusage.DefaultUsedAt holds the default value on creation for the used_at field.
- promocodeusage.DefaultUsedAt = promocodeusageDescUsedAt.Default.(func() time.Time)
- proxyMixin := schema.Proxy{}.Mixin()
- proxyMixinHooks1 := proxyMixin[1].Hooks()
- proxy.Hooks[0] = proxyMixinHooks1[0]
- proxyMixinInters1 := proxyMixin[1].Interceptors()
- proxy.Interceptors[0] = proxyMixinInters1[0]
- proxyMixinFields0 := proxyMixin[0].Fields()
- _ = proxyMixinFields0
- proxyFields := schema.Proxy{}.Fields()
- _ = proxyFields
- // proxyDescCreatedAt is the schema descriptor for created_at field.
- proxyDescCreatedAt := proxyMixinFields0[0].Descriptor()
- // proxy.DefaultCreatedAt holds the default value on creation for the created_at field.
- proxy.DefaultCreatedAt = proxyDescCreatedAt.Default.(func() time.Time)
- // proxyDescUpdatedAt is the schema descriptor for updated_at field.
- proxyDescUpdatedAt := proxyMixinFields0[1].Descriptor()
- // proxy.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- proxy.DefaultUpdatedAt = proxyDescUpdatedAt.Default.(func() time.Time)
- // proxy.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- proxy.UpdateDefaultUpdatedAt = proxyDescUpdatedAt.UpdateDefault.(func() time.Time)
- // proxyDescName is the schema descriptor for name field.
- proxyDescName := proxyFields[0].Descriptor()
- // proxy.NameValidator is a validator for the "name" field. It is called by the builders before save.
- proxy.NameValidator = func() func(string) error {
- validators := proxyDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // proxyDescProtocol is the schema descriptor for protocol field.
- proxyDescProtocol := proxyFields[1].Descriptor()
- // proxy.ProtocolValidator is a validator for the "protocol" field. It is called by the builders before save.
- proxy.ProtocolValidator = func() func(string) error {
- validators := proxyDescProtocol.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(protocol string) error {
- for _, fn := range fns {
- if err := fn(protocol); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // proxyDescHost is the schema descriptor for host field.
- proxyDescHost := proxyFields[2].Descriptor()
- // proxy.HostValidator is a validator for the "host" field. It is called by the builders before save.
- proxy.HostValidator = func() func(string) error {
- validators := proxyDescHost.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(host string) error {
- for _, fn := range fns {
- if err := fn(host); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // proxyDescUsername is the schema descriptor for username field.
- proxyDescUsername := proxyFields[4].Descriptor()
- // proxy.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
- proxy.UsernameValidator = proxyDescUsername.Validators[0].(func(string) error)
- // proxyDescPassword is the schema descriptor for password field.
- proxyDescPassword := proxyFields[5].Descriptor()
- // proxy.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
- proxy.PasswordValidator = proxyDescPassword.Validators[0].(func(string) error)
- // proxyDescStatus is the schema descriptor for status field.
- proxyDescStatus := proxyFields[6].Descriptor()
- // proxy.DefaultStatus holds the default value on creation for the status field.
- proxy.DefaultStatus = proxyDescStatus.Default.(string)
- // proxy.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- proxy.StatusValidator = proxyDescStatus.Validators[0].(func(string) error)
- // proxyDescFallbackMode is the schema descriptor for fallback_mode field.
- proxyDescFallbackMode := proxyFields[8].Descriptor()
- // proxy.DefaultFallbackMode holds the default value on creation for the fallback_mode field.
- proxy.DefaultFallbackMode = proxyDescFallbackMode.Default.(string)
- // proxy.FallbackModeValidator is a validator for the "fallback_mode" field. It is called by the builders before save.
- proxy.FallbackModeValidator = proxyDescFallbackMode.Validators[0].(func(string) error)
- // proxyDescExpiryWarnDays is the schema descriptor for expiry_warn_days field.
- proxyDescExpiryWarnDays := proxyFields[10].Descriptor()
- // proxy.DefaultExpiryWarnDays holds the default value on creation for the expiry_warn_days field.
- proxy.DefaultExpiryWarnDays = proxyDescExpiryWarnDays.Default.(int)
- redeemcodeFields := schema.RedeemCode{}.Fields()
- _ = redeemcodeFields
- // redeemcodeDescCode is the schema descriptor for code field.
- redeemcodeDescCode := redeemcodeFields[0].Descriptor()
- // redeemcode.CodeValidator is a validator for the "code" field. It is called by the builders before save.
- redeemcode.CodeValidator = func() func(string) error {
- validators := redeemcodeDescCode.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(code string) error {
- for _, fn := range fns {
- if err := fn(code); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // redeemcodeDescType is the schema descriptor for type field.
- redeemcodeDescType := redeemcodeFields[1].Descriptor()
- // redeemcode.DefaultType holds the default value on creation for the type field.
- redeemcode.DefaultType = redeemcodeDescType.Default.(string)
- // redeemcode.TypeValidator is a validator for the "type" field. It is called by the builders before save.
- redeemcode.TypeValidator = redeemcodeDescType.Validators[0].(func(string) error)
- // redeemcodeDescValue is the schema descriptor for value field.
- redeemcodeDescValue := redeemcodeFields[2].Descriptor()
- // redeemcode.DefaultValue holds the default value on creation for the value field.
- redeemcode.DefaultValue = redeemcodeDescValue.Default.(float64)
- // redeemcodeDescStatus is the schema descriptor for status field.
- redeemcodeDescStatus := redeemcodeFields[3].Descriptor()
- // redeemcode.DefaultStatus holds the default value on creation for the status field.
- redeemcode.DefaultStatus = redeemcodeDescStatus.Default.(string)
- // redeemcode.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- redeemcode.StatusValidator = redeemcodeDescStatus.Validators[0].(func(string) error)
- // redeemcodeDescCreatedAt is the schema descriptor for created_at field.
- redeemcodeDescCreatedAt := redeemcodeFields[7].Descriptor()
- // redeemcode.DefaultCreatedAt holds the default value on creation for the created_at field.
- redeemcode.DefaultCreatedAt = redeemcodeDescCreatedAt.Default.(func() time.Time)
- // redeemcodeDescValidityDays is the schema descriptor for validity_days field.
- redeemcodeDescValidityDays := redeemcodeFields[10].Descriptor()
- // redeemcode.DefaultValidityDays holds the default value on creation for the validity_days field.
- redeemcode.DefaultValidityDays = redeemcodeDescValidityDays.Default.(int)
- securitypolicykeywordMixin := schema.SecurityPolicyKeyword{}.Mixin()
- securitypolicykeywordMixinHooks1 := securitypolicykeywordMixin[1].Hooks()
- securitypolicykeyword.Hooks[0] = securitypolicykeywordMixinHooks1[0]
- securitypolicykeywordMixinInters1 := securitypolicykeywordMixin[1].Interceptors()
- securitypolicykeyword.Interceptors[0] = securitypolicykeywordMixinInters1[0]
- securitypolicykeywordMixinFields0 := securitypolicykeywordMixin[0].Fields()
- _ = securitypolicykeywordMixinFields0
- securitypolicykeywordFields := schema.SecurityPolicyKeyword{}.Fields()
- _ = securitypolicykeywordFields
- // securitypolicykeywordDescCreatedAt is the schema descriptor for created_at field.
- securitypolicykeywordDescCreatedAt := securitypolicykeywordMixinFields0[0].Descriptor()
- // securitypolicykeyword.DefaultCreatedAt holds the default value on creation for the created_at field.
- securitypolicykeyword.DefaultCreatedAt = securitypolicykeywordDescCreatedAt.Default.(func() time.Time)
- // securitypolicykeywordDescUpdatedAt is the schema descriptor for updated_at field.
- securitypolicykeywordDescUpdatedAt := securitypolicykeywordMixinFields0[1].Descriptor()
- // securitypolicykeyword.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- securitypolicykeyword.DefaultUpdatedAt = securitypolicykeywordDescUpdatedAt.Default.(func() time.Time)
- // securitypolicykeyword.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- securitypolicykeyword.UpdateDefaultUpdatedAt = securitypolicykeywordDescUpdatedAt.UpdateDefault.(func() time.Time)
- // securitypolicykeywordDescKeyword is the schema descriptor for keyword field.
- securitypolicykeywordDescKeyword := securitypolicykeywordFields[1].Descriptor()
- // securitypolicykeyword.KeywordValidator is a validator for the "keyword" field. It is called by the builders before save.
- securitypolicykeyword.KeywordValidator = func() func(string) error {
- validators := securitypolicykeywordDescKeyword.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(keyword string) error {
- for _, fn := range fns {
- if err := fn(keyword); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // securitypolicykeywordDescCategory is the schema descriptor for category field.
- securitypolicykeywordDescCategory := securitypolicykeywordFields[2].Descriptor()
- // securitypolicykeyword.DefaultCategory holds the default value on creation for the category field.
- securitypolicykeyword.DefaultCategory = securitypolicykeywordDescCategory.Default.(string)
- // securitypolicykeyword.CategoryValidator is a validator for the "category" field. It is called by the builders before save.
- securitypolicykeyword.CategoryValidator = securitypolicykeywordDescCategory.Validators[0].(func(string) error)
- // securitypolicykeywordDescEnabled is the schema descriptor for enabled field.
- securitypolicykeywordDescEnabled := securitypolicykeywordFields[3].Descriptor()
- // securitypolicykeyword.DefaultEnabled holds the default value on creation for the enabled field.
- securitypolicykeyword.DefaultEnabled = securitypolicykeywordDescEnabled.Default.(bool)
- securitysecretMixin := schema.SecuritySecret{}.Mixin()
- securitysecretMixinFields0 := securitysecretMixin[0].Fields()
- _ = securitysecretMixinFields0
- securitysecretFields := schema.SecuritySecret{}.Fields()
- _ = securitysecretFields
- // securitysecretDescCreatedAt is the schema descriptor for created_at field.
- securitysecretDescCreatedAt := securitysecretMixinFields0[0].Descriptor()
- // securitysecret.DefaultCreatedAt holds the default value on creation for the created_at field.
- securitysecret.DefaultCreatedAt = securitysecretDescCreatedAt.Default.(func() time.Time)
- // securitysecretDescUpdatedAt is the schema descriptor for updated_at field.
- securitysecretDescUpdatedAt := securitysecretMixinFields0[1].Descriptor()
- // securitysecret.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- securitysecret.DefaultUpdatedAt = securitysecretDescUpdatedAt.Default.(func() time.Time)
- // securitysecret.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- securitysecret.UpdateDefaultUpdatedAt = securitysecretDescUpdatedAt.UpdateDefault.(func() time.Time)
- // securitysecretDescKey is the schema descriptor for key field.
- securitysecretDescKey := securitysecretFields[0].Descriptor()
- // securitysecret.KeyValidator is a validator for the "key" field. It is called by the builders before save.
- securitysecret.KeyValidator = func() func(string) error {
- validators := securitysecretDescKey.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(key string) error {
- for _, fn := range fns {
- if err := fn(key); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // securitysecretDescValue is the schema descriptor for value field.
- securitysecretDescValue := securitysecretFields[1].Descriptor()
- // securitysecret.ValueValidator is a validator for the "value" field. It is called by the builders before save.
- securitysecret.ValueValidator = securitysecretDescValue.Validators[0].(func(string) error)
- settingFields := schema.Setting{}.Fields()
- _ = settingFields
- // settingDescKey is the schema descriptor for key field.
- settingDescKey := settingFields[0].Descriptor()
- // setting.KeyValidator is a validator for the "key" field. It is called by the builders before save.
- setting.KeyValidator = func() func(string) error {
- validators := settingDescKey.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(key string) error {
- for _, fn := range fns {
- if err := fn(key); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // settingDescUpdatedAt is the schema descriptor for updated_at field.
- settingDescUpdatedAt := settingFields[2].Descriptor()
- // setting.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- setting.DefaultUpdatedAt = settingDescUpdatedAt.Default.(func() time.Time)
- // setting.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- setting.UpdateDefaultUpdatedAt = settingDescUpdatedAt.UpdateDefault.(func() time.Time)
- subscriptionplanFields := schema.SubscriptionPlan{}.Fields()
- _ = subscriptionplanFields
- // subscriptionplanDescName is the schema descriptor for name field.
- subscriptionplanDescName := subscriptionplanFields[1].Descriptor()
- // subscriptionplan.NameValidator is a validator for the "name" field. It is called by the builders before save.
- subscriptionplan.NameValidator = func() func(string) error {
- validators := subscriptionplanDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // subscriptionplanDescDescription is the schema descriptor for description field.
- subscriptionplanDescDescription := subscriptionplanFields[2].Descriptor()
- // subscriptionplan.DefaultDescription holds the default value on creation for the description field.
- subscriptionplan.DefaultDescription = subscriptionplanDescDescription.Default.(string)
- // subscriptionplanDescCurrency is the schema descriptor for currency field.
- subscriptionplanDescCurrency := subscriptionplanFields[5].Descriptor()
- // subscriptionplan.DefaultCurrency holds the default value on creation for the currency field.
- subscriptionplan.DefaultCurrency = subscriptionplanDescCurrency.Default.(string)
- // subscriptionplan.CurrencyValidator is a validator for the "currency" field. It is called by the builders before save.
- subscriptionplan.CurrencyValidator = subscriptionplanDescCurrency.Validators[0].(func(string) error)
- // subscriptionplanDescValidityDays is the schema descriptor for validity_days field.
- subscriptionplanDescValidityDays := subscriptionplanFields[6].Descriptor()
- // subscriptionplan.DefaultValidityDays holds the default value on creation for the validity_days field.
- subscriptionplan.DefaultValidityDays = subscriptionplanDescValidityDays.Default.(int)
- // subscriptionplanDescValidityUnit is the schema descriptor for validity_unit field.
- subscriptionplanDescValidityUnit := subscriptionplanFields[7].Descriptor()
- // subscriptionplan.DefaultValidityUnit holds the default value on creation for the validity_unit field.
- subscriptionplan.DefaultValidityUnit = subscriptionplanDescValidityUnit.Default.(string)
- // subscriptionplan.ValidityUnitValidator is a validator for the "validity_unit" field. It is called by the builders before save.
- subscriptionplan.ValidityUnitValidator = subscriptionplanDescValidityUnit.Validators[0].(func(string) error)
- // subscriptionplanDescFeatures is the schema descriptor for features field.
- subscriptionplanDescFeatures := subscriptionplanFields[8].Descriptor()
- // subscriptionplan.DefaultFeatures holds the default value on creation for the features field.
- subscriptionplan.DefaultFeatures = subscriptionplanDescFeatures.Default.(string)
- // subscriptionplanDescProductName is the schema descriptor for product_name field.
- subscriptionplanDescProductName := subscriptionplanFields[9].Descriptor()
- // subscriptionplan.DefaultProductName holds the default value on creation for the product_name field.
- subscriptionplan.DefaultProductName = subscriptionplanDescProductName.Default.(string)
- // subscriptionplan.ProductNameValidator is a validator for the "product_name" field. It is called by the builders before save.
- subscriptionplan.ProductNameValidator = subscriptionplanDescProductName.Validators[0].(func(string) error)
- // subscriptionplanDescForSale is the schema descriptor for for_sale field.
- subscriptionplanDescForSale := subscriptionplanFields[10].Descriptor()
- // subscriptionplan.DefaultForSale holds the default value on creation for the for_sale field.
- subscriptionplan.DefaultForSale = subscriptionplanDescForSale.Default.(bool)
- // subscriptionplanDescSortOrder is the schema descriptor for sort_order field.
- subscriptionplanDescSortOrder := subscriptionplanFields[11].Descriptor()
- // subscriptionplan.DefaultSortOrder holds the default value on creation for the sort_order field.
- subscriptionplan.DefaultSortOrder = subscriptionplanDescSortOrder.Default.(int)
- // subscriptionplanDescCreatedAt is the schema descriptor for created_at field.
- subscriptionplanDescCreatedAt := subscriptionplanFields[12].Descriptor()
- // subscriptionplan.DefaultCreatedAt holds the default value on creation for the created_at field.
- subscriptionplan.DefaultCreatedAt = subscriptionplanDescCreatedAt.Default.(func() time.Time)
- // subscriptionplanDescUpdatedAt is the schema descriptor for updated_at field.
- subscriptionplanDescUpdatedAt := subscriptionplanFields[13].Descriptor()
- // subscriptionplan.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- subscriptionplan.DefaultUpdatedAt = subscriptionplanDescUpdatedAt.Default.(func() time.Time)
- // subscriptionplan.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- subscriptionplan.UpdateDefaultUpdatedAt = subscriptionplanDescUpdatedAt.UpdateDefault.(func() time.Time)
- tlsfingerprintprofileMixin := schema.TLSFingerprintProfile{}.Mixin()
- tlsfingerprintprofileMixinFields0 := tlsfingerprintprofileMixin[0].Fields()
- _ = tlsfingerprintprofileMixinFields0
- tlsfingerprintprofileFields := schema.TLSFingerprintProfile{}.Fields()
- _ = tlsfingerprintprofileFields
- // tlsfingerprintprofileDescCreatedAt is the schema descriptor for created_at field.
- tlsfingerprintprofileDescCreatedAt := tlsfingerprintprofileMixinFields0[0].Descriptor()
- // tlsfingerprintprofile.DefaultCreatedAt holds the default value on creation for the created_at field.
- tlsfingerprintprofile.DefaultCreatedAt = tlsfingerprintprofileDescCreatedAt.Default.(func() time.Time)
- // tlsfingerprintprofileDescUpdatedAt is the schema descriptor for updated_at field.
- tlsfingerprintprofileDescUpdatedAt := tlsfingerprintprofileMixinFields0[1].Descriptor()
- // tlsfingerprintprofile.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- tlsfingerprintprofile.DefaultUpdatedAt = tlsfingerprintprofileDescUpdatedAt.Default.(func() time.Time)
- // tlsfingerprintprofile.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- tlsfingerprintprofile.UpdateDefaultUpdatedAt = tlsfingerprintprofileDescUpdatedAt.UpdateDefault.(func() time.Time)
- // tlsfingerprintprofileDescName is the schema descriptor for name field.
- tlsfingerprintprofileDescName := tlsfingerprintprofileFields[0].Descriptor()
- // tlsfingerprintprofile.NameValidator is a validator for the "name" field. It is called by the builders before save.
- tlsfingerprintprofile.NameValidator = func() func(string) error {
- validators := tlsfingerprintprofileDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // tlsfingerprintprofileDescEnableGrease is the schema descriptor for enable_grease field.
- tlsfingerprintprofileDescEnableGrease := tlsfingerprintprofileFields[2].Descriptor()
- // tlsfingerprintprofile.DefaultEnableGrease holds the default value on creation for the enable_grease field.
- tlsfingerprintprofile.DefaultEnableGrease = tlsfingerprintprofileDescEnableGrease.Default.(bool)
- usagecleanuptaskMixin := schema.UsageCleanupTask{}.Mixin()
- usagecleanuptaskMixinFields0 := usagecleanuptaskMixin[0].Fields()
- _ = usagecleanuptaskMixinFields0
- usagecleanuptaskFields := schema.UsageCleanupTask{}.Fields()
- _ = usagecleanuptaskFields
- // usagecleanuptaskDescCreatedAt is the schema descriptor for created_at field.
- usagecleanuptaskDescCreatedAt := usagecleanuptaskMixinFields0[0].Descriptor()
- // usagecleanuptask.DefaultCreatedAt holds the default value on creation for the created_at field.
- usagecleanuptask.DefaultCreatedAt = usagecleanuptaskDescCreatedAt.Default.(func() time.Time)
- // usagecleanuptaskDescUpdatedAt is the schema descriptor for updated_at field.
- usagecleanuptaskDescUpdatedAt := usagecleanuptaskMixinFields0[1].Descriptor()
- // usagecleanuptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- usagecleanuptask.DefaultUpdatedAt = usagecleanuptaskDescUpdatedAt.Default.(func() time.Time)
- // usagecleanuptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- usagecleanuptask.UpdateDefaultUpdatedAt = usagecleanuptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
- // usagecleanuptaskDescStatus is the schema descriptor for status field.
- usagecleanuptaskDescStatus := usagecleanuptaskFields[0].Descriptor()
- // usagecleanuptask.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- usagecleanuptask.StatusValidator = func() func(string) error {
- validators := usagecleanuptaskDescStatus.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(status string) error {
- for _, fn := range fns {
- if err := fn(status); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // usagecleanuptaskDescDeletedRows is the schema descriptor for deleted_rows field.
- usagecleanuptaskDescDeletedRows := usagecleanuptaskFields[3].Descriptor()
- // usagecleanuptask.DefaultDeletedRows holds the default value on creation for the deleted_rows field.
- usagecleanuptask.DefaultDeletedRows = usagecleanuptaskDescDeletedRows.Default.(int64)
- usagelogFields := schema.UsageLog{}.Fields()
- _ = usagelogFields
- // usagelogDescRequestID is the schema descriptor for request_id field.
- usagelogDescRequestID := usagelogFields[3].Descriptor()
- // usagelog.RequestIDValidator is a validator for the "request_id" field. It is called by the builders before save.
- usagelog.RequestIDValidator = func() func(string) error {
- validators := usagelogDescRequestID.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(request_id string) error {
- for _, fn := range fns {
- if err := fn(request_id); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // usagelogDescModel is the schema descriptor for model field.
- usagelogDescModel := usagelogFields[4].Descriptor()
- // usagelog.ModelValidator is a validator for the "model" field. It is called by the builders before save.
- usagelog.ModelValidator = func() func(string) error {
- validators := usagelogDescModel.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(model string) error {
- for _, fn := range fns {
- if err := fn(model); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // usagelogDescRequestedModel is the schema descriptor for requested_model field.
- usagelogDescRequestedModel := usagelogFields[5].Descriptor()
- // usagelog.RequestedModelValidator is a validator for the "requested_model" field. It is called by the builders before save.
- usagelog.RequestedModelValidator = usagelogDescRequestedModel.Validators[0].(func(string) error)
- // usagelogDescUpstreamModel is the schema descriptor for upstream_model field.
- usagelogDescUpstreamModel := usagelogFields[6].Descriptor()
- // usagelog.UpstreamModelValidator is a validator for the "upstream_model" field. It is called by the builders before save.
- usagelog.UpstreamModelValidator = usagelogDescUpstreamModel.Validators[0].(func(string) error)
- // usagelogDescUpstreamResponseModel is the schema descriptor for upstream_response_model field.
- usagelogDescUpstreamResponseModel := usagelogFields[7].Descriptor()
- // usagelog.UpstreamResponseModelValidator is a validator for the "upstream_response_model" field. It is called by the builders before save.
- usagelog.UpstreamResponseModelValidator = usagelogDescUpstreamResponseModel.Validators[0].(func(string) error)
- // usagelogDescModelMappingChain is the schema descriptor for model_mapping_chain field.
- usagelogDescModelMappingChain := usagelogFields[10].Descriptor()
- // usagelog.ModelMappingChainValidator is a validator for the "model_mapping_chain" field. It is called by the builders before save.
- usagelog.ModelMappingChainValidator = usagelogDescModelMappingChain.Validators[0].(func(string) error)
- // usagelogDescBillingTier is the schema descriptor for billing_tier field.
- usagelogDescBillingTier := usagelogFields[11].Descriptor()
- // usagelog.BillingTierValidator is a validator for the "billing_tier" field. It is called by the builders before save.
- usagelog.BillingTierValidator = usagelogDescBillingTier.Validators[0].(func(string) error)
- // usagelogDescBillingMode is the schema descriptor for billing_mode field.
- usagelogDescBillingMode := usagelogFields[12].Descriptor()
- // usagelog.BillingModeValidator is a validator for the "billing_mode" field. It is called by the builders before save.
- usagelog.BillingModeValidator = usagelogDescBillingMode.Validators[0].(func(string) error)
- // usagelogDescInputTokens is the schema descriptor for input_tokens field.
- usagelogDescInputTokens := usagelogFields[15].Descriptor()
- // usagelog.DefaultInputTokens holds the default value on creation for the input_tokens field.
- usagelog.DefaultInputTokens = usagelogDescInputTokens.Default.(int)
- // usagelogDescOutputTokens is the schema descriptor for output_tokens field.
- usagelogDescOutputTokens := usagelogFields[16].Descriptor()
- // usagelog.DefaultOutputTokens holds the default value on creation for the output_tokens field.
- usagelog.DefaultOutputTokens = usagelogDescOutputTokens.Default.(int)
- // usagelogDescCacheCreationTokens is the schema descriptor for cache_creation_tokens field.
- usagelogDescCacheCreationTokens := usagelogFields[17].Descriptor()
- // usagelog.DefaultCacheCreationTokens holds the default value on creation for the cache_creation_tokens field.
- usagelog.DefaultCacheCreationTokens = usagelogDescCacheCreationTokens.Default.(int)
- // usagelogDescCacheReadTokens is the schema descriptor for cache_read_tokens field.
- usagelogDescCacheReadTokens := usagelogFields[18].Descriptor()
- // usagelog.DefaultCacheReadTokens holds the default value on creation for the cache_read_tokens field.
- usagelog.DefaultCacheReadTokens = usagelogDescCacheReadTokens.Default.(int)
- // usagelogDescCacheCreation5mTokens is the schema descriptor for cache_creation_5m_tokens field.
- usagelogDescCacheCreation5mTokens := usagelogFields[19].Descriptor()
- // usagelog.DefaultCacheCreation5mTokens holds the default value on creation for the cache_creation_5m_tokens field.
- usagelog.DefaultCacheCreation5mTokens = usagelogDescCacheCreation5mTokens.Default.(int)
- // usagelogDescCacheCreation1hTokens is the schema descriptor for cache_creation_1h_tokens field.
- usagelogDescCacheCreation1hTokens := usagelogFields[20].Descriptor()
- // usagelog.DefaultCacheCreation1hTokens holds the default value on creation for the cache_creation_1h_tokens field.
- usagelog.DefaultCacheCreation1hTokens = usagelogDescCacheCreation1hTokens.Default.(int)
- // usagelogDescInputCost is the schema descriptor for input_cost field.
- usagelogDescInputCost := usagelogFields[21].Descriptor()
- // usagelog.DefaultInputCost holds the default value on creation for the input_cost field.
- usagelog.DefaultInputCost = usagelogDescInputCost.Default.(float64)
- // usagelogDescOutputCost is the schema descriptor for output_cost field.
- usagelogDescOutputCost := usagelogFields[22].Descriptor()
- // usagelog.DefaultOutputCost holds the default value on creation for the output_cost field.
- usagelog.DefaultOutputCost = usagelogDescOutputCost.Default.(float64)
- // usagelogDescCacheCreationCost is the schema descriptor for cache_creation_cost field.
- usagelogDescCacheCreationCost := usagelogFields[23].Descriptor()
- // usagelog.DefaultCacheCreationCost holds the default value on creation for the cache_creation_cost field.
- usagelog.DefaultCacheCreationCost = usagelogDescCacheCreationCost.Default.(float64)
- // usagelogDescCacheReadCost is the schema descriptor for cache_read_cost field.
- usagelogDescCacheReadCost := usagelogFields[24].Descriptor()
- // usagelog.DefaultCacheReadCost holds the default value on creation for the cache_read_cost field.
- usagelog.DefaultCacheReadCost = usagelogDescCacheReadCost.Default.(float64)
- // usagelogDescTotalCost is the schema descriptor for total_cost field.
- usagelogDescTotalCost := usagelogFields[25].Descriptor()
- // usagelog.DefaultTotalCost holds the default value on creation for the total_cost field.
- usagelog.DefaultTotalCost = usagelogDescTotalCost.Default.(float64)
- // usagelogDescActualCost is the schema descriptor for actual_cost field.
- usagelogDescActualCost := usagelogFields[26].Descriptor()
- // usagelog.DefaultActualCost holds the default value on creation for the actual_cost field.
- usagelog.DefaultActualCost = usagelogDescActualCost.Default.(float64)
- // usagelogDescRateMultiplier is the schema descriptor for rate_multiplier field.
- usagelogDescRateMultiplier := usagelogFields[27].Descriptor()
- // usagelog.DefaultRateMultiplier holds the default value on creation for the rate_multiplier field.
- usagelog.DefaultRateMultiplier = usagelogDescRateMultiplier.Default.(float64)
- // usagelogDescLongContextBillingApplied is the schema descriptor for long_context_billing_applied field.
- usagelogDescLongContextBillingApplied := usagelogFields[28].Descriptor()
- // usagelog.DefaultLongContextBillingApplied holds the default value on creation for the long_context_billing_applied field.
- usagelog.DefaultLongContextBillingApplied = usagelogDescLongContextBillingApplied.Default.(bool)
- // usagelogDescBillingType is the schema descriptor for billing_type field.
- usagelogDescBillingType := usagelogFields[30].Descriptor()
- // usagelog.DefaultBillingType holds the default value on creation for the billing_type field.
- usagelog.DefaultBillingType = usagelogDescBillingType.Default.(int8)
- // usagelogDescStream is the schema descriptor for stream field.
- usagelogDescStream := usagelogFields[31].Descriptor()
- // usagelog.DefaultStream holds the default value on creation for the stream field.
- usagelog.DefaultStream = usagelogDescStream.Default.(bool)
- // usagelogDescUserAgent is the schema descriptor for user_agent field.
- usagelogDescUserAgent := usagelogFields[34].Descriptor()
- // usagelog.UserAgentValidator is a validator for the "user_agent" field. It is called by the builders before save.
- usagelog.UserAgentValidator = usagelogDescUserAgent.Validators[0].(func(string) error)
- // usagelogDescIPAddress is the schema descriptor for ip_address field.
- usagelogDescIPAddress := usagelogFields[35].Descriptor()
- // usagelog.IPAddressValidator is a validator for the "ip_address" field. It is called by the builders before save.
- usagelog.IPAddressValidator = usagelogDescIPAddress.Validators[0].(func(string) error)
- // usagelogDescImageCount is the schema descriptor for image_count field.
- usagelogDescImageCount := usagelogFields[36].Descriptor()
- // usagelog.DefaultImageCount holds the default value on creation for the image_count field.
- usagelog.DefaultImageCount = usagelogDescImageCount.Default.(int)
- // usagelogDescImageSize is the schema descriptor for image_size field.
- usagelogDescImageSize := usagelogFields[37].Descriptor()
- // usagelog.ImageSizeValidator is a validator for the "image_size" field. It is called by the builders before save.
- usagelog.ImageSizeValidator = usagelogDescImageSize.Validators[0].(func(string) error)
- // usagelogDescImageInputSize is the schema descriptor for image_input_size field.
- usagelogDescImageInputSize := usagelogFields[38].Descriptor()
- // usagelog.ImageInputSizeValidator is a validator for the "image_input_size" field. It is called by the builders before save.
- usagelog.ImageInputSizeValidator = usagelogDescImageInputSize.Validators[0].(func(string) error)
- // usagelogDescImageOutputSize is the schema descriptor for image_output_size field.
- usagelogDescImageOutputSize := usagelogFields[39].Descriptor()
- // usagelog.ImageOutputSizeValidator is a validator for the "image_output_size" field. It is called by the builders before save.
- usagelog.ImageOutputSizeValidator = usagelogDescImageOutputSize.Validators[0].(func(string) error)
- // usagelogDescImageSizeSource is the schema descriptor for image_size_source field.
- usagelogDescImageSizeSource := usagelogFields[40].Descriptor()
- // usagelog.ImageSizeSourceValidator is a validator for the "image_size_source" field. It is called by the builders before save.
- usagelog.ImageSizeSourceValidator = usagelogDescImageSizeSource.Validators[0].(func(string) error)
- // usagelogDescVideoCount is the schema descriptor for video_count field.
- usagelogDescVideoCount := usagelogFields[42].Descriptor()
- // usagelog.DefaultVideoCount holds the default value on creation for the video_count field.
- usagelog.DefaultVideoCount = usagelogDescVideoCount.Default.(int)
- // usagelogDescVideoResolution is the schema descriptor for video_resolution field.
- usagelogDescVideoResolution := usagelogFields[43].Descriptor()
- // usagelog.VideoResolutionValidator is a validator for the "video_resolution" field. It is called by the builders before save.
- usagelog.VideoResolutionValidator = usagelogDescVideoResolution.Validators[0].(func(string) error)
- // usagelogDescCacheTTLOverridden is the schema descriptor for cache_ttl_overridden field.
- usagelogDescCacheTTLOverridden := usagelogFields[45].Descriptor()
- // usagelog.DefaultCacheTTLOverridden holds the default value on creation for the cache_ttl_overridden field.
- usagelog.DefaultCacheTTLOverridden = usagelogDescCacheTTLOverridden.Default.(bool)
- // usagelogDescCreatedAt is the schema descriptor for created_at field.
- usagelogDescCreatedAt := usagelogFields[46].Descriptor()
- // usagelog.DefaultCreatedAt holds the default value on creation for the created_at field.
- usagelog.DefaultCreatedAt = usagelogDescCreatedAt.Default.(func() time.Time)
- userMixin := schema.User{}.Mixin()
- userMixinHooks1 := userMixin[1].Hooks()
- user.Hooks[0] = userMixinHooks1[0]
- userMixinInters1 := userMixin[1].Interceptors()
- user.Interceptors[0] = userMixinInters1[0]
- userMixinFields0 := userMixin[0].Fields()
- _ = userMixinFields0
- userFields := schema.User{}.Fields()
- _ = userFields
- // userDescCreatedAt is the schema descriptor for created_at field.
- userDescCreatedAt := userMixinFields0[0].Descriptor()
- // user.DefaultCreatedAt holds the default value on creation for the created_at field.
- user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
- // userDescUpdatedAt is the schema descriptor for updated_at field.
- userDescUpdatedAt := userMixinFields0[1].Descriptor()
- // user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
- // user.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- user.UpdateDefaultUpdatedAt = userDescUpdatedAt.UpdateDefault.(func() time.Time)
- // userDescEmail is the schema descriptor for email field.
- userDescEmail := userFields[0].Descriptor()
- // user.EmailValidator is a validator for the "email" field. It is called by the builders before save.
- user.EmailValidator = func() func(string) error {
- validators := userDescEmail.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(email string) error {
- for _, fn := range fns {
- if err := fn(email); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // userDescPasswordHash is the schema descriptor for password_hash field.
- userDescPasswordHash := userFields[1].Descriptor()
- // user.PasswordHashValidator is a validator for the "password_hash" field. It is called by the builders before save.
- user.PasswordHashValidator = func() func(string) error {
- validators := userDescPasswordHash.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(password_hash string) error {
- for _, fn := range fns {
- if err := fn(password_hash); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // userDescRole is the schema descriptor for role field.
- userDescRole := userFields[2].Descriptor()
- // user.DefaultRole holds the default value on creation for the role field.
- user.DefaultRole = userDescRole.Default.(string)
- // user.RoleValidator is a validator for the "role" field. It is called by the builders before save.
- user.RoleValidator = userDescRole.Validators[0].(func(string) error)
- // userDescBalance is the schema descriptor for balance field.
- userDescBalance := userFields[3].Descriptor()
- // user.DefaultBalance holds the default value on creation for the balance field.
- user.DefaultBalance = userDescBalance.Default.(float64)
- // userDescFrozenBalance is the schema descriptor for frozen_balance field.
- userDescFrozenBalance := userFields[4].Descriptor()
- // user.DefaultFrozenBalance holds the default value on creation for the frozen_balance field.
- user.DefaultFrozenBalance = userDescFrozenBalance.Default.(float64)
- // userDescConcurrency is the schema descriptor for concurrency field.
- userDescConcurrency := userFields[5].Descriptor()
- // user.DefaultConcurrency holds the default value on creation for the concurrency field.
- user.DefaultConcurrency = userDescConcurrency.Default.(int)
- // userDescStatus is the schema descriptor for status field.
- userDescStatus := userFields[6].Descriptor()
- // user.DefaultStatus holds the default value on creation for the status field.
- user.DefaultStatus = userDescStatus.Default.(string)
- // user.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- user.StatusValidator = userDescStatus.Validators[0].(func(string) error)
- // userDescUsername is the schema descriptor for username field.
- userDescUsername := userFields[7].Descriptor()
- // user.DefaultUsername holds the default value on creation for the username field.
- user.DefaultUsername = userDescUsername.Default.(string)
- // user.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
- user.UsernameValidator = userDescUsername.Validators[0].(func(string) error)
- // userDescNotes is the schema descriptor for notes field.
- userDescNotes := userFields[8].Descriptor()
- // user.DefaultNotes holds the default value on creation for the notes field.
- user.DefaultNotes = userDescNotes.Default.(string)
- // userDescTotpEnabled is the schema descriptor for totp_enabled field.
- userDescTotpEnabled := userFields[10].Descriptor()
- // user.DefaultTotpEnabled holds the default value on creation for the totp_enabled field.
- user.DefaultTotpEnabled = userDescTotpEnabled.Default.(bool)
- // userDescSignupSource is the schema descriptor for signup_source field.
- userDescSignupSource := userFields[12].Descriptor()
- // user.DefaultSignupSource holds the default value on creation for the signup_source field.
- user.DefaultSignupSource = userDescSignupSource.Default.(string)
- // user.SignupSourceValidator is a validator for the "signup_source" field. It is called by the builders before save.
- user.SignupSourceValidator = userDescSignupSource.Validators[0].(func(string) error)
- // userDescRestrictPublicGroups is the schema descriptor for restrict_public_groups field.
- userDescRestrictPublicGroups := userFields[15].Descriptor()
- // user.DefaultRestrictPublicGroups holds the default value on creation for the restrict_public_groups field.
- user.DefaultRestrictPublicGroups = userDescRestrictPublicGroups.Default.(bool)
- // userDescBalanceNotifyEnabled is the schema descriptor for balance_notify_enabled field.
- userDescBalanceNotifyEnabled := userFields[16].Descriptor()
- // user.DefaultBalanceNotifyEnabled holds the default value on creation for the balance_notify_enabled field.
- user.DefaultBalanceNotifyEnabled = userDescBalanceNotifyEnabled.Default.(bool)
- // userDescBalanceNotifyThresholdType is the schema descriptor for balance_notify_threshold_type field.
- userDescBalanceNotifyThresholdType := userFields[17].Descriptor()
- // user.DefaultBalanceNotifyThresholdType holds the default value on creation for the balance_notify_threshold_type field.
- user.DefaultBalanceNotifyThresholdType = userDescBalanceNotifyThresholdType.Default.(string)
- // userDescBalanceNotifyExtraEmails is the schema descriptor for balance_notify_extra_emails field.
- userDescBalanceNotifyExtraEmails := userFields[19].Descriptor()
- // user.DefaultBalanceNotifyExtraEmails holds the default value on creation for the balance_notify_extra_emails field.
- user.DefaultBalanceNotifyExtraEmails = userDescBalanceNotifyExtraEmails.Default.(string)
- // userDescTotalRecharged is the schema descriptor for total_recharged field.
- userDescTotalRecharged := userFields[20].Descriptor()
- // user.DefaultTotalRecharged holds the default value on creation for the total_recharged field.
- user.DefaultTotalRecharged = userDescTotalRecharged.Default.(float64)
- // userDescRpmLimit is the schema descriptor for rpm_limit field.
- userDescRpmLimit := userFields[21].Descriptor()
- // user.DefaultRpmLimit holds the default value on creation for the rpm_limit field.
- user.DefaultRpmLimit = userDescRpmLimit.Default.(int)
- userallowedgroupFields := schema.UserAllowedGroup{}.Fields()
- _ = userallowedgroupFields
- // userallowedgroupDescCreatedAt is the schema descriptor for created_at field.
- userallowedgroupDescCreatedAt := userallowedgroupFields[2].Descriptor()
- // userallowedgroup.DefaultCreatedAt holds the default value on creation for the created_at field.
- userallowedgroup.DefaultCreatedAt = userallowedgroupDescCreatedAt.Default.(func() time.Time)
- userattributedefinitionMixin := schema.UserAttributeDefinition{}.Mixin()
- userattributedefinitionMixinHooks1 := userattributedefinitionMixin[1].Hooks()
- userattributedefinition.Hooks[0] = userattributedefinitionMixinHooks1[0]
- userattributedefinitionMixinInters1 := userattributedefinitionMixin[1].Interceptors()
- userattributedefinition.Interceptors[0] = userattributedefinitionMixinInters1[0]
- userattributedefinitionMixinFields0 := userattributedefinitionMixin[0].Fields()
- _ = userattributedefinitionMixinFields0
- userattributedefinitionFields := schema.UserAttributeDefinition{}.Fields()
- _ = userattributedefinitionFields
- // userattributedefinitionDescCreatedAt is the schema descriptor for created_at field.
- userattributedefinitionDescCreatedAt := userattributedefinitionMixinFields0[0].Descriptor()
- // userattributedefinition.DefaultCreatedAt holds the default value on creation for the created_at field.
- userattributedefinition.DefaultCreatedAt = userattributedefinitionDescCreatedAt.Default.(func() time.Time)
- // userattributedefinitionDescUpdatedAt is the schema descriptor for updated_at field.
- userattributedefinitionDescUpdatedAt := userattributedefinitionMixinFields0[1].Descriptor()
- // userattributedefinition.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- userattributedefinition.DefaultUpdatedAt = userattributedefinitionDescUpdatedAt.Default.(func() time.Time)
- // userattributedefinition.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- userattributedefinition.UpdateDefaultUpdatedAt = userattributedefinitionDescUpdatedAt.UpdateDefault.(func() time.Time)
- // userattributedefinitionDescKey is the schema descriptor for key field.
- userattributedefinitionDescKey := userattributedefinitionFields[0].Descriptor()
- // userattributedefinition.KeyValidator is a validator for the "key" field. It is called by the builders before save.
- userattributedefinition.KeyValidator = func() func(string) error {
- validators := userattributedefinitionDescKey.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(key string) error {
- for _, fn := range fns {
- if err := fn(key); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // userattributedefinitionDescName is the schema descriptor for name field.
- userattributedefinitionDescName := userattributedefinitionFields[1].Descriptor()
- // userattributedefinition.NameValidator is a validator for the "name" field. It is called by the builders before save.
- userattributedefinition.NameValidator = func() func(string) error {
- validators := userattributedefinitionDescName.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(name string) error {
- for _, fn := range fns {
- if err := fn(name); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // userattributedefinitionDescDescription is the schema descriptor for description field.
- userattributedefinitionDescDescription := userattributedefinitionFields[2].Descriptor()
- // userattributedefinition.DefaultDescription holds the default value on creation for the description field.
- userattributedefinition.DefaultDescription = userattributedefinitionDescDescription.Default.(string)
- // userattributedefinitionDescType is the schema descriptor for type field.
- userattributedefinitionDescType := userattributedefinitionFields[3].Descriptor()
- // userattributedefinition.TypeValidator is a validator for the "type" field. It is called by the builders before save.
- userattributedefinition.TypeValidator = func() func(string) error {
- validators := userattributedefinitionDescType.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- }
- return func(_type string) error {
- for _, fn := range fns {
- if err := fn(_type); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // userattributedefinitionDescOptions is the schema descriptor for options field.
- userattributedefinitionDescOptions := userattributedefinitionFields[4].Descriptor()
- // userattributedefinition.DefaultOptions holds the default value on creation for the options field.
- userattributedefinition.DefaultOptions = userattributedefinitionDescOptions.Default.([]map[string]interface{})
- // userattributedefinitionDescRequired is the schema descriptor for required field.
- userattributedefinitionDescRequired := userattributedefinitionFields[5].Descriptor()
- // userattributedefinition.DefaultRequired holds the default value on creation for the required field.
- userattributedefinition.DefaultRequired = userattributedefinitionDescRequired.Default.(bool)
- // userattributedefinitionDescValidation is the schema descriptor for validation field.
- userattributedefinitionDescValidation := userattributedefinitionFields[6].Descriptor()
- // userattributedefinition.DefaultValidation holds the default value on creation for the validation field.
- userattributedefinition.DefaultValidation = userattributedefinitionDescValidation.Default.(map[string]interface{})
- // userattributedefinitionDescPlaceholder is the schema descriptor for placeholder field.
- userattributedefinitionDescPlaceholder := userattributedefinitionFields[7].Descriptor()
- // userattributedefinition.DefaultPlaceholder holds the default value on creation for the placeholder field.
- userattributedefinition.DefaultPlaceholder = userattributedefinitionDescPlaceholder.Default.(string)
- // userattributedefinition.PlaceholderValidator is a validator for the "placeholder" field. It is called by the builders before save.
- userattributedefinition.PlaceholderValidator = userattributedefinitionDescPlaceholder.Validators[0].(func(string) error)
- // userattributedefinitionDescDisplayOrder is the schema descriptor for display_order field.
- userattributedefinitionDescDisplayOrder := userattributedefinitionFields[8].Descriptor()
- // userattributedefinition.DefaultDisplayOrder holds the default value on creation for the display_order field.
- userattributedefinition.DefaultDisplayOrder = userattributedefinitionDescDisplayOrder.Default.(int)
- // userattributedefinitionDescEnabled is the schema descriptor for enabled field.
- userattributedefinitionDescEnabled := userattributedefinitionFields[9].Descriptor()
- // userattributedefinition.DefaultEnabled holds the default value on creation for the enabled field.
- userattributedefinition.DefaultEnabled = userattributedefinitionDescEnabled.Default.(bool)
- userattributevalueMixin := schema.UserAttributeValue{}.Mixin()
- userattributevalueMixinFields0 := userattributevalueMixin[0].Fields()
- _ = userattributevalueMixinFields0
- userattributevalueFields := schema.UserAttributeValue{}.Fields()
- _ = userattributevalueFields
- // userattributevalueDescCreatedAt is the schema descriptor for created_at field.
- userattributevalueDescCreatedAt := userattributevalueMixinFields0[0].Descriptor()
- // userattributevalue.DefaultCreatedAt holds the default value on creation for the created_at field.
- userattributevalue.DefaultCreatedAt = userattributevalueDescCreatedAt.Default.(func() time.Time)
- // userattributevalueDescUpdatedAt is the schema descriptor for updated_at field.
- userattributevalueDescUpdatedAt := userattributevalueMixinFields0[1].Descriptor()
- // userattributevalue.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- userattributevalue.DefaultUpdatedAt = userattributevalueDescUpdatedAt.Default.(func() time.Time)
- // userattributevalue.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- userattributevalue.UpdateDefaultUpdatedAt = userattributevalueDescUpdatedAt.UpdateDefault.(func() time.Time)
- // userattributevalueDescValue is the schema descriptor for value field.
- userattributevalueDescValue := userattributevalueFields[2].Descriptor()
- // userattributevalue.DefaultValue holds the default value on creation for the value field.
- userattributevalue.DefaultValue = userattributevalueDescValue.Default.(string)
- userplatformquotaMixin := schema.UserPlatformQuota{}.Mixin()
- userplatformquotaMixinHooks1 := userplatformquotaMixin[1].Hooks()
- userplatformquota.Hooks[0] = userplatformquotaMixinHooks1[0]
- userplatformquotaMixinInters1 := userplatformquotaMixin[1].Interceptors()
- userplatformquota.Interceptors[0] = userplatformquotaMixinInters1[0]
- userplatformquotaMixinFields0 := userplatformquotaMixin[0].Fields()
- _ = userplatformquotaMixinFields0
- userplatformquotaFields := schema.UserPlatformQuota{}.Fields()
- _ = userplatformquotaFields
- // userplatformquotaDescCreatedAt is the schema descriptor for created_at field.
- userplatformquotaDescCreatedAt := userplatformquotaMixinFields0[0].Descriptor()
- // userplatformquota.DefaultCreatedAt holds the default value on creation for the created_at field.
- userplatformquota.DefaultCreatedAt = userplatformquotaDescCreatedAt.Default.(func() time.Time)
- // userplatformquotaDescUpdatedAt is the schema descriptor for updated_at field.
- userplatformquotaDescUpdatedAt := userplatformquotaMixinFields0[1].Descriptor()
- // userplatformquota.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- userplatformquota.DefaultUpdatedAt = userplatformquotaDescUpdatedAt.Default.(func() time.Time)
- // userplatformquota.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- userplatformquota.UpdateDefaultUpdatedAt = userplatformquotaDescUpdatedAt.UpdateDefault.(func() time.Time)
- // userplatformquotaDescPlatform is the schema descriptor for platform field.
- userplatformquotaDescPlatform := userplatformquotaFields[1].Descriptor()
- // userplatformquota.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
- userplatformquota.PlatformValidator = func() func(string) error {
- validators := userplatformquotaDescPlatform.Validators
- fns := [...]func(string) error{
- validators[0].(func(string) error),
- validators[1].(func(string) error),
- validators[2].(func(string) error),
- }
- return func(platform string) error {
- for _, fn := range fns {
- if err := fn(platform); err != nil {
- return err
- }
- }
- return nil
- }
- }()
- // userplatformquotaDescDailyUsageUsd is the schema descriptor for daily_usage_usd field.
- userplatformquotaDescDailyUsageUsd := userplatformquotaFields[5].Descriptor()
- // userplatformquota.DefaultDailyUsageUsd holds the default value on creation for the daily_usage_usd field.
- userplatformquota.DefaultDailyUsageUsd = userplatformquotaDescDailyUsageUsd.Default.(float64)
- // userplatformquotaDescWeeklyUsageUsd is the schema descriptor for weekly_usage_usd field.
- userplatformquotaDescWeeklyUsageUsd := userplatformquotaFields[6].Descriptor()
- // userplatformquota.DefaultWeeklyUsageUsd holds the default value on creation for the weekly_usage_usd field.
- userplatformquota.DefaultWeeklyUsageUsd = userplatformquotaDescWeeklyUsageUsd.Default.(float64)
- // userplatformquotaDescMonthlyUsageUsd is the schema descriptor for monthly_usage_usd field.
- userplatformquotaDescMonthlyUsageUsd := userplatformquotaFields[7].Descriptor()
- // userplatformquota.DefaultMonthlyUsageUsd holds the default value on creation for the monthly_usage_usd field.
- userplatformquota.DefaultMonthlyUsageUsd = userplatformquotaDescMonthlyUsageUsd.Default.(float64)
- usersubscriptionMixin := schema.UserSubscription{}.Mixin()
- usersubscriptionMixinHooks1 := usersubscriptionMixin[1].Hooks()
- usersubscription.Hooks[0] = usersubscriptionMixinHooks1[0]
- usersubscriptionMixinInters1 := usersubscriptionMixin[1].Interceptors()
- usersubscription.Interceptors[0] = usersubscriptionMixinInters1[0]
- usersubscriptionMixinFields0 := usersubscriptionMixin[0].Fields()
- _ = usersubscriptionMixinFields0
- usersubscriptionFields := schema.UserSubscription{}.Fields()
- _ = usersubscriptionFields
- // usersubscriptionDescCreatedAt is the schema descriptor for created_at field.
- usersubscriptionDescCreatedAt := usersubscriptionMixinFields0[0].Descriptor()
- // usersubscription.DefaultCreatedAt holds the default value on creation for the created_at field.
- usersubscription.DefaultCreatedAt = usersubscriptionDescCreatedAt.Default.(func() time.Time)
- // usersubscriptionDescUpdatedAt is the schema descriptor for updated_at field.
- usersubscriptionDescUpdatedAt := usersubscriptionMixinFields0[1].Descriptor()
- // usersubscription.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- usersubscription.DefaultUpdatedAt = usersubscriptionDescUpdatedAt.Default.(func() time.Time)
- // usersubscription.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- usersubscription.UpdateDefaultUpdatedAt = usersubscriptionDescUpdatedAt.UpdateDefault.(func() time.Time)
- // usersubscriptionDescStatus is the schema descriptor for status field.
- usersubscriptionDescStatus := usersubscriptionFields[4].Descriptor()
- // usersubscription.DefaultStatus holds the default value on creation for the status field.
- usersubscription.DefaultStatus = usersubscriptionDescStatus.Default.(string)
- // usersubscription.StatusValidator is a validator for the "status" field. It is called by the builders before save.
- usersubscription.StatusValidator = usersubscriptionDescStatus.Validators[0].(func(string) error)
- // usersubscriptionDescDailyUsageUsd is the schema descriptor for daily_usage_usd field.
- usersubscriptionDescDailyUsageUsd := usersubscriptionFields[8].Descriptor()
- // usersubscription.DefaultDailyUsageUsd holds the default value on creation for the daily_usage_usd field.
- usersubscription.DefaultDailyUsageUsd = usersubscriptionDescDailyUsageUsd.Default.(float64)
- // usersubscriptionDescWeeklyUsageUsd is the schema descriptor for weekly_usage_usd field.
- usersubscriptionDescWeeklyUsageUsd := usersubscriptionFields[9].Descriptor()
- // usersubscription.DefaultWeeklyUsageUsd holds the default value on creation for the weekly_usage_usd field.
- usersubscription.DefaultWeeklyUsageUsd = usersubscriptionDescWeeklyUsageUsd.Default.(float64)
- // usersubscriptionDescMonthlyUsageUsd is the schema descriptor for monthly_usage_usd field.
- usersubscriptionDescMonthlyUsageUsd := usersubscriptionFields[10].Descriptor()
- // usersubscription.DefaultMonthlyUsageUsd holds the default value on creation for the monthly_usage_usd field.
- usersubscription.DefaultMonthlyUsageUsd = usersubscriptionDescMonthlyUsageUsd.Default.(float64)
- // usersubscriptionDescAssignedAt is the schema descriptor for assigned_at field.
- usersubscriptionDescAssignedAt := usersubscriptionFields[12].Descriptor()
- // usersubscription.DefaultAssignedAt holds the default value on creation for the assigned_at field.
- usersubscription.DefaultAssignedAt = usersubscriptionDescAssignedAt.Default.(func() time.Time)
- }
- const (
- Version = "v0.14.5" // Version of ent codegen.
- Sum = "h1:Rj2WOYJtCkWyFo6a+5wB3EfBRP0rnx1fMk6gGA0UUe4=" // Sum of ent codegen.
- )
|