Files

134 lines
7.7 KiB
Go

// Code generated by ent, DO NOT EDIT.
package runtime
import (
"time"
"github.com/chaitin/MonkeyCode/backend/db/audit"
"github.com/chaitin/MonkeyCode/backend/db/team"
"github.com/chaitin/MonkeyCode/backend/db/teamgroup"
"github.com/chaitin/MonkeyCode/backend/db/teamgroupmember"
"github.com/chaitin/MonkeyCode/backend/db/teammember"
"github.com/chaitin/MonkeyCode/backend/db/user"
"github.com/chaitin/MonkeyCode/backend/db/useridentity"
"github.com/chaitin/MonkeyCode/backend/ent/schema"
)
// 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)
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)
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)
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)
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)
}
const (
Version = "v0.14.5" // Version of ent codegen.
Sum = "h1:Rj2WOYJtCkWyFo6a+5wB3EfBRP0rnx1fMk6gGA0UUe4=" // Sum of ent codegen.
)