52 lines
2.7 KiB
Go
52 lines
2.7 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package ent
|
|
|
|
import (
|
|
"ky-go-kratos/app/ucenter/internal/data/ent/schema"
|
|
"ky-go-kratos/app/ucenter/internal/data/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() {
|
|
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)
|
|
// userDescEmail is the schema descriptor for email field.
|
|
userDescEmail := userFields[3].Descriptor()
|
|
// user.EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
|
user.EmailValidator = userDescEmail.Validators[0].(func(string) error)
|
|
// userDescPhone is the schema descriptor for phone field.
|
|
userDescPhone := userFields[4].Descriptor()
|
|
// user.PhoneValidator is a validator for the "phone" field. It is called by the builders before save.
|
|
user.PhoneValidator = userDescPhone.Validators[0].(func(string) error)
|
|
// userDescPassword is the schema descriptor for password field.
|
|
userDescPassword := userFields[5].Descriptor()
|
|
// user.PasswordValidator is a validator for the "password" field. It is called by the builders before save.
|
|
user.PasswordValidator = userDescPassword.Validators[0].(func(string) error)
|
|
// userDescIsDeleted is the schema descriptor for is_deleted field.
|
|
userDescIsDeleted := userFields[6].Descriptor()
|
|
// user.DefaultIsDeleted holds the default value on creation for the is_deleted field.
|
|
user.DefaultIsDeleted = userDescIsDeleted.Default.(bool)
|
|
// userDescCreatedAt is the schema descriptor for created_at field.
|
|
userDescCreatedAt := userFields[7].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[8].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)
|
|
// userDescID is the schema descriptor for id field.
|
|
userDescID := userFields[0].Descriptor()
|
|
// user.DefaultID holds the default value on creation for the id field.
|
|
user.DefaultID = userDescID.Default.(func() string)
|
|
}
|