123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520 |
- // Code generated by ent, DO NOT EDIT.
- package runtime
- import (
- "time"
- "wechat-api/ent/batchmsg"
- "wechat-api/ent/contact"
- "wechat-api/ent/label"
- "wechat-api/ent/labelrelationship"
- "wechat-api/ent/message"
- "wechat-api/ent/messagerecords"
- "wechat-api/ent/msg"
- "wechat-api/ent/schema"
- "wechat-api/ent/server"
- "wechat-api/ent/sopnode"
- "wechat-api/ent/sopstage"
- "wechat-api/ent/soptask"
- "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() {
- batchmsgMixin := schema.BatchMsg{}.Mixin()
- batchmsgMixinHooks1 := batchmsgMixin[1].Hooks()
- batchmsg.Hooks[0] = batchmsgMixinHooks1[0]
- batchmsgMixinInters1 := batchmsgMixin[1].Interceptors()
- batchmsg.Interceptors[0] = batchmsgMixinInters1[0]
- batchmsgMixinFields0 := batchmsgMixin[0].Fields()
- _ = batchmsgMixinFields0
- batchmsgFields := schema.BatchMsg{}.Fields()
- _ = batchmsgFields
- // batchmsgDescCreatedAt is the schema descriptor for created_at field.
- batchmsgDescCreatedAt := batchmsgMixinFields0[1].Descriptor()
- // batchmsg.DefaultCreatedAt holds the default value on creation for the created_at field.
- batchmsg.DefaultCreatedAt = batchmsgDescCreatedAt.Default.(func() time.Time)
- // batchmsgDescUpdatedAt is the schema descriptor for updated_at field.
- batchmsgDescUpdatedAt := batchmsgMixinFields0[2].Descriptor()
- // batchmsg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- batchmsg.DefaultUpdatedAt = batchmsgDescUpdatedAt.Default.(func() time.Time)
- // batchmsg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- batchmsg.UpdateDefaultUpdatedAt = batchmsgDescUpdatedAt.UpdateDefault.(func() time.Time)
- 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)
- // contactDescOrganizationID is the schema descriptor for organization_id field.
- contactDescOrganizationID := contactFields[15].Descriptor()
- // contact.DefaultOrganizationID holds the default value on creation for the organization_id field.
- contact.DefaultOrganizationID = contactDescOrganizationID.Default.(uint64)
- labelMixin := schema.Label{}.Mixin()
- labelMixinFields0 := labelMixin[0].Fields()
- _ = labelMixinFields0
- labelMixinFields1 := labelMixin[1].Fields()
- _ = labelMixinFields1
- labelFields := schema.Label{}.Fields()
- _ = labelFields
- // labelDescCreatedAt is the schema descriptor for created_at field.
- labelDescCreatedAt := labelMixinFields0[1].Descriptor()
- // label.DefaultCreatedAt holds the default value on creation for the created_at field.
- label.DefaultCreatedAt = labelDescCreatedAt.Default.(func() time.Time)
- // labelDescUpdatedAt is the schema descriptor for updated_at field.
- labelDescUpdatedAt := labelMixinFields0[2].Descriptor()
- // label.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- label.DefaultUpdatedAt = labelDescUpdatedAt.Default.(func() time.Time)
- // label.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- label.UpdateDefaultUpdatedAt = labelDescUpdatedAt.UpdateDefault.(func() time.Time)
- // labelDescStatus is the schema descriptor for status field.
- labelDescStatus := labelMixinFields1[0].Descriptor()
- // label.DefaultStatus holds the default value on creation for the status field.
- label.DefaultStatus = labelDescStatus.Default.(uint8)
- // labelDescType is the schema descriptor for type field.
- labelDescType := labelFields[0].Descriptor()
- // label.DefaultType holds the default value on creation for the type field.
- label.DefaultType = labelDescType.Default.(int)
- // labelDescName is the schema descriptor for name field.
- labelDescName := labelFields[1].Descriptor()
- // label.DefaultName holds the default value on creation for the name field.
- label.DefaultName = labelDescName.Default.(string)
- // labelDescFrom is the schema descriptor for from field.
- labelDescFrom := labelFields[2].Descriptor()
- // label.DefaultFrom holds the default value on creation for the from field.
- label.DefaultFrom = labelDescFrom.Default.(int)
- // labelDescMode is the schema descriptor for mode field.
- labelDescMode := labelFields[3].Descriptor()
- // label.DefaultMode holds the default value on creation for the mode field.
- label.DefaultMode = labelDescMode.Default.(int)
- // labelDescConditions is the schema descriptor for conditions field.
- labelDescConditions := labelFields[4].Descriptor()
- // label.DefaultConditions holds the default value on creation for the conditions field.
- label.DefaultConditions = labelDescConditions.Default.(string)
- // labelDescOrganizationID is the schema descriptor for organization_id field.
- labelDescOrganizationID := labelFields[5].Descriptor()
- // label.DefaultOrganizationID holds the default value on creation for the organization_id field.
- label.DefaultOrganizationID = labelDescOrganizationID.Default.(uint64)
- labelrelationshipMixin := schema.LabelRelationship{}.Mixin()
- labelrelationshipMixinHooks2 := labelrelationshipMixin[2].Hooks()
- labelrelationship.Hooks[0] = labelrelationshipMixinHooks2[0]
- labelrelationshipMixinInters2 := labelrelationshipMixin[2].Interceptors()
- labelrelationship.Interceptors[0] = labelrelationshipMixinInters2[0]
- labelrelationshipMixinFields0 := labelrelationshipMixin[0].Fields()
- _ = labelrelationshipMixinFields0
- labelrelationshipMixinFields1 := labelrelationshipMixin[1].Fields()
- _ = labelrelationshipMixinFields1
- labelrelationshipFields := schema.LabelRelationship{}.Fields()
- _ = labelrelationshipFields
- // labelrelationshipDescCreatedAt is the schema descriptor for created_at field.
- labelrelationshipDescCreatedAt := labelrelationshipMixinFields0[1].Descriptor()
- // labelrelationship.DefaultCreatedAt holds the default value on creation for the created_at field.
- labelrelationship.DefaultCreatedAt = labelrelationshipDescCreatedAt.Default.(func() time.Time)
- // labelrelationshipDescUpdatedAt is the schema descriptor for updated_at field.
- labelrelationshipDescUpdatedAt := labelrelationshipMixinFields0[2].Descriptor()
- // labelrelationship.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- labelrelationship.DefaultUpdatedAt = labelrelationshipDescUpdatedAt.Default.(func() time.Time)
- // labelrelationship.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- labelrelationship.UpdateDefaultUpdatedAt = labelrelationshipDescUpdatedAt.UpdateDefault.(func() time.Time)
- // labelrelationshipDescStatus is the schema descriptor for status field.
- labelrelationshipDescStatus := labelrelationshipMixinFields1[0].Descriptor()
- // labelrelationship.DefaultStatus holds the default value on creation for the status field.
- labelrelationship.DefaultStatus = labelrelationshipDescStatus.Default.(uint8)
- // labelrelationshipDescLabelID is the schema descriptor for label_id field.
- labelrelationshipDescLabelID := labelrelationshipFields[0].Descriptor()
- // labelrelationship.DefaultLabelID holds the default value on creation for the label_id field.
- labelrelationship.DefaultLabelID = labelrelationshipDescLabelID.Default.(uint64)
- // labelrelationshipDescContactID is the schema descriptor for contact_id field.
- labelrelationshipDescContactID := labelrelationshipFields[1].Descriptor()
- // labelrelationship.DefaultContactID holds the default value on creation for the contact_id field.
- labelrelationship.DefaultContactID = labelrelationshipDescContactID.Default.(uint64)
- // labelrelationshipDescOrganizationID is the schema descriptor for organization_id field.
- labelrelationshipDescOrganizationID := labelrelationshipFields[2].Descriptor()
- // labelrelationship.DefaultOrganizationID holds the default value on creation for the organization_id field.
- labelrelationship.DefaultOrganizationID = labelrelationshipDescOrganizationID.Default.(uint64)
- messageFields := schema.Message{}.Fields()
- _ = messageFields
- // messageDescWxWxid is the schema descriptor for wx_wxid field.
- messageDescWxWxid := messageFields[0].Descriptor()
- // message.DefaultWxWxid holds the default value on creation for the wx_wxid field.
- message.DefaultWxWxid = messageDescWxWxid.Default.(string)
- // messageDescWxid is the schema descriptor for wxid field.
- messageDescWxid := messageFields[1].Descriptor()
- // message.DefaultWxid holds the default value on creation for the wxid field.
- message.DefaultWxid = messageDescWxid.Default.(string)
- // messageDescContent is the schema descriptor for content field.
- messageDescContent := messageFields[2].Descriptor()
- // message.DefaultContent holds the default value on creation for the content field.
- message.DefaultContent = messageDescContent.Default.(string)
- messagerecordsMixin := schema.MessageRecords{}.Mixin()
- messagerecordsMixinHooks2 := messagerecordsMixin[2].Hooks()
- messagerecords.Hooks[0] = messagerecordsMixinHooks2[0]
- messagerecordsMixinInters2 := messagerecordsMixin[2].Interceptors()
- messagerecords.Interceptors[0] = messagerecordsMixinInters2[0]
- messagerecordsMixinFields0 := messagerecordsMixin[0].Fields()
- _ = messagerecordsMixinFields0
- messagerecordsMixinFields1 := messagerecordsMixin[1].Fields()
- _ = messagerecordsMixinFields1
- messagerecordsFields := schema.MessageRecords{}.Fields()
- _ = messagerecordsFields
- // messagerecordsDescCreatedAt is the schema descriptor for created_at field.
- messagerecordsDescCreatedAt := messagerecordsMixinFields0[1].Descriptor()
- // messagerecords.DefaultCreatedAt holds the default value on creation for the created_at field.
- messagerecords.DefaultCreatedAt = messagerecordsDescCreatedAt.Default.(func() time.Time)
- // messagerecordsDescUpdatedAt is the schema descriptor for updated_at field.
- messagerecordsDescUpdatedAt := messagerecordsMixinFields0[2].Descriptor()
- // messagerecords.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- messagerecords.DefaultUpdatedAt = messagerecordsDescUpdatedAt.Default.(func() time.Time)
- // messagerecords.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- messagerecords.UpdateDefaultUpdatedAt = messagerecordsDescUpdatedAt.UpdateDefault.(func() time.Time)
- // messagerecordsDescStatus is the schema descriptor for status field.
- messagerecordsDescStatus := messagerecordsMixinFields1[0].Descriptor()
- // messagerecords.DefaultStatus holds the default value on creation for the status field.
- messagerecords.DefaultStatus = messagerecordsDescStatus.Default.(uint8)
- // messagerecordsDescContactType is the schema descriptor for contact_type field.
- messagerecordsDescContactType := messagerecordsFields[2].Descriptor()
- // messagerecords.DefaultContactType holds the default value on creation for the contact_type field.
- messagerecords.DefaultContactType = messagerecordsDescContactType.Default.(int)
- // messagerecordsDescContactWxid is the schema descriptor for contact_wxid field.
- messagerecordsDescContactWxid := messagerecordsFields[3].Descriptor()
- // messagerecords.DefaultContactWxid holds the default value on creation for the contact_wxid field.
- messagerecords.DefaultContactWxid = messagerecordsDescContactWxid.Default.(string)
- // messagerecordsDescContentType is the schema descriptor for content_type field.
- messagerecordsDescContentType := messagerecordsFields[4].Descriptor()
- // messagerecords.DefaultContentType holds the default value on creation for the content_type field.
- messagerecords.DefaultContentType = messagerecordsDescContentType.Default.(int)
- // messagerecordsDescContent is the schema descriptor for content field.
- messagerecordsDescContent := messagerecordsFields[5].Descriptor()
- // messagerecords.DefaultContent holds the default value on creation for the content field.
- messagerecords.DefaultContent = messagerecordsDescContent.Default.(string)
- // messagerecordsDescErrorDetail is the schema descriptor for error_detail field.
- messagerecordsDescErrorDetail := messagerecordsFields[7].Descriptor()
- // messagerecords.DefaultErrorDetail holds the default value on creation for the error_detail field.
- messagerecords.DefaultErrorDetail = messagerecordsDescErrorDetail.Default.(string)
- // messagerecordsDescSourceType is the schema descriptor for source_type field.
- messagerecordsDescSourceType := messagerecordsFields[9].Descriptor()
- // messagerecords.DefaultSourceType holds the default value on creation for the source_type field.
- messagerecords.DefaultSourceType = messagerecordsDescSourceType.Default.(int)
- // messagerecordsDescSourceID is the schema descriptor for source_id field.
- messagerecordsDescSourceID := messagerecordsFields[10].Descriptor()
- // messagerecords.DefaultSourceID holds the default value on creation for the source_id field.
- messagerecords.DefaultSourceID = messagerecordsDescSourceID.Default.(uint64)
- // messagerecordsDescSubSourceID is the schema descriptor for sub_source_id field.
- messagerecordsDescSubSourceID := messagerecordsFields[11].Descriptor()
- // messagerecords.DefaultSubSourceID holds the default value on creation for the sub_source_id field.
- messagerecords.DefaultSubSourceID = messagerecordsDescSubSourceID.Default.(uint64)
- // messagerecordsDescOrganizationID is the schema descriptor for organization_id field.
- messagerecordsDescOrganizationID := messagerecordsFields[12].Descriptor()
- // messagerecords.DefaultOrganizationID holds the default value on creation for the organization_id field.
- messagerecords.DefaultOrganizationID = messagerecordsDescOrganizationID.Default.(uint64)
- msgMixin := schema.Msg{}.Mixin()
- msgMixinHooks1 := msgMixin[1].Hooks()
- msg.Hooks[0] = msgMixinHooks1[0]
- msgMixinInters1 := msgMixin[1].Interceptors()
- msg.Interceptors[0] = msgMixinInters1[0]
- msgMixinFields0 := msgMixin[0].Fields()
- _ = msgMixinFields0
- msgFields := schema.Msg{}.Fields()
- _ = msgFields
- // msgDescCreatedAt is the schema descriptor for created_at field.
- msgDescCreatedAt := msgMixinFields0[1].Descriptor()
- // msg.DefaultCreatedAt holds the default value on creation for the created_at field.
- msg.DefaultCreatedAt = msgDescCreatedAt.Default.(func() time.Time)
- // msgDescUpdatedAt is the schema descriptor for updated_at field.
- msgDescUpdatedAt := msgMixinFields0[2].Descriptor()
- // msg.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- msg.DefaultUpdatedAt = msgDescUpdatedAt.Default.(func() time.Time)
- // msg.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- msg.UpdateDefaultUpdatedAt = msgDescUpdatedAt.UpdateDefault.(func() time.Time)
- 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)
- sopnodeMixin := schema.SopNode{}.Mixin()
- sopnodeMixinHooks2 := sopnodeMixin[2].Hooks()
- sopnode.Hooks[0] = sopnodeMixinHooks2[0]
- sopnodeMixinInters2 := sopnodeMixin[2].Interceptors()
- sopnode.Interceptors[0] = sopnodeMixinInters2[0]
- sopnodeMixinFields0 := sopnodeMixin[0].Fields()
- _ = sopnodeMixinFields0
- sopnodeMixinFields1 := sopnodeMixin[1].Fields()
- _ = sopnodeMixinFields1
- sopnodeFields := schema.SopNode{}.Fields()
- _ = sopnodeFields
- // sopnodeDescCreatedAt is the schema descriptor for created_at field.
- sopnodeDescCreatedAt := sopnodeMixinFields0[1].Descriptor()
- // sopnode.DefaultCreatedAt holds the default value on creation for the created_at field.
- sopnode.DefaultCreatedAt = sopnodeDescCreatedAt.Default.(func() time.Time)
- // sopnodeDescUpdatedAt is the schema descriptor for updated_at field.
- sopnodeDescUpdatedAt := sopnodeMixinFields0[2].Descriptor()
- // sopnode.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- sopnode.DefaultUpdatedAt = sopnodeDescUpdatedAt.Default.(func() time.Time)
- // sopnode.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- sopnode.UpdateDefaultUpdatedAt = sopnodeDescUpdatedAt.UpdateDefault.(func() time.Time)
- // sopnodeDescStatus is the schema descriptor for status field.
- sopnodeDescStatus := sopnodeMixinFields1[0].Descriptor()
- // sopnode.DefaultStatus holds the default value on creation for the status field.
- sopnode.DefaultStatus = sopnodeDescStatus.Default.(uint8)
- // sopnodeDescName is the schema descriptor for name field.
- sopnodeDescName := sopnodeFields[2].Descriptor()
- // sopnode.DefaultName holds the default value on creation for the name field.
- sopnode.DefaultName = sopnodeDescName.Default.(string)
- // sopnodeDescConditionType is the schema descriptor for condition_type field.
- sopnodeDescConditionType := sopnodeFields[3].Descriptor()
- // sopnode.DefaultConditionType holds the default value on creation for the condition_type field.
- sopnode.DefaultConditionType = sopnodeDescConditionType.Default.(int)
- // sopnodeDescNoReplyCondition is the schema descriptor for no_reply_condition field.
- sopnodeDescNoReplyCondition := sopnodeFields[5].Descriptor()
- // sopnode.DefaultNoReplyCondition holds the default value on creation for the no_reply_condition field.
- sopnode.DefaultNoReplyCondition = sopnodeDescNoReplyCondition.Default.(uint64)
- sopstageMixin := schema.SopStage{}.Mixin()
- sopstageMixinHooks2 := sopstageMixin[2].Hooks()
- sopstage.Hooks[0] = sopstageMixinHooks2[0]
- sopstageMixinInters2 := sopstageMixin[2].Interceptors()
- sopstage.Interceptors[0] = sopstageMixinInters2[0]
- sopstageMixinFields0 := sopstageMixin[0].Fields()
- _ = sopstageMixinFields0
- sopstageMixinFields1 := sopstageMixin[1].Fields()
- _ = sopstageMixinFields1
- sopstageFields := schema.SopStage{}.Fields()
- _ = sopstageFields
- // sopstageDescCreatedAt is the schema descriptor for created_at field.
- sopstageDescCreatedAt := sopstageMixinFields0[1].Descriptor()
- // sopstage.DefaultCreatedAt holds the default value on creation for the created_at field.
- sopstage.DefaultCreatedAt = sopstageDescCreatedAt.Default.(func() time.Time)
- // sopstageDescUpdatedAt is the schema descriptor for updated_at field.
- sopstageDescUpdatedAt := sopstageMixinFields0[2].Descriptor()
- // sopstage.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- sopstage.DefaultUpdatedAt = sopstageDescUpdatedAt.Default.(func() time.Time)
- // sopstage.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- sopstage.UpdateDefaultUpdatedAt = sopstageDescUpdatedAt.UpdateDefault.(func() time.Time)
- // sopstageDescStatus is the schema descriptor for status field.
- sopstageDescStatus := sopstageMixinFields1[0].Descriptor()
- // sopstage.DefaultStatus holds the default value on creation for the status field.
- sopstage.DefaultStatus = sopstageDescStatus.Default.(uint8)
- // sopstageDescName is the schema descriptor for name field.
- sopstageDescName := sopstageFields[1].Descriptor()
- // sopstage.DefaultName holds the default value on creation for the name field.
- sopstage.DefaultName = sopstageDescName.Default.(string)
- // sopstageDescConditionType is the schema descriptor for condition_type field.
- sopstageDescConditionType := sopstageFields[2].Descriptor()
- // sopstage.DefaultConditionType holds the default value on creation for the condition_type field.
- sopstage.DefaultConditionType = sopstageDescConditionType.Default.(int)
- // sopstageDescConditionOperator is the schema descriptor for condition_operator field.
- sopstageDescConditionOperator := sopstageFields[3].Descriptor()
- // sopstage.DefaultConditionOperator holds the default value on creation for the condition_operator field.
- sopstage.DefaultConditionOperator = sopstageDescConditionOperator.Default.(int)
- // sopstageDescIndexSort is the schema descriptor for index_sort field.
- sopstageDescIndexSort := sopstageFields[7].Descriptor()
- // sopstage.DefaultIndexSort holds the default value on creation for the index_sort field.
- sopstage.DefaultIndexSort = sopstageDescIndexSort.Default.(int)
- soptaskMixin := schema.SopTask{}.Mixin()
- soptaskMixinHooks2 := soptaskMixin[2].Hooks()
- soptask.Hooks[0] = soptaskMixinHooks2[0]
- soptaskMixinInters2 := soptaskMixin[2].Interceptors()
- soptask.Interceptors[0] = soptaskMixinInters2[0]
- soptaskMixinFields0 := soptaskMixin[0].Fields()
- _ = soptaskMixinFields0
- soptaskMixinFields1 := soptaskMixin[1].Fields()
- _ = soptaskMixinFields1
- soptaskFields := schema.SopTask{}.Fields()
- _ = soptaskFields
- // soptaskDescCreatedAt is the schema descriptor for created_at field.
- soptaskDescCreatedAt := soptaskMixinFields0[1].Descriptor()
- // soptask.DefaultCreatedAt holds the default value on creation for the created_at field.
- soptask.DefaultCreatedAt = soptaskDescCreatedAt.Default.(func() time.Time)
- // soptaskDescUpdatedAt is the schema descriptor for updated_at field.
- soptaskDescUpdatedAt := soptaskMixinFields0[2].Descriptor()
- // soptask.DefaultUpdatedAt holds the default value on creation for the updated_at field.
- soptask.DefaultUpdatedAt = soptaskDescUpdatedAt.Default.(func() time.Time)
- // soptask.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
- soptask.UpdateDefaultUpdatedAt = soptaskDescUpdatedAt.UpdateDefault.(func() time.Time)
- // soptaskDescStatus is the schema descriptor for status field.
- soptaskDescStatus := soptaskMixinFields1[0].Descriptor()
- // soptask.DefaultStatus holds the default value on creation for the status field.
- soptask.DefaultStatus = soptaskDescStatus.Default.(uint8)
- // soptaskDescName is the schema descriptor for name field.
- soptaskDescName := soptaskFields[0].Descriptor()
- // soptask.NameValidator is a validator for the "name" field. It is called by the builders before save.
- soptask.NameValidator = soptaskDescName.Validators[0].(func(string) error)
- // soptaskDescType is the schema descriptor for type field.
- soptaskDescType := soptaskFields[2].Descriptor()
- // soptask.DefaultType holds the default value on creation for the type field.
- soptask.DefaultType = soptaskDescType.Default.(int)
- // soptaskDescOrganizationID is the schema descriptor for organization_id field.
- soptaskDescOrganizationID := soptaskFields[6].Descriptor()
- // soptask.DefaultOrganizationID holds the default value on creation for the organization_id field.
- soptask.DefaultOrganizationID = soptaskDescOrganizationID.Default.(uint64)
- 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)
- // wxDescOrganizationID is the schema descriptor for organization_id field.
- wxDescOrganizationID := wxFields[9].Descriptor()
- // wx.DefaultOrganizationID holds the default value on creation for the organization_id field.
- wx.DefaultOrganizationID = wxDescOrganizationID.Default.(uint64)
- }
- const (
- Version = "v0.13.1" // Version of ent codegen.
- Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen.
- )
|