// Code generated by ent, DO NOT EDIT. package ent import ( "time" "github.com/dalbodeule/hop-gate/ent/domain" "github.com/dalbodeule/hop-gate/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() { domainFields := schema.Domain{}.Fields() _ = domainFields // domainDescDomain is the schema descriptor for domain field. domainDescDomain := domainFields[1].Descriptor() // domain.DomainValidator is a validator for the "domain" field. It is called by the builders before save. domain.DomainValidator = domainDescDomain.Validators[0].(func(string) error) // domainDescClientAPIKey is the schema descriptor for client_api_key field. domainDescClientAPIKey := domainFields[2].Descriptor() // domain.ClientAPIKeyValidator is a validator for the "client_api_key" field. It is called by the builders before save. domain.ClientAPIKeyValidator = func() func(string) error { validators := domainDescClientAPIKey.Validators fns := [...]func(string) error{ validators[0].(func(string) error), validators[1].(func(string) error), } return func(client_api_key string) error { for _, fn := range fns { if err := fn(client_api_key); err != nil { return err } } return nil } }() // domainDescMemo is the schema descriptor for memo field. domainDescMemo := domainFields[3].Descriptor() // domain.DefaultMemo holds the default value on creation for the memo field. domain.DefaultMemo = domainDescMemo.Default.(string) // domainDescCreatedAt is the schema descriptor for created_at field. domainDescCreatedAt := domainFields[4].Descriptor() // domain.DefaultCreatedAt holds the default value on creation for the created_at field. domain.DefaultCreatedAt = domainDescCreatedAt.Default.(func() time.Time) // domainDescUpdatedAt is the schema descriptor for updated_at field. domainDescUpdatedAt := domainFields[5].Descriptor() // domain.DefaultUpdatedAt holds the default value on creation for the updated_at field. domain.DefaultUpdatedAt = domainDescUpdatedAt.Default.(func() time.Time) // domain.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. domain.UpdateDefaultUpdatedAt = domainDescUpdatedAt.UpdateDefault.(func() time.Time) // domainDescID is the schema descriptor for id field. domainDescID := domainFields[0].Descriptor() // domain.DefaultID holds the default value on creation for the id field. domain.DefaultID = domainDescID.Default.(func() uuid.UUID) }