123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- // Code generated by ent, DO NOT EDIT.
- package runtime
- import (
- "time"
- "wechat-api/ent/contact"
- "wechat-api/ent/schema"
- "wechat-api/ent/server"
- "wechat-api/ent/wx"
- )
- // 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() {
- contactMixin := schema.Contact{}.Mixin()
- contactMixinHooks2 := contactMixin[2].Hooks()
- contact.Hooks[0] = contactMixinHooks2[0]
- contactMixinInters2 := contactMixin[2].Interceptors()
- contact.Interceptors[0] = contactMixinInters2[0]
- contactMixinFields0 := contactMixin[0].Fields()
- _ = contactMixinFields0
- contactMixinFields1 := contactMixin[1].Fields()
- _ = contactMixinFields1
- contactFields := schema.Contact{}.Fields()
- _ = contactFields
- // contactDescCreatedAt is the schema descriptor for created_at field.
- contactDescCreatedAt := contactMixinFields0[1].Descriptor()
- // contact.DefaultCreatedAt holds the default value on creation for the created_at field.
- contact.DefaultCreatedAt = contactDescCreatedAt.Default.(func() time.Time)
- // contactDescUpdatedAt is the schema descriptor for updated_at field.
- contactDescUpdatedAt := contactMixinFields0[2].Descriptor()
- // contact.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- contact.DefaultUpdatedAt = contactDescUpdatedAt.Default.(func() time.Time)
- // contact.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- contact.UpdateDefaultUpdatedAt = contactDescUpdatedAt.UpdateDefault.(func() time.Time)
- // contactDescStatus is the schema descriptor for status field.
- contactDescStatus := contactMixinFields1[0].Descriptor()
- // contact.DefaultStatus holds the default value on creation for the status field.
- contact.DefaultStatus = contactDescStatus.Default.(uint8)
- // contactDescWxWxid is the schema descriptor for wx_wxid field.
- contactDescWxWxid := contactFields[0].Descriptor()
- // contact.DefaultWxWxid holds the default value on creation for the wx_wxid field.
- contact.DefaultWxWxid = contactDescWxWxid.Default.(string)
- // contactDescType is the schema descriptor for type field.
- contactDescType := contactFields[1].Descriptor()
- // contact.DefaultType holds the default value on creation for the type field.
- contact.DefaultType = contactDescType.Default.(int)
- // contactDescWxid is the schema descriptor for wxid field.
- contactDescWxid := contactFields[2].Descriptor()
- // contact.DefaultWxid holds the default value on creation for the wxid field.
- contact.DefaultWxid = contactDescWxid.Default.(string)
- // contactDescAccount is the schema descriptor for account field.
- contactDescAccount := contactFields[3].Descriptor()
- // contact.DefaultAccount holds the default value on creation for the account field.
- contact.DefaultAccount = contactDescAccount.Default.(string)
- // contactDescNickname is the schema descriptor for nickname field.
- contactDescNickname := contactFields[4].Descriptor()
- // contact.DefaultNickname holds the default value on creation for the nickname field.
- contact.DefaultNickname = contactDescNickname.Default.(string)
- // contactDescMarkname is the schema descriptor for markname field.
- contactDescMarkname := contactFields[5].Descriptor()
- // contact.DefaultMarkname holds the default value on creation for the markname field.
- contact.DefaultMarkname = contactDescMarkname.Default.(string)
- // contactDescHeadimg is the schema descriptor for headimg field.
- contactDescHeadimg := contactFields[6].Descriptor()
- // contact.DefaultHeadimg holds the default value on creation for the headimg field.
- contact.DefaultHeadimg = contactDescHeadimg.Default.(string)
- // contactDescSex is the schema descriptor for sex field.
- contactDescSex := contactFields[7].Descriptor()
- // contact.DefaultSex holds the default value on creation for the sex field.
- contact.DefaultSex = contactDescSex.Default.(int)
- // contactDescStarrole is the schema descriptor for starrole field.
- contactDescStarrole := contactFields[8].Descriptor()
- // contact.DefaultStarrole holds the default value on creation for the starrole field.
- contact.DefaultStarrole = contactDescStarrole.Default.(string)
- // contactDescDontseeit is the schema descriptor for dontseeit field.
- contactDescDontseeit := contactFields[9].Descriptor()
- // contact.DefaultDontseeit holds the default value on creation for the dontseeit field.
- contact.DefaultDontseeit = contactDescDontseeit.Default.(int)
- // contactDescDontseeme is the schema descriptor for dontseeme field.
- contactDescDontseeme := contactFields[10].Descriptor()
- // contact.DefaultDontseeme holds the default value on creation for the dontseeme field.
- contact.DefaultDontseeme = contactDescDontseeme.Default.(int)
- // contactDescLag is the schema descriptor for lag field.
- contactDescLag := contactFields[11].Descriptor()
- // contact.DefaultLag holds the default value on creation for the lag field.
- contact.DefaultLag = contactDescLag.Default.(string)
- // contactDescGid is the schema descriptor for gid field.
- contactDescGid := contactFields[12].Descriptor()
- // contact.DefaultGid holds the default value on creation for the gid field.
- contact.DefaultGid = contactDescGid.Default.(string)
- // contactDescGname is the schema descriptor for gname field.
- contactDescGname := contactFields[13].Descriptor()
- // contact.DefaultGname holds the default value on creation for the gname field.
- contact.DefaultGname = contactDescGname.Default.(string)
- // contactDescV3 is the schema descriptor for v3 field.
- contactDescV3 := contactFields[14].Descriptor()
- // contact.DefaultV3 holds the default value on creation for the v3 field.
- contact.DefaultV3 = contactDescV3.Default.(string)
- serverMixin := schema.Server{}.Mixin()
- serverMixinHooks2 := serverMixin[2].Hooks()
- server.Hooks[0] = serverMixinHooks2[0]
- serverMixinInters2 := serverMixin[2].Interceptors()
- server.Interceptors[0] = serverMixinInters2[0]
- serverMixinFields0 := serverMixin[0].Fields()
- _ = serverMixinFields0
- serverMixinFields1 := serverMixin[1].Fields()
- _ = serverMixinFields1
- serverFields := schema.Server{}.Fields()
- _ = serverFields
- // serverDescCreatedAt is the schema descriptor for created_at field.
- serverDescCreatedAt := serverMixinFields0[1].Descriptor()
- // server.DefaultCreatedAt holds the default value on creation for the created_at field.
- server.DefaultCreatedAt = serverDescCreatedAt.Default.(func() time.Time)
- // serverDescUpdatedAt is the schema descriptor for updated_at field.
- serverDescUpdatedAt := serverMixinFields0[2].Descriptor()
- // server.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- server.DefaultUpdatedAt = serverDescUpdatedAt.Default.(func() time.Time)
- // server.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- server.UpdateDefaultUpdatedAt = serverDescUpdatedAt.UpdateDefault.(func() time.Time)
- // serverDescStatus is the schema descriptor for status field.
- serverDescStatus := serverMixinFields1[0].Descriptor()
- // server.DefaultStatus holds the default value on creation for the status field.
- server.DefaultStatus = serverDescStatus.Default.(uint8)
- wxMixin := schema.Wx{}.Mixin()
- wxMixinHooks2 := wxMixin[2].Hooks()
- wx.Hooks[0] = wxMixinHooks2[0]
- wxMixinInters2 := wxMixin[2].Interceptors()
- wx.Interceptors[0] = wxMixinInters2[0]
- wxMixinFields0 := wxMixin[0].Fields()
- _ = wxMixinFields0
- wxMixinFields1 := wxMixin[1].Fields()
- _ = wxMixinFields1
- wxFields := schema.Wx{}.Fields()
- _ = wxFields
- // wxDescCreatedAt is the schema descriptor for created_at field.
- wxDescCreatedAt := wxMixinFields0[1].Descriptor()
- // wx.DefaultCreatedAt holds the default value on creation for the created_at field.
- wx.DefaultCreatedAt = wxDescCreatedAt.Default.(func() time.Time)
- // wxDescUpdatedAt is the schema descriptor for updated_at field.
- wxDescUpdatedAt := wxMixinFields0[2].Descriptor()
- // wx.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- wx.DefaultUpdatedAt = wxDescUpdatedAt.Default.(func() time.Time)
- // wx.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- wx.UpdateDefaultUpdatedAt = wxDescUpdatedAt.UpdateDefault.(func() time.Time)
- // wxDescStatus is the schema descriptor for status field.
- wxDescStatus := wxMixinFields1[0].Descriptor()
- // wx.DefaultStatus holds the default value on creation for the status field.
- wx.DefaultStatus = wxDescStatus.Default.(uint8)
- // wxDescServerID is the schema descriptor for server_id field.
- wxDescServerID := wxFields[0].Descriptor()
- // wx.DefaultServerID holds the default value on creation for the server_id field.
- wx.DefaultServerID = wxDescServerID.Default.(uint64)
- // wxDescPort is the schema descriptor for port field.
- wxDescPort := wxFields[1].Descriptor()
- // wx.DefaultPort holds the default value on creation for the port field.
- wx.DefaultPort = wxDescPort.Default.(string)
- // wxDescProcessID is the schema descriptor for process_id field.
- wxDescProcessID := wxFields[2].Descriptor()
- // wx.DefaultProcessID holds the default value on creation for the process_id field.
- wx.DefaultProcessID = wxDescProcessID.Default.(string)
- // wxDescCallback is the schema descriptor for callback field.
- wxDescCallback := wxFields[3].Descriptor()
- // wx.DefaultCallback holds the default value on creation for the callback field.
- wx.DefaultCallback = wxDescCallback.Default.(string)
- // wxDescWxid is the schema descriptor for wxid field.
- wxDescWxid := wxFields[4].Descriptor()
- // wx.DefaultWxid holds the default value on creation for the wxid field.
- wx.DefaultWxid = wxDescWxid.Default.(string)
- // wxDescAccount is the schema descriptor for account field.
- wxDescAccount := wxFields[5].Descriptor()
- // wx.DefaultAccount holds the default value on creation for the account field.
- wx.DefaultAccount = wxDescAccount.Default.(string)
- // wxDescNickname is the schema descriptor for nickname field.
- wxDescNickname := wxFields[6].Descriptor()
- // wx.DefaultNickname holds the default value on creation for the nickname field.
- wx.DefaultNickname = wxDescNickname.Default.(string)
- // wxDescTel is the schema descriptor for tel field.
- wxDescTel := wxFields[7].Descriptor()
- // wx.DefaultTel holds the default value on creation for the tel field.
- wx.DefaultTel = wxDescTel.Default.(string)
- // wxDescHeadBig is the schema descriptor for head_big field.
- wxDescHeadBig := wxFields[8].Descriptor()
- // wx.DefaultHeadBig holds the default value on creation for the head_big field.
- wx.DefaultHeadBig = wxDescHeadBig.Default.(string)
- }
- const (
- Version = "v0.13.1" // Version of ent codegen.
- Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
- )
|