// Code generated by ent, DO NOT EDIT. package ent import ( "time" "github.com/suyuan32/simple-admin-job/ent/messagerecords" "github.com/suyuan32/simple-admin-job/ent/schema" "github.com/suyuan32/simple-admin-job/ent/sopnode" "github.com/suyuan32/simple-admin-job/ent/sopstage" "github.com/suyuan32/simple-admin-job/ent/soptask" "github.com/suyuan32/simple-admin-job/ent/task" "github.com/suyuan32/simple-admin-job/ent/tasklog" ) // 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() { messagerecordsMixin := schema.MessageRecords{}.Mixin() 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) sopnodeMixin := schema.SopNode{}.Mixin() 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() 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() 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) taskMixin := schema.Task{}.Mixin() taskMixinFields0 := taskMixin[0].Fields() _ = taskMixinFields0 taskMixinFields1 := taskMixin[1].Fields() _ = taskMixinFields1 taskFields := schema.Task{}.Fields() _ = taskFields // taskDescCreatedAt is the schema descriptor for created_at field. taskDescCreatedAt := taskMixinFields0[1].Descriptor() // task.DefaultCreatedAt holds the default value on creation for the created_at field. task.DefaultCreatedAt = taskDescCreatedAt.Default.(func() time.Time) // taskDescUpdatedAt is the schema descriptor for updated_at field. taskDescUpdatedAt := taskMixinFields0[2].Descriptor() // task.DefaultUpdatedAt holds the default value on creation for the updated_at field. task.DefaultUpdatedAt = taskDescUpdatedAt.Default.(func() time.Time) // task.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. task.UpdateDefaultUpdatedAt = taskDescUpdatedAt.UpdateDefault.(func() time.Time) // taskDescStatus is the schema descriptor for status field. taskDescStatus := taskMixinFields1[0].Descriptor() // task.DefaultStatus holds the default value on creation for the status field. task.DefaultStatus = taskDescStatus.Default.(uint8) tasklogFields := schema.TaskLog{}.Fields() _ = tasklogFields // tasklogDescStartedAt is the schema descriptor for started_at field. tasklogDescStartedAt := tasklogFields[1].Descriptor() // tasklog.DefaultStartedAt holds the default value on creation for the started_at field. tasklog.DefaultStartedAt = tasklogDescStartedAt.Default.(func() time.Time) }