Files

921 lines
57 KiB
Go

// Code generated by ent, DO NOT EDIT.
package runtime
import (
"time"
"github.com/chaitin/MonkeyCode/backend/consts"
"github.com/chaitin/MonkeyCode/backend/db/audit"
"github.com/chaitin/MonkeyCode/backend/db/gitbot"
"github.com/chaitin/MonkeyCode/backend/db/gitbottask"
"github.com/chaitin/MonkeyCode/backend/db/gitbotuser"
"github.com/chaitin/MonkeyCode/backend/db/gitidentity"
"github.com/chaitin/MonkeyCode/backend/db/gittask"
"github.com/chaitin/MonkeyCode/backend/db/host"
"github.com/chaitin/MonkeyCode/backend/db/image"
"github.com/chaitin/MonkeyCode/backend/db/mcptool"
"github.com/chaitin/MonkeyCode/backend/db/mcpupstream"
"github.com/chaitin/MonkeyCode/backend/db/mcpusertoolsetting"
"github.com/chaitin/MonkeyCode/backend/db/model"
"github.com/chaitin/MonkeyCode/backend/db/modelapikey"
"github.com/chaitin/MonkeyCode/backend/db/modelpricing"
"github.com/chaitin/MonkeyCode/backend/db/notifychannel"
"github.com/chaitin/MonkeyCode/backend/db/notifysendlog"
"github.com/chaitin/MonkeyCode/backend/db/notifysubscription"
"github.com/chaitin/MonkeyCode/backend/db/project"
"github.com/chaitin/MonkeyCode/backend/db/projectcollaborator"
"github.com/chaitin/MonkeyCode/backend/db/projectgitbot"
"github.com/chaitin/MonkeyCode/backend/db/projectissue"
"github.com/chaitin/MonkeyCode/backend/db/projectissuecomment"
"github.com/chaitin/MonkeyCode/backend/db/projecttask"
"github.com/chaitin/MonkeyCode/backend/db/task"
"github.com/chaitin/MonkeyCode/backend/db/taskmodelswitch"
"github.com/chaitin/MonkeyCode/backend/db/taskusagestat"
"github.com/chaitin/MonkeyCode/backend/db/taskvirtualmachine"
"github.com/chaitin/MonkeyCode/backend/db/team"
"github.com/chaitin/MonkeyCode/backend/db/teamgroup"
"github.com/chaitin/MonkeyCode/backend/db/teamgrouphost"
"github.com/chaitin/MonkeyCode/backend/db/teamgroupimage"
"github.com/chaitin/MonkeyCode/backend/db/teamgroupmember"
"github.com/chaitin/MonkeyCode/backend/db/teamgroupmodel"
"github.com/chaitin/MonkeyCode/backend/db/teamhost"
"github.com/chaitin/MonkeyCode/backend/db/teamimage"
"github.com/chaitin/MonkeyCode/backend/db/teammember"
"github.com/chaitin/MonkeyCode/backend/db/teammodel"
"github.com/chaitin/MonkeyCode/backend/db/user"
"github.com/chaitin/MonkeyCode/backend/db/useridentity"
"github.com/chaitin/MonkeyCode/backend/db/virtualmachine"
"github.com/chaitin/MonkeyCode/backend/ent/schema"
"github.com/google/uuid"
)
// 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() {
auditFields := schema.Audit{}.Fields()
_ = auditFields
// auditDescCreatedAt is the schema descriptor for created_at field.
auditDescCreatedAt := auditFields[7].Descriptor()
// audit.DefaultCreatedAt holds the default value on creation for the created_at field.
audit.DefaultCreatedAt = auditDescCreatedAt.Default.(func() time.Time)
gitbotMixin := schema.GitBot{}.Mixin()
gitbotMixinHooks0 := gitbotMixin[0].Hooks()
gitbot.Hooks[0] = gitbotMixinHooks0[0]
gitbotMixinInters0 := gitbotMixin[0].Interceptors()
gitbot.Interceptors[0] = gitbotMixinInters0[0]
gitbotFields := schema.GitBot{}.Fields()
_ = gitbotFields
// gitbotDescCreatedAt is the schema descriptor for created_at field.
gitbotDescCreatedAt := gitbotFields[7].Descriptor()
// gitbot.DefaultCreatedAt holds the default value on creation for the created_at field.
gitbot.DefaultCreatedAt = gitbotDescCreatedAt.Default.(func() time.Time)
gitbottaskFields := schema.GitBotTask{}.Fields()
_ = gitbottaskFields
// gitbottaskDescCreatedAt is the schema descriptor for created_at field.
gitbottaskDescCreatedAt := gitbottaskFields[3].Descriptor()
// gitbottask.DefaultCreatedAt holds the default value on creation for the created_at field.
gitbottask.DefaultCreatedAt = gitbottaskDescCreatedAt.Default.(func() time.Time)
// gitbottaskDescID is the schema descriptor for id field.
gitbottaskDescID := gitbottaskFields[0].Descriptor()
// gitbottask.DefaultID holds the default value on creation for the id field.
gitbottask.DefaultID = gitbottaskDescID.Default.(func() uuid.UUID)
gitbotuserFields := schema.GitBotUser{}.Fields()
_ = gitbotuserFields
// gitbotuserDescCreatedAt is the schema descriptor for created_at field.
gitbotuserDescCreatedAt := gitbotuserFields[3].Descriptor()
// gitbotuser.DefaultCreatedAt holds the default value on creation for the created_at field.
gitbotuser.DefaultCreatedAt = gitbotuserDescCreatedAt.Default.(func() time.Time)
// gitbotuserDescID is the schema descriptor for id field.
gitbotuserDescID := gitbotuserFields[0].Descriptor()
// gitbotuser.DefaultID holds the default value on creation for the id field.
gitbotuser.DefaultID = gitbotuserDescID.Default.(func() uuid.UUID)
gitidentityMixin := schema.GitIdentity{}.Mixin()
gitidentityMixinHooks0 := gitidentityMixin[0].Hooks()
gitidentity.Hooks[0] = gitidentityMixinHooks0[0]
gitidentityMixinInters0 := gitidentityMixin[0].Interceptors()
gitidentity.Interceptors[0] = gitidentityMixinInters0[0]
gitidentityFields := schema.GitIdentity{}.Fields()
_ = gitidentityFields
// gitidentityDescCreatedAt is the schema descriptor for created_at field.
gitidentityDescCreatedAt := gitidentityFields[11].Descriptor()
// gitidentity.DefaultCreatedAt holds the default value on creation for the created_at field.
gitidentity.DefaultCreatedAt = gitidentityDescCreatedAt.Default.(func() time.Time)
// gitidentityDescUpdatedAt is the schema descriptor for updated_at field.
gitidentityDescUpdatedAt := gitidentityFields[12].Descriptor()
// gitidentity.DefaultUpdatedAt holds the default value on creation for the updated_at field.
gitidentity.DefaultUpdatedAt = gitidentityDescUpdatedAt.Default.(func() time.Time)
// gitidentity.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
gitidentity.UpdateDefaultUpdatedAt = gitidentityDescUpdatedAt.UpdateDefault.(func() time.Time)
gittaskFields := schema.GitTask{}.Fields()
_ = gittaskFields
// gittaskDescSubjectType is the schema descriptor for subject_type field.
gittaskDescSubjectType := gittaskFields[3].Descriptor()
// gittask.SubjectTypeValidator is a validator for the "subject_type" field. It is called by the builders before save.
gittask.SubjectTypeValidator = gittaskDescSubjectType.Validators[0].(func(string) error)
// gittaskDescCreatedAt is the schema descriptor for created_at field.
gittaskDescCreatedAt := gittaskFields[11].Descriptor()
// gittask.DefaultCreatedAt holds the default value on creation for the created_at field.
gittask.DefaultCreatedAt = gittaskDescCreatedAt.Default.(func() time.Time)
hostMixin := schema.Host{}.Mixin()
hostMixinHooks0 := hostMixin[0].Hooks()
host.Hooks[0] = hostMixinHooks0[0]
hostMixinInters0 := hostMixin[0].Interceptors()
host.Interceptors[0] = hostMixinInters0[0]
hostFields := schema.Host{}.Fields()
_ = hostFields
// hostDescWeight is the schema descriptor for weight field.
hostDescWeight := hostFields[5].Descriptor()
// host.DefaultWeight holds the default value on creation for the weight field.
host.DefaultWeight = hostDescWeight.Default.(int)
// hostDescCreatedAt is the schema descriptor for created_at field.
hostDescCreatedAt := hostFields[14].Descriptor()
// host.DefaultCreatedAt holds the default value on creation for the created_at field.
host.DefaultCreatedAt = hostDescCreatedAt.Default.(func() time.Time)
// hostDescUpdatedAt is the schema descriptor for updated_at field.
hostDescUpdatedAt := hostFields[15].Descriptor()
// host.DefaultUpdatedAt holds the default value on creation for the updated_at field.
host.DefaultUpdatedAt = hostDescUpdatedAt.Default.(func() time.Time)
// host.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
host.UpdateDefaultUpdatedAt = hostDescUpdatedAt.UpdateDefault.(func() time.Time)
imageMixin := schema.Image{}.Mixin()
imageMixinHooks0 := imageMixin[0].Hooks()
image.Hooks[0] = imageMixinHooks0[0]
imageMixinInters0 := imageMixin[0].Interceptors()
image.Interceptors[0] = imageMixinInters0[0]
imageFields := schema.Image{}.Fields()
_ = imageFields
// imageDescName is the schema descriptor for name field.
imageDescName := imageFields[2].Descriptor()
// image.NameValidator is a validator for the "name" field. It is called by the builders before save.
image.NameValidator = imageDescName.Validators[0].(func(string) error)
// imageDescCreatedAt is the schema descriptor for created_at field.
imageDescCreatedAt := imageFields[4].Descriptor()
// image.DefaultCreatedAt holds the default value on creation for the created_at field.
image.DefaultCreatedAt = imageDescCreatedAt.Default.(func() time.Time)
// imageDescUpdatedAt is the schema descriptor for updated_at field.
imageDescUpdatedAt := imageFields[5].Descriptor()
// image.DefaultUpdatedAt holds the default value on creation for the updated_at field.
image.DefaultUpdatedAt = imageDescUpdatedAt.Default.(func() time.Time)
// image.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
image.UpdateDefaultUpdatedAt = imageDescUpdatedAt.UpdateDefault.(func() time.Time)
mcptoolMixin := schema.MCPTool{}.Mixin()
mcptoolMixinHooks0 := mcptoolMixin[0].Hooks()
mcptool.Hooks[0] = mcptoolMixinHooks0[0]
mcptoolMixinInters0 := mcptoolMixin[0].Interceptors()
mcptool.Interceptors[0] = mcptoolMixinInters0[0]
mcptoolFields := schema.MCPTool{}.Fields()
_ = mcptoolFields
// mcptoolDescName is the schema descriptor for name field.
mcptoolDescName := mcptoolFields[2].Descriptor()
// mcptool.NameValidator is a validator for the "name" field. It is called by the builders before save.
mcptool.NameValidator = func() func(string) error {
validators := mcptoolDescName.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
}
}()
// mcptoolDescNamespacedName is the schema descriptor for namespaced_name field.
mcptoolDescNamespacedName := mcptoolFields[3].Descriptor()
// mcptool.NamespacedNameValidator is a validator for the "namespaced_name" field. It is called by the builders before save.
mcptool.NamespacedNameValidator = func() func(string) error {
validators := mcptoolDescNamespacedName.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(namespaced_name string) error {
for _, fn := range fns {
if err := fn(namespaced_name); err != nil {
return err
}
}
return nil
}
}()
// mcptoolDescPrice is the schema descriptor for price field.
mcptoolDescPrice := mcptoolFields[8].Descriptor()
// mcptool.DefaultPrice holds the default value on creation for the price field.
mcptool.DefaultPrice = mcptoolDescPrice.Default.(int64)
// mcptoolDescEnabled is the schema descriptor for enabled field.
mcptoolDescEnabled := mcptoolFields[9].Descriptor()
// mcptool.DefaultEnabled holds the default value on creation for the enabled field.
mcptool.DefaultEnabled = mcptoolDescEnabled.Default.(bool)
// mcptoolDescVersionHash is the schema descriptor for version_hash field.
mcptoolDescVersionHash := mcptoolFields[10].Descriptor()
// mcptool.VersionHashValidator is a validator for the "version_hash" field. It is called by the builders before save.
mcptool.VersionHashValidator = mcptoolDescVersionHash.Validators[0].(func(string) error)
// mcptoolDescCreatedAt is the schema descriptor for created_at field.
mcptoolDescCreatedAt := mcptoolFields[12].Descriptor()
// mcptool.DefaultCreatedAt holds the default value on creation for the created_at field.
mcptool.DefaultCreatedAt = mcptoolDescCreatedAt.Default.(func() time.Time)
// mcptoolDescUpdatedAt is the schema descriptor for updated_at field.
mcptoolDescUpdatedAt := mcptoolFields[13].Descriptor()
// mcptool.DefaultUpdatedAt holds the default value on creation for the updated_at field.
mcptool.DefaultUpdatedAt = mcptoolDescUpdatedAt.Default.(func() time.Time)
// mcptool.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
mcptool.UpdateDefaultUpdatedAt = mcptoolDescUpdatedAt.UpdateDefault.(func() time.Time)
mcpupstreamMixin := schema.MCPUpstream{}.Mixin()
mcpupstreamMixinHooks0 := mcpupstreamMixin[0].Hooks()
mcpupstream.Hooks[0] = mcpupstreamMixinHooks0[0]
mcpupstreamMixinInters0 := mcpupstreamMixin[0].Interceptors()
mcpupstream.Interceptors[0] = mcpupstreamMixinInters0[0]
mcpupstreamFields := schema.MCPUpstream{}.Fields()
_ = mcpupstreamFields
// mcpupstreamDescName is the schema descriptor for name field.
mcpupstreamDescName := mcpupstreamFields[1].Descriptor()
// mcpupstream.NameValidator is a validator for the "name" field. It is called by the builders before save.
mcpupstream.NameValidator = func() func(string) error {
validators := mcpupstreamDescName.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
}
}()
// mcpupstreamDescSlug is the schema descriptor for slug field.
mcpupstreamDescSlug := mcpupstreamFields[2].Descriptor()
// mcpupstream.SlugValidator is a validator for the "slug" field. It is called by the builders before save.
mcpupstream.SlugValidator = func() func(string) error {
validators := mcpupstreamDescSlug.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(slug string) error {
for _, fn := range fns {
if err := fn(slug); err != nil {
return err
}
}
return nil
}
}()
// mcpupstreamDescType is the schema descriptor for type field.
mcpupstreamDescType := mcpupstreamFields[5].Descriptor()
// mcpupstream.DefaultType holds the default value on creation for the type field.
mcpupstream.DefaultType = mcpupstreamDescType.Default.(string)
// mcpupstream.TypeValidator is a validator for the "type" field. It is called by the builders before save.
mcpupstream.TypeValidator = func() func(string) error {
validators := mcpupstreamDescType.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
}
}()
// mcpupstreamDescURL is the schema descriptor for url field.
mcpupstreamDescURL := mcpupstreamFields[6].Descriptor()
// mcpupstream.URLValidator is a validator for the "url" field. It is called by the builders before save.
mcpupstream.URLValidator = mcpupstreamDescURL.Validators[0].(func(string) error)
// mcpupstreamDescEnabled is the schema descriptor for enabled field.
mcpupstreamDescEnabled := mcpupstreamFields[9].Descriptor()
// mcpupstream.DefaultEnabled holds the default value on creation for the enabled field.
mcpupstream.DefaultEnabled = mcpupstreamDescEnabled.Default.(bool)
// mcpupstreamDescHealthStatus is the schema descriptor for health_status field.
mcpupstreamDescHealthStatus := mcpupstreamFields[10].Descriptor()
// mcpupstream.DefaultHealthStatus holds the default value on creation for the health_status field.
mcpupstream.DefaultHealthStatus = mcpupstreamDescHealthStatus.Default.(string)
// mcpupstream.HealthStatusValidator is a validator for the "health_status" field. It is called by the builders before save.
mcpupstream.HealthStatusValidator = func() func(string) error {
validators := mcpupstreamDescHealthStatus.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(health_status string) error {
for _, fn := range fns {
if err := fn(health_status); err != nil {
return err
}
}
return nil
}
}()
// mcpupstreamDescSyncStatus is the schema descriptor for sync_status field.
mcpupstreamDescSyncStatus := mcpupstreamFields[11].Descriptor()
// mcpupstream.DefaultSyncStatus holds the default value on creation for the sync_status field.
mcpupstream.DefaultSyncStatus = mcpupstreamDescSyncStatus.Default.(string)
// mcpupstream.SyncStatusValidator is a validator for the "sync_status" field. It is called by the builders before save.
mcpupstream.SyncStatusValidator = func() func(string) error {
validators := mcpupstreamDescSyncStatus.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(sync_status string) error {
for _, fn := range fns {
if err := fn(sync_status); err != nil {
return err
}
}
return nil
}
}()
// mcpupstreamDescCreatedAt is the schema descriptor for created_at field.
mcpupstreamDescCreatedAt := mcpupstreamFields[14].Descriptor()
// mcpupstream.DefaultCreatedAt holds the default value on creation for the created_at field.
mcpupstream.DefaultCreatedAt = mcpupstreamDescCreatedAt.Default.(func() time.Time)
// mcpupstreamDescUpdatedAt is the schema descriptor for updated_at field.
mcpupstreamDescUpdatedAt := mcpupstreamFields[15].Descriptor()
// mcpupstream.DefaultUpdatedAt holds the default value on creation for the updated_at field.
mcpupstream.DefaultUpdatedAt = mcpupstreamDescUpdatedAt.Default.(func() time.Time)
// mcpupstream.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
mcpupstream.UpdateDefaultUpdatedAt = mcpupstreamDescUpdatedAt.UpdateDefault.(func() time.Time)
mcpusertoolsettingFields := schema.MCPUserToolSetting{}.Fields()
_ = mcpusertoolsettingFields
// mcpusertoolsettingDescEnabled is the schema descriptor for enabled field.
mcpusertoolsettingDescEnabled := mcpusertoolsettingFields[3].Descriptor()
// mcpusertoolsetting.DefaultEnabled holds the default value on creation for the enabled field.
mcpusertoolsetting.DefaultEnabled = mcpusertoolsettingDescEnabled.Default.(bool)
// mcpusertoolsettingDescCreatedAt is the schema descriptor for created_at field.
mcpusertoolsettingDescCreatedAt := mcpusertoolsettingFields[4].Descriptor()
// mcpusertoolsetting.DefaultCreatedAt holds the default value on creation for the created_at field.
mcpusertoolsetting.DefaultCreatedAt = mcpusertoolsettingDescCreatedAt.Default.(func() time.Time)
// mcpusertoolsettingDescUpdatedAt is the schema descriptor for updated_at field.
mcpusertoolsettingDescUpdatedAt := mcpusertoolsettingFields[5].Descriptor()
// mcpusertoolsetting.DefaultUpdatedAt holds the default value on creation for the updated_at field.
mcpusertoolsetting.DefaultUpdatedAt = mcpusertoolsettingDescUpdatedAt.Default.(func() time.Time)
// mcpusertoolsetting.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
mcpusertoolsetting.UpdateDefaultUpdatedAt = mcpusertoolsettingDescUpdatedAt.UpdateDefault.(func() time.Time)
modelMixin := schema.Model{}.Mixin()
modelMixinHooks0 := modelMixin[0].Hooks()
model.Hooks[0] = modelMixinHooks0[0]
modelMixinInters0 := modelMixin[0].Interceptors()
model.Interceptors[0] = modelMixinInters0[0]
modelFields := schema.Model{}.Fields()
_ = modelFields
// modelDescProvider is the schema descriptor for provider field.
modelDescProvider := modelFields[2].Descriptor()
// model.ProviderValidator is a validator for the "provider" field. It is called by the builders before save.
model.ProviderValidator = modelDescProvider.Validators[0].(func(string) error)
// modelDescAPIKey is the schema descriptor for api_key field.
modelDescAPIKey := modelFields[3].Descriptor()
// model.APIKeyValidator is a validator for the "api_key" field. It is called by the builders before save.
model.APIKeyValidator = modelDescAPIKey.Validators[0].(func(string) error)
// modelDescBaseURL is the schema descriptor for base_url field.
modelDescBaseURL := modelFields[4].Descriptor()
// model.BaseURLValidator is a validator for the "base_url" field. It is called by the builders before save.
model.BaseURLValidator = modelDescBaseURL.Validators[0].(func(string) error)
// modelDescModel is the schema descriptor for model field.
modelDescModel := modelFields[5].Descriptor()
// model.ModelValidator is a validator for the "model" field. It is called by the builders before save.
model.ModelValidator = modelDescModel.Validators[0].(func(string) error)
// modelDescWeight is the schema descriptor for weight field.
modelDescWeight := modelFields[9].Descriptor()
// model.DefaultWeight holds the default value on creation for the weight field.
model.DefaultWeight = modelDescWeight.Default.(int)
// modelDescThinkingEnabled is the schema descriptor for thinking_enabled field.
modelDescThinkingEnabled := modelFields[10].Descriptor()
// model.DefaultThinkingEnabled holds the default value on creation for the thinking_enabled field.
model.DefaultThinkingEnabled = modelDescThinkingEnabled.Default.(bool)
// modelDescSupportImage is the schema descriptor for support_image field.
modelDescSupportImage := modelFields[11].Descriptor()
// model.DefaultSupportImage holds the default value on creation for the support_image field.
model.DefaultSupportImage = modelDescSupportImage.Default.(bool)
// modelDescIsHidden is the schema descriptor for is_hidden field.
modelDescIsHidden := modelFields[12].Descriptor()
// model.DefaultIsHidden holds the default value on creation for the is_hidden field.
model.DefaultIsHidden = modelDescIsHidden.Default.(bool)
// modelDescContextLimit is the schema descriptor for context_limit field.
modelDescContextLimit := modelFields[13].Descriptor()
// model.DefaultContextLimit holds the default value on creation for the context_limit field.
model.DefaultContextLimit = modelDescContextLimit.Default.(int)
// modelDescOutputLimit is the schema descriptor for output_limit field.
modelDescOutputLimit := modelFields[14].Descriptor()
// model.DefaultOutputLimit holds the default value on creation for the output_limit field.
model.DefaultOutputLimit = modelDescOutputLimit.Default.(int)
// modelDescCreatedAt is the schema descriptor for created_at field.
modelDescCreatedAt := modelFields[18].Descriptor()
// model.DefaultCreatedAt holds the default value on creation for the created_at field.
model.DefaultCreatedAt = modelDescCreatedAt.Default.(func() time.Time)
// modelDescUpdatedAt is the schema descriptor for updated_at field.
modelDescUpdatedAt := modelFields[19].Descriptor()
// model.DefaultUpdatedAt holds the default value on creation for the updated_at field.
model.DefaultUpdatedAt = modelDescUpdatedAt.Default.(func() time.Time)
// model.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
model.UpdateDefaultUpdatedAt = modelDescUpdatedAt.UpdateDefault.(func() time.Time)
modelapikeyMixin := schema.ModelApiKey{}.Mixin()
modelapikeyMixinHooks0 := modelapikeyMixin[0].Hooks()
modelapikey.Hooks[0] = modelapikeyMixinHooks0[0]
modelapikeyMixinInters0 := modelapikeyMixin[0].Interceptors()
modelapikey.Interceptors[0] = modelapikeyMixinInters0[0]
modelapikeyFields := schema.ModelApiKey{}.Fields()
_ = modelapikeyFields
// modelapikeyDescAPIKey is the schema descriptor for api_key field.
modelapikeyDescAPIKey := modelapikeyFields[4].Descriptor()
// modelapikey.APIKeyValidator is a validator for the "api_key" field. It is called by the builders before save.
modelapikey.APIKeyValidator = modelapikeyDescAPIKey.Validators[0].(func(string) error)
// modelapikeyDescCreatedAt is the schema descriptor for created_at field.
modelapikeyDescCreatedAt := modelapikeyFields[5].Descriptor()
// modelapikey.DefaultCreatedAt holds the default value on creation for the created_at field.
modelapikey.DefaultCreatedAt = modelapikeyDescCreatedAt.Default.(func() time.Time)
modelpricingFields := schema.ModelPricing{}.Fields()
_ = modelpricingFields
// modelpricingDescAccessLevel is the schema descriptor for access_level field.
modelpricingDescAccessLevel := modelpricingFields[2].Descriptor()
// modelpricing.AccessLevelValidator is a validator for the "access_level" field. It is called by the builders before save.
modelpricing.AccessLevelValidator = modelpricingDescAccessLevel.Validators[0].(func(string) error)
// modelpricingDescIsFree is the schema descriptor for is_free field.
modelpricingDescIsFree := modelpricingFields[3].Descriptor()
// modelpricing.DefaultIsFree holds the default value on creation for the is_free field.
modelpricing.DefaultIsFree = modelpricingDescIsFree.Default.(bool)
// modelpricingDescInputPrice is the schema descriptor for input_price field.
modelpricingDescInputPrice := modelpricingFields[4].Descriptor()
// modelpricing.DefaultInputPrice holds the default value on creation for the input_price field.
modelpricing.DefaultInputPrice = modelpricingDescInputPrice.Default.(int64)
// modelpricingDescOutputPrice is the schema descriptor for output_price field.
modelpricingDescOutputPrice := modelpricingFields[5].Descriptor()
// modelpricing.DefaultOutputPrice holds the default value on creation for the output_price field.
modelpricing.DefaultOutputPrice = modelpricingDescOutputPrice.Default.(int64)
// modelpricingDescCreatedAt is the schema descriptor for created_at field.
modelpricingDescCreatedAt := modelpricingFields[6].Descriptor()
// modelpricing.DefaultCreatedAt holds the default value on creation for the created_at field.
modelpricing.DefaultCreatedAt = modelpricingDescCreatedAt.Default.(func() time.Time)
// modelpricingDescUpdatedAt is the schema descriptor for updated_at field.
modelpricingDescUpdatedAt := modelpricingFields[7].Descriptor()
// modelpricing.DefaultUpdatedAt holds the default value on creation for the updated_at field.
modelpricing.DefaultUpdatedAt = modelpricingDescUpdatedAt.Default.(func() time.Time)
// modelpricing.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
modelpricing.UpdateDefaultUpdatedAt = modelpricingDescUpdatedAt.UpdateDefault.(func() time.Time)
notifychannelMixin := schema.NotifyChannel{}.Mixin()
notifychannelMixinHooks0 := notifychannelMixin[0].Hooks()
notifychannel.Hooks[0] = notifychannelMixinHooks0[0]
notifychannelMixinInters0 := notifychannelMixin[0].Interceptors()
notifychannel.Interceptors[0] = notifychannelMixinInters0[0]
notifychannelFields := schema.NotifyChannel{}.Fields()
_ = notifychannelFields
// notifychannelDescOwnerType is the schema descriptor for owner_type field.
notifychannelDescOwnerType := notifychannelFields[2].Descriptor()
// notifychannel.DefaultOwnerType holds the default value on creation for the owner_type field.
notifychannel.DefaultOwnerType = consts.NotifyOwnerType(notifychannelDescOwnerType.Default.(string))
// notifychannelDescName is the schema descriptor for name field.
notifychannelDescName := notifychannelFields[3].Descriptor()
// notifychannel.NameValidator is a validator for the "name" field. It is called by the builders before save.
notifychannel.NameValidator = func() func(string) error {
validators := notifychannelDescName.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
}
}()
// notifychannelDescSecret is the schema descriptor for secret field.
notifychannelDescSecret := notifychannelFields[6].Descriptor()
// notifychannel.DefaultSecret holds the default value on creation for the secret field.
notifychannel.DefaultSecret = notifychannelDescSecret.Default.(string)
// notifychannelDescTargetID is the schema descriptor for target_id field.
notifychannelDescTargetID := notifychannelFields[9].Descriptor()
// notifychannel.DefaultTargetID holds the default value on creation for the target_id field.
notifychannel.DefaultTargetID = notifychannelDescTargetID.Default.(string)
// notifychannelDescEnabled is the schema descriptor for enabled field.
notifychannelDescEnabled := notifychannelFields[10].Descriptor()
// notifychannel.DefaultEnabled holds the default value on creation for the enabled field.
notifychannel.DefaultEnabled = notifychannelDescEnabled.Default.(bool)
// notifychannelDescCreatedAt is the schema descriptor for created_at field.
notifychannelDescCreatedAt := notifychannelFields[11].Descriptor()
// notifychannel.DefaultCreatedAt holds the default value on creation for the created_at field.
notifychannel.DefaultCreatedAt = notifychannelDescCreatedAt.Default.(func() time.Time)
// notifychannelDescUpdatedAt is the schema descriptor for updated_at field.
notifychannelDescUpdatedAt := notifychannelFields[12].Descriptor()
// notifychannel.DefaultUpdatedAt holds the default value on creation for the updated_at field.
notifychannel.DefaultUpdatedAt = notifychannelDescUpdatedAt.Default.(func() time.Time)
// notifychannel.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
notifychannel.UpdateDefaultUpdatedAt = notifychannelDescUpdatedAt.UpdateDefault.(func() time.Time)
notifysendlogFields := schema.NotifySendLog{}.Fields()
_ = notifysendlogFields
// notifysendlogDescError is the schema descriptor for error field.
notifysendlogDescError := notifysendlogFields[6].Descriptor()
// notifysendlog.DefaultError holds the default value on creation for the error field.
notifysendlog.DefaultError = notifysendlogDescError.Default.(string)
// notifysendlogDescCreatedAt is the schema descriptor for created_at field.
notifysendlogDescCreatedAt := notifysendlogFields[7].Descriptor()
// notifysendlog.DefaultCreatedAt holds the default value on creation for the created_at field.
notifysendlog.DefaultCreatedAt = notifysendlogDescCreatedAt.Default.(func() time.Time)
notifysubscriptionMixin := schema.NotifySubscription{}.Mixin()
notifysubscriptionMixinHooks0 := notifysubscriptionMixin[0].Hooks()
notifysubscription.Hooks[0] = notifysubscriptionMixinHooks0[0]
notifysubscriptionMixinInters0 := notifysubscriptionMixin[0].Interceptors()
notifysubscription.Interceptors[0] = notifysubscriptionMixinInters0[0]
notifysubscriptionFields := schema.NotifySubscription{}.Fields()
_ = notifysubscriptionFields
// notifysubscriptionDescScope is the schema descriptor for scope field.
notifysubscriptionDescScope := notifysubscriptionFields[2].Descriptor()
// notifysubscription.DefaultScope holds the default value on creation for the scope field.
notifysubscription.DefaultScope = notifysubscriptionDescScope.Default.(string)
// notifysubscriptionDescEnabled is the schema descriptor for enabled field.
notifysubscriptionDescEnabled := notifysubscriptionFields[4].Descriptor()
// notifysubscription.DefaultEnabled holds the default value on creation for the enabled field.
notifysubscription.DefaultEnabled = notifysubscriptionDescEnabled.Default.(bool)
// notifysubscriptionDescCreatedAt is the schema descriptor for created_at field.
notifysubscriptionDescCreatedAt := notifysubscriptionFields[5].Descriptor()
// notifysubscription.DefaultCreatedAt holds the default value on creation for the created_at field.
notifysubscription.DefaultCreatedAt = notifysubscriptionDescCreatedAt.Default.(func() time.Time)
// notifysubscriptionDescUpdatedAt is the schema descriptor for updated_at field.
notifysubscriptionDescUpdatedAt := notifysubscriptionFields[6].Descriptor()
// notifysubscription.DefaultUpdatedAt holds the default value on creation for the updated_at field.
notifysubscription.DefaultUpdatedAt = notifysubscriptionDescUpdatedAt.Default.(func() time.Time)
// notifysubscription.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
notifysubscription.UpdateDefaultUpdatedAt = notifysubscriptionDescUpdatedAt.UpdateDefault.(func() time.Time)
projectMixin := schema.Project{}.Mixin()
projectMixinHooks0 := projectMixin[0].Hooks()
project.Hooks[0] = projectMixinHooks0[0]
projectMixinInters0 := projectMixin[0].Interceptors()
project.Interceptors[0] = projectMixinInters0[0]
projectFields := schema.Project{}.Fields()
_ = projectFields
// projectDescName is the schema descriptor for name field.
projectDescName := projectFields[2].Descriptor()
// project.NameValidator is a validator for the "name" field. It is called by the builders before save.
project.NameValidator = projectDescName.Validators[0].(func(string) error)
// projectDescCreatedAt is the schema descriptor for created_at field.
projectDescCreatedAt := projectFields[10].Descriptor()
// project.DefaultCreatedAt holds the default value on creation for the created_at field.
project.DefaultCreatedAt = projectDescCreatedAt.Default.(func() time.Time)
// projectDescUpdatedAt is the schema descriptor for updated_at field.
projectDescUpdatedAt := projectFields[11].Descriptor()
// project.DefaultUpdatedAt holds the default value on creation for the updated_at field.
project.DefaultUpdatedAt = projectDescUpdatedAt.Default.(func() time.Time)
// project.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
project.UpdateDefaultUpdatedAt = projectDescUpdatedAt.UpdateDefault.(func() time.Time)
projectcollaboratorMixin := schema.ProjectCollaborator{}.Mixin()
projectcollaboratorMixinHooks0 := projectcollaboratorMixin[0].Hooks()
projectcollaborator.Hooks[0] = projectcollaboratorMixinHooks0[0]
projectcollaboratorMixinInters0 := projectcollaboratorMixin[0].Interceptors()
projectcollaborator.Interceptors[0] = projectcollaboratorMixinInters0[0]
projectcollaboratorFields := schema.ProjectCollaborator{}.Fields()
_ = projectcollaboratorFields
// projectcollaboratorDescRole is the schema descriptor for role field.
projectcollaboratorDescRole := projectcollaboratorFields[3].Descriptor()
// projectcollaborator.DefaultRole holds the default value on creation for the role field.
projectcollaborator.DefaultRole = consts.ProjectCollaboratorRole(projectcollaboratorDescRole.Default.(string))
// projectcollaboratorDescCreatedAt is the schema descriptor for created_at field.
projectcollaboratorDescCreatedAt := projectcollaboratorFields[4].Descriptor()
// projectcollaborator.DefaultCreatedAt holds the default value on creation for the created_at field.
projectcollaborator.DefaultCreatedAt = projectcollaboratorDescCreatedAt.Default.(func() time.Time)
// projectcollaboratorDescUpdatedAt is the schema descriptor for updated_at field.
projectcollaboratorDescUpdatedAt := projectcollaboratorFields[5].Descriptor()
// projectcollaborator.DefaultUpdatedAt holds the default value on creation for the updated_at field.
projectcollaborator.DefaultUpdatedAt = projectcollaboratorDescUpdatedAt.Default.(func() time.Time)
// projectcollaborator.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
projectcollaborator.UpdateDefaultUpdatedAt = projectcollaboratorDescUpdatedAt.UpdateDefault.(func() time.Time)
projectgitbotFields := schema.ProjectGitBot{}.Fields()
_ = projectgitbotFields
// projectgitbotDescCreatedAt is the schema descriptor for created_at field.
projectgitbotDescCreatedAt := projectgitbotFields[3].Descriptor()
// projectgitbot.DefaultCreatedAt holds the default value on creation for the created_at field.
projectgitbot.DefaultCreatedAt = projectgitbotDescCreatedAt.Default.(func() time.Time)
// projectgitbotDescID is the schema descriptor for id field.
projectgitbotDescID := projectgitbotFields[0].Descriptor()
// projectgitbot.DefaultID holds the default value on creation for the id field.
projectgitbot.DefaultID = projectgitbotDescID.Default.(func() uuid.UUID)
projectissueMixin := schema.ProjectIssue{}.Mixin()
projectissueMixinHooks0 := projectissueMixin[0].Hooks()
projectissue.Hooks[0] = projectissueMixinHooks0[0]
projectissueMixinInters0 := projectissueMixin[0].Interceptors()
projectissue.Interceptors[0] = projectissueMixinInters0[0]
projectissueFields := schema.ProjectIssue{}.Fields()
_ = projectissueFields
// projectissueDescStatus is the schema descriptor for status field.
projectissueDescStatus := projectissueFields[3].Descriptor()
// projectissue.DefaultStatus holds the default value on creation for the status field.
projectissue.DefaultStatus = consts.ProjectIssueStatus(projectissueDescStatus.Default.(string))
// projectissueDescTitle is the schema descriptor for title field.
projectissueDescTitle := projectissueFields[4].Descriptor()
// projectissue.TitleValidator is a validator for the "title" field. It is called by the builders before save.
projectissue.TitleValidator = projectissueDescTitle.Validators[0].(func(string) error)
// projectissueDescPriority is the schema descriptor for priority field.
projectissueDescPriority := projectissueFields[9].Descriptor()
// projectissue.DefaultPriority holds the default value on creation for the priority field.
projectissue.DefaultPriority = consts.ProjectIssuePriority(projectissueDescPriority.Default.(int))
// projectissueDescCreatedAt is the schema descriptor for created_at field.
projectissueDescCreatedAt := projectissueFields[10].Descriptor()
// projectissue.DefaultCreatedAt holds the default value on creation for the created_at field.
projectissue.DefaultCreatedAt = projectissueDescCreatedAt.Default.(func() time.Time)
// projectissueDescUpdatedAt is the schema descriptor for updated_at field.
projectissueDescUpdatedAt := projectissueFields[11].Descriptor()
// projectissue.DefaultUpdatedAt holds the default value on creation for the updated_at field.
projectissue.DefaultUpdatedAt = projectissueDescUpdatedAt.Default.(func() time.Time)
// projectissue.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
projectissue.UpdateDefaultUpdatedAt = projectissueDescUpdatedAt.UpdateDefault.(func() time.Time)
projectissuecommentMixin := schema.ProjectIssueComment{}.Mixin()
projectissuecommentMixinHooks0 := projectissuecommentMixin[0].Hooks()
projectissuecomment.Hooks[0] = projectissuecommentMixinHooks0[0]
projectissuecommentMixinInters0 := projectissuecommentMixin[0].Interceptors()
projectissuecomment.Interceptors[0] = projectissuecommentMixinInters0[0]
projectissuecommentFields := schema.ProjectIssueComment{}.Fields()
_ = projectissuecommentFields
// projectissuecommentDescComment is the schema descriptor for comment field.
projectissuecommentDescComment := projectissuecommentFields[4].Descriptor()
// projectissuecomment.CommentValidator is a validator for the "comment" field. It is called by the builders before save.
projectissuecomment.CommentValidator = projectissuecommentDescComment.Validators[0].(func(string) error)
// projectissuecommentDescCreatedAt is the schema descriptor for created_at field.
projectissuecommentDescCreatedAt := projectissuecommentFields[5].Descriptor()
// projectissuecomment.DefaultCreatedAt holds the default value on creation for the created_at field.
projectissuecomment.DefaultCreatedAt = projectissuecommentDescCreatedAt.Default.(func() time.Time)
// projectissuecommentDescUpdatedAt is the schema descriptor for updated_at field.
projectissuecommentDescUpdatedAt := projectissuecommentFields[6].Descriptor()
// projectissuecomment.DefaultUpdatedAt holds the default value on creation for the updated_at field.
projectissuecomment.DefaultUpdatedAt = projectissuecommentDescUpdatedAt.Default.(func() time.Time)
// projectissuecomment.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
projectissuecomment.UpdateDefaultUpdatedAt = projectissuecommentDescUpdatedAt.UpdateDefault.(func() time.Time)
projecttaskFields := schema.ProjectTask{}.Fields()
_ = projecttaskFields
// projecttaskDescCreatedAt is the schema descriptor for created_at field.
projecttaskDescCreatedAt := projecttaskFields[11].Descriptor()
// projecttask.DefaultCreatedAt holds the default value on creation for the created_at field.
projecttask.DefaultCreatedAt = projecttaskDescCreatedAt.Default.(func() time.Time)
taskMixin := schema.Task{}.Mixin()
taskMixinHooks0 := taskMixin[0].Hooks()
task.Hooks[0] = taskMixinHooks0[0]
taskMixinInters0 := taskMixin[0].Interceptors()
task.Interceptors[0] = taskMixinInters0[0]
taskFields := schema.Task{}.Fields()
_ = taskFields
// taskDescContent is the schema descriptor for content field.
taskDescContent := taskFields[4].Descriptor()
// task.ContentValidator is a validator for the "content" field. It is called by the builders before save.
task.ContentValidator = taskDescContent.Validators[0].(func(string) error)
// taskDescCreatedAt is the schema descriptor for created_at field.
taskDescCreatedAt := taskFields[9].Descriptor()
// task.DefaultCreatedAt holds the default value on creation for the created_at field.
task.DefaultCreatedAt = taskDescCreatedAt.Default.(func() time.Time)
// taskDescLastActiveAt is the schema descriptor for last_active_at field.
taskDescLastActiveAt := taskFields[10].Descriptor()
// task.DefaultLastActiveAt holds the default value on creation for the last_active_at field.
task.DefaultLastActiveAt = taskDescLastActiveAt.Default.(func() time.Time)
// taskDescUpdatedAt is the schema descriptor for updated_at field.
taskDescUpdatedAt := taskFields[11].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)
taskmodelswitchFields := schema.TaskModelSwitch{}.Fields()
_ = taskmodelswitchFields
// taskmodelswitchDescRequestID is the schema descriptor for request_id field.
taskmodelswitchDescRequestID := taskmodelswitchFields[5].Descriptor()
// taskmodelswitch.DefaultRequestID holds the default value on creation for the request_id field.
taskmodelswitch.DefaultRequestID = taskmodelswitchDescRequestID.Default.(string)
// taskmodelswitchDescLoadSession is the schema descriptor for load_session field.
taskmodelswitchDescLoadSession := taskmodelswitchFields[6].Descriptor()
// taskmodelswitch.DefaultLoadSession holds the default value on creation for the load_session field.
taskmodelswitch.DefaultLoadSession = taskmodelswitchDescLoadSession.Default.(bool)
// taskmodelswitchDescMessage is the schema descriptor for message field.
taskmodelswitchDescMessage := taskmodelswitchFields[8].Descriptor()
// taskmodelswitch.DefaultMessage holds the default value on creation for the message field.
taskmodelswitch.DefaultMessage = taskmodelswitchDescMessage.Default.(string)
// taskmodelswitchDescSessionID is the schema descriptor for session_id field.
taskmodelswitchDescSessionID := taskmodelswitchFields[9].Descriptor()
// taskmodelswitch.DefaultSessionID holds the default value on creation for the session_id field.
taskmodelswitch.DefaultSessionID = taskmodelswitchDescSessionID.Default.(string)
// taskmodelswitchDescCreatedAt is the schema descriptor for created_at field.
taskmodelswitchDescCreatedAt := taskmodelswitchFields[10].Descriptor()
// taskmodelswitch.DefaultCreatedAt holds the default value on creation for the created_at field.
taskmodelswitch.DefaultCreatedAt = taskmodelswitchDescCreatedAt.Default.(func() time.Time)
// taskmodelswitchDescUpdatedAt is the schema descriptor for updated_at field.
taskmodelswitchDescUpdatedAt := taskmodelswitchFields[11].Descriptor()
// taskmodelswitch.DefaultUpdatedAt holds the default value on creation for the updated_at field.
taskmodelswitch.DefaultUpdatedAt = taskmodelswitchDescUpdatedAt.Default.(func() time.Time)
// taskmodelswitch.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
taskmodelswitch.UpdateDefaultUpdatedAt = taskmodelswitchDescUpdatedAt.UpdateDefault.(func() time.Time)
// taskmodelswitchDescID is the schema descriptor for id field.
taskmodelswitchDescID := taskmodelswitchFields[0].Descriptor()
// taskmodelswitch.DefaultID holds the default value on creation for the id field.
taskmodelswitch.DefaultID = taskmodelswitchDescID.Default.(func() uuid.UUID)
taskusagestatFields := schema.TaskUsageStat{}.Fields()
_ = taskusagestatFields
// taskusagestatDescModel is the schema descriptor for model field.
taskusagestatDescModel := taskusagestatFields[3].Descriptor()
// taskusagestat.DefaultModel holds the default value on creation for the model field.
taskusagestat.DefaultModel = taskusagestatDescModel.Default.(string)
// taskusagestatDescInputTokens is the schema descriptor for input_tokens field.
taskusagestatDescInputTokens := taskusagestatFields[4].Descriptor()
// taskusagestat.DefaultInputTokens holds the default value on creation for the input_tokens field.
taskusagestat.DefaultInputTokens = taskusagestatDescInputTokens.Default.(int64)
// taskusagestatDescOutputTokens is the schema descriptor for output_tokens field.
taskusagestatDescOutputTokens := taskusagestatFields[5].Descriptor()
// taskusagestat.DefaultOutputTokens holds the default value on creation for the output_tokens field.
taskusagestat.DefaultOutputTokens = taskusagestatDescOutputTokens.Default.(int64)
// taskusagestatDescTotalTokens is the schema descriptor for total_tokens field.
taskusagestatDescTotalTokens := taskusagestatFields[6].Descriptor()
// taskusagestat.DefaultTotalTokens holds the default value on creation for the total_tokens field.
taskusagestat.DefaultTotalTokens = taskusagestatDescTotalTokens.Default.(int64)
// taskusagestatDescCreatedAt is the schema descriptor for created_at field.
taskusagestatDescCreatedAt := taskusagestatFields[7].Descriptor()
// taskusagestat.DefaultCreatedAt holds the default value on creation for the created_at field.
taskusagestat.DefaultCreatedAt = taskusagestatDescCreatedAt.Default.(func() time.Time)
// taskusagestatDescID is the schema descriptor for id field.
taskusagestatDescID := taskusagestatFields[0].Descriptor()
// taskusagestat.DefaultID holds the default value on creation for the id field.
taskusagestat.DefaultID = taskusagestatDescID.Default.(func() uuid.UUID)
taskvirtualmachineFields := schema.TaskVirtualMachine{}.Fields()
_ = taskvirtualmachineFields
// taskvirtualmachineDescCreatedAt is the schema descriptor for created_at field.
taskvirtualmachineDescCreatedAt := taskvirtualmachineFields[3].Descriptor()
// taskvirtualmachine.DefaultCreatedAt holds the default value on creation for the created_at field.
taskvirtualmachine.DefaultCreatedAt = taskvirtualmachineDescCreatedAt.Default.(func() time.Time)
teamMixin := schema.Team{}.Mixin()
teamMixinHooks0 := teamMixin[0].Hooks()
team.Hooks[0] = teamMixinHooks0[0]
teamMixinInters0 := teamMixin[0].Interceptors()
team.Interceptors[0] = teamMixinInters0[0]
teamFields := schema.Team{}.Fields()
_ = teamFields
// teamDescName is the schema descriptor for name field.
teamDescName := teamFields[1].Descriptor()
// team.NameValidator is a validator for the "name" field. It is called by the builders before save.
team.NameValidator = teamDescName.Validators[0].(func(string) error)
// teamDescTaskVMSleepEnabled is the schema descriptor for task_vm_sleep_enabled field.
teamDescTaskVMSleepEnabled := teamFields[3].Descriptor()
// team.DefaultTaskVMSleepEnabled holds the default value on creation for the task_vm_sleep_enabled field.
team.DefaultTaskVMSleepEnabled = teamDescTaskVMSleepEnabled.Default.(bool)
// teamDescTaskVMSleepSeconds is the schema descriptor for task_vm_sleep_seconds field.
teamDescTaskVMSleepSeconds := teamFields[4].Descriptor()
// team.DefaultTaskVMSleepSeconds holds the default value on creation for the task_vm_sleep_seconds field.
team.DefaultTaskVMSleepSeconds = teamDescTaskVMSleepSeconds.Default.(int)
// teamDescTaskVMRecycleEnabled is the schema descriptor for task_vm_recycle_enabled field.
teamDescTaskVMRecycleEnabled := teamFields[5].Descriptor()
// team.DefaultTaskVMRecycleEnabled holds the default value on creation for the task_vm_recycle_enabled field.
team.DefaultTaskVMRecycleEnabled = teamDescTaskVMRecycleEnabled.Default.(bool)
// teamDescTaskVMRecycleSeconds is the schema descriptor for task_vm_recycle_seconds field.
teamDescTaskVMRecycleSeconds := teamFields[6].Descriptor()
// team.DefaultTaskVMRecycleSeconds holds the default value on creation for the task_vm_recycle_seconds field.
team.DefaultTaskVMRecycleSeconds = teamDescTaskVMRecycleSeconds.Default.(int)
// teamDescCreatedAt is the schema descriptor for created_at field.
teamDescCreatedAt := teamFields[7].Descriptor()
// team.DefaultCreatedAt holds the default value on creation for the created_at field.
team.DefaultCreatedAt = teamDescCreatedAt.Default.(func() time.Time)
// teamDescUpdatedAt is the schema descriptor for updated_at field.
teamDescUpdatedAt := teamFields[8].Descriptor()
// team.DefaultUpdatedAt holds the default value on creation for the updated_at field.
team.DefaultUpdatedAt = teamDescUpdatedAt.Default.(func() time.Time)
teamgroupMixin := schema.TeamGroup{}.Mixin()
teamgroupMixinHooks0 := teamgroupMixin[0].Hooks()
teamgroup.Hooks[0] = teamgroupMixinHooks0[0]
teamgroupMixinInters0 := teamgroupMixin[0].Interceptors()
teamgroup.Interceptors[0] = teamgroupMixinInters0[0]
teamgroupFields := schema.TeamGroup{}.Fields()
_ = teamgroupFields
// teamgroupDescCreatedAt is the schema descriptor for created_at field.
teamgroupDescCreatedAt := teamgroupFields[3].Descriptor()
// teamgroup.DefaultCreatedAt holds the default value on creation for the created_at field.
teamgroup.DefaultCreatedAt = teamgroupDescCreatedAt.Default.(func() time.Time)
// teamgroupDescUpdatedAt is the schema descriptor for updated_at field.
teamgroupDescUpdatedAt := teamgroupFields[4].Descriptor()
// teamgroup.DefaultUpdatedAt holds the default value on creation for the updated_at field.
teamgroup.DefaultUpdatedAt = teamgroupDescUpdatedAt.Default.(func() time.Time)
// teamgroup.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
teamgroup.UpdateDefaultUpdatedAt = teamgroupDescUpdatedAt.UpdateDefault.(func() time.Time)
teamgrouphostFields := schema.TeamGroupHost{}.Fields()
_ = teamgrouphostFields
// teamgrouphostDescCreatedAt is the schema descriptor for created_at field.
teamgrouphostDescCreatedAt := teamgrouphostFields[3].Descriptor()
// teamgrouphost.DefaultCreatedAt holds the default value on creation for the created_at field.
teamgrouphost.DefaultCreatedAt = teamgrouphostDescCreatedAt.Default.(func() time.Time)
teamgroupimageFields := schema.TeamGroupImage{}.Fields()
_ = teamgroupimageFields
// teamgroupimageDescCreatedAt is the schema descriptor for created_at field.
teamgroupimageDescCreatedAt := teamgroupimageFields[3].Descriptor()
// teamgroupimage.DefaultCreatedAt holds the default value on creation for the created_at field.
teamgroupimage.DefaultCreatedAt = teamgroupimageDescCreatedAt.Default.(func() time.Time)
teamgroupmemberFields := schema.TeamGroupMember{}.Fields()
_ = teamgroupmemberFields
// teamgroupmemberDescCreatedAt is the schema descriptor for created_at field.
teamgroupmemberDescCreatedAt := teamgroupmemberFields[3].Descriptor()
// teamgroupmember.DefaultCreatedAt holds the default value on creation for the created_at field.
teamgroupmember.DefaultCreatedAt = teamgroupmemberDescCreatedAt.Default.(func() time.Time)
teamgroupmodelFields := schema.TeamGroupModel{}.Fields()
_ = teamgroupmodelFields
// teamgroupmodelDescCreatedAt is the schema descriptor for created_at field.
teamgroupmodelDescCreatedAt := teamgroupmodelFields[3].Descriptor()
// teamgroupmodel.DefaultCreatedAt holds the default value on creation for the created_at field.
teamgroupmodel.DefaultCreatedAt = teamgroupmodelDescCreatedAt.Default.(func() time.Time)
teamhostFields := schema.TeamHost{}.Fields()
_ = teamhostFields
// teamhostDescCreatedAt is the schema descriptor for created_at field.
teamhostDescCreatedAt := teamhostFields[3].Descriptor()
// teamhost.DefaultCreatedAt holds the default value on creation for the created_at field.
teamhost.DefaultCreatedAt = teamhostDescCreatedAt.Default.(func() time.Time)
teamimageFields := schema.TeamImage{}.Fields()
_ = teamimageFields
// teamimageDescCreatedAt is the schema descriptor for created_at field.
teamimageDescCreatedAt := teamimageFields[3].Descriptor()
// teamimage.DefaultCreatedAt holds the default value on creation for the created_at field.
teamimage.DefaultCreatedAt = teamimageDescCreatedAt.Default.(func() time.Time)
teammemberFields := schema.TeamMember{}.Fields()
_ = teammemberFields
// teammemberDescCreatedAt is the schema descriptor for created_at field.
teammemberDescCreatedAt := teammemberFields[4].Descriptor()
// teammember.DefaultCreatedAt holds the default value on creation for the created_at field.
teammember.DefaultCreatedAt = teammemberDescCreatedAt.Default.(func() time.Time)
teammodelFields := schema.TeamModel{}.Fields()
_ = teammodelFields
// teammodelDescCreatedAt is the schema descriptor for created_at field.
teammodelDescCreatedAt := teammodelFields[3].Descriptor()
// teammodel.DefaultCreatedAt holds the default value on creation for the created_at field.
teammodel.DefaultCreatedAt = teammodelDescCreatedAt.Default.(func() time.Time)
userMixin := schema.User{}.Mixin()
userMixinHooks0 := userMixin[0].Hooks()
user.Hooks[0] = userMixinHooks0[0]
userMixinInters0 := userMixin[0].Interceptors()
user.Interceptors[0] = userMixinInters0[0]
userFields := schema.User{}.Fields()
_ = userFields
// userDescName is the schema descriptor for name field.
userDescName := userFields[1].Descriptor()
// user.NameValidator is a validator for the "name" field. It is called by the builders before save.
user.NameValidator = userDescName.Validators[0].(func(string) error)
// userDescIsBlocked is the schema descriptor for is_blocked field.
userDescIsBlocked := userFields[7].Descriptor()
// user.DefaultIsBlocked holds the default value on creation for the is_blocked field.
user.DefaultIsBlocked = userDescIsBlocked.Default.(bool)
// userDescCreatedAt is the schema descriptor for created_at field.
userDescCreatedAt := userFields[9].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 := userFields[10].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)
useridentityMixin := schema.UserIdentity{}.Mixin()
useridentityMixinHooks0 := useridentityMixin[0].Hooks()
useridentity.Hooks[0] = useridentityMixinHooks0[0]
useridentityMixinInters0 := useridentityMixin[0].Interceptors()
useridentity.Interceptors[0] = useridentityMixinInters0[0]
useridentityFields := schema.UserIdentity{}.Fields()
_ = useridentityFields
// useridentityDescPlatform is the schema descriptor for platform field.
useridentityDescPlatform := useridentityFields[2].Descriptor()
// useridentity.PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
useridentity.PlatformValidator = useridentityDescPlatform.Validators[0].(func(string) error)
// useridentityDescIdentityID is the schema descriptor for identity_id field.
useridentityDescIdentityID := useridentityFields[3].Descriptor()
// useridentity.IdentityIDValidator is a validator for the "identity_id" field. It is called by the builders before save.
useridentity.IdentityIDValidator = useridentityDescIdentityID.Validators[0].(func(string) error)
// useridentityDescUsername is the schema descriptor for username field.
useridentityDescUsername := useridentityFields[4].Descriptor()
// useridentity.UsernameValidator is a validator for the "username" field. It is called by the builders before save.
useridentity.UsernameValidator = useridentityDescUsername.Validators[0].(func(string) error)
// useridentityDescCreatedAt is the schema descriptor for created_at field.
useridentityDescCreatedAt := useridentityFields[7].Descriptor()
// useridentity.DefaultCreatedAt holds the default value on creation for the created_at field.
useridentity.DefaultCreatedAt = useridentityDescCreatedAt.Default.(func() time.Time)
// useridentityDescUpdatedAt is the schema descriptor for updated_at field.
useridentityDescUpdatedAt := useridentityFields[8].Descriptor()
// useridentity.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
useridentity.UpdateDefaultUpdatedAt = useridentityDescUpdatedAt.UpdateDefault.(func() time.Time)
virtualmachineMixin := schema.VirtualMachine{}.Mixin()
virtualmachineMixinHooks0 := virtualmachineMixin[0].Hooks()
virtualmachine.Hooks[0] = virtualmachineMixinHooks0[0]
virtualmachineMixinInters0 := virtualmachineMixin[0].Interceptors()
virtualmachine.Interceptors[0] = virtualmachineMixinInters0[0]
virtualmachineFields := schema.VirtualMachine{}.Fields()
_ = virtualmachineFields
// virtualmachineDescCreatedAt is the schema descriptor for created_at field.
virtualmachineDescCreatedAt := virtualmachineFields[23].Descriptor()
// virtualmachine.DefaultCreatedAt holds the default value on creation for the created_at field.
virtualmachine.DefaultCreatedAt = virtualmachineDescCreatedAt.Default.(func() time.Time)
// virtualmachineDescUpdatedAt is the schema descriptor for updated_at field.
virtualmachineDescUpdatedAt := virtualmachineFields[24].Descriptor()
// virtualmachine.DefaultUpdatedAt holds the default value on creation for the updated_at field.
virtualmachine.DefaultUpdatedAt = virtualmachineDescUpdatedAt.Default.(func() time.Time)
}
const (
Version = "v0.14.5" // Version of ent codegen.
Sum = "h1:Rj2WOYJtCkWyFo6a+5wB3EfBRP0rnx1fMk6gGA0UUe4=" // Sum of ent codegen.
)