Files

559 lines
36 KiB
Go
Raw Permalink Normal View History

// 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/host"
"github.com/chaitin/MonkeyCode/backend/db/image"
"github.com/chaitin/MonkeyCode/backend/db/model"
"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/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)
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)
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)
// modelDescCreatedAt is the schema descriptor for created_at field.
modelDescCreatedAt := modelFields[13].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[14].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)
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
}
}()
// notifychannelDescWebhookURL is the schema descriptor for webhook_url field.
notifychannelDescWebhookURL := notifychannelFields[5].Descriptor()
// notifychannel.WebhookURLValidator is a validator for the "webhook_url" field. It is called by the builders before save.
notifychannel.WebhookURLValidator = notifychannelDescWebhookURL.Validators[0].(func(string) error)
// 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)
// notifychannelDescEnabled is the schema descriptor for enabled field.
notifychannelDescEnabled := notifychannelFields[8].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[9].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[10].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[7].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 := taskFields[8].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)
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)
// teamDescCreatedAt is the schema descriptor for created_at field.
teamDescCreatedAt := teamFields[3].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[4].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[22].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[23].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.
)