// Code generated by entc, DO NOT EDIT. package ent import ( "goweb/ent/schema" "goweb/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 // userDescUsername is the schema descriptor for username field. userDescUsername := userFields[0].Descriptor() // user.UsernameValidator is a validator for the "username" field. It is called by the builders before save. user.UsernameValidator = userDescUsername.Validators[0].(func(string) error) // userDescPassword is the schema descriptor for password field. userDescPassword := userFields[1].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) // userDescCreatedAt is the schema descriptor for created_at field. userDescCreatedAt := userFields[2].Descriptor() // user.DefaultCreatedAt holds the default value on creation for the created_at field. user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time) }