Files
ersteller/schema/ent/example/ent/runtime.go
T

83 lines
4.4 KiB
Go

// Code generated by ent, DO NOT EDIT.
package ent
import (
"git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group"
"git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/schema"
"git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo"
"git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user"
"time"
)
// 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() {
groupMixin := schema.Group{}.Mixin()
groupMixinFields0 := groupMixin[0].Fields()
_ = groupMixinFields0
groupFields := schema.Group{}.Fields()
_ = groupFields
// groupDescCreatedAt is the schema descriptor for created_at field.
groupDescCreatedAt := groupMixinFields0[0].Descriptor()
// group.DefaultCreatedAt holds the default value on creation for the created_at field.
group.DefaultCreatedAt = groupDescCreatedAt.Default.(func() time.Time)
// groupDescUpdatedAt is the schema descriptor for updated_at field.
groupDescUpdatedAt := groupMixinFields0[1].Descriptor()
// group.DefaultUpdatedAt holds the default value on creation for the updated_at field.
group.DefaultUpdatedAt = groupDescUpdatedAt.Default.(func() time.Time)
// group.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
group.UpdateDefaultUpdatedAt = groupDescUpdatedAt.UpdateDefault.(func() time.Time)
// groupDescName is the schema descriptor for name field.
groupDescName := groupFields[0].Descriptor()
// group.DefaultName holds the default value on creation for the name field.
group.DefaultName = groupDescName.Default.(string)
todoMixin := schema.Todo{}.Mixin()
todoMixinFields0 := todoMixin[0].Fields()
_ = todoMixinFields0
todoFields := schema.Todo{}.Fields()
_ = todoFields
// todoDescCreatedAt is the schema descriptor for created_at field.
todoDescCreatedAt := todoMixinFields0[0].Descriptor()
// todo.DefaultCreatedAt holds the default value on creation for the created_at field.
todo.DefaultCreatedAt = todoDescCreatedAt.Default.(func() time.Time)
// todoDescUpdatedAt is the schema descriptor for updated_at field.
todoDescUpdatedAt := todoMixinFields0[1].Descriptor()
// todo.DefaultUpdatedAt holds the default value on creation for the updated_at field.
todo.DefaultUpdatedAt = todoDescUpdatedAt.Default.(func() time.Time)
// todo.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field.
todo.UpdateDefaultUpdatedAt = todoDescUpdatedAt.UpdateDefault.(func() time.Time)
// todoDescTitle is the schema descriptor for title field.
todoDescTitle := todoFields[0].Descriptor()
// todo.DefaultTitle holds the default value on creation for the title field.
todo.DefaultTitle = todoDescTitle.Default.(string)
// todoDescCompleted is the schema descriptor for completed field.
todoDescCompleted := todoFields[1].Descriptor()
// todo.DefaultCompleted holds the default value on creation for the completed field.
todo.DefaultCompleted = todoDescCompleted.Default.(bool)
userMixin := schema.User{}.Mixin()
userMixinFields0 := userMixin[0].Fields()
_ = userMixinFields0
userFields := schema.User{}.Fields()
_ = userFields
// userDescCreatedAt is the schema descriptor for created_at field.
userDescCreatedAt := userMixinFields0[0].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 := userMixinFields0[1].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)
// userDescEmail is the schema descriptor for email field.
userDescEmail := userFields[0].Descriptor()
// user.DefaultEmail holds the default value on creation for the email field.
user.DefaultEmail = userDescEmail.Default.(string)
// userDescPassword is the schema descriptor for password field.
userDescPassword := userFields[1].Descriptor()
// user.DefaultPassword holds the default value on creation for the password field.
user.DefaultPassword = userDescPassword.Default.(string)
}