Files
ent/entc/integration/migrate/entv1/user/user.go
Alex Snast 4c1f28d58f ent/schema: allow setting collation for string fields
Reviewed By: a8m

Differential Revision: D17090481

fbshipit-source-id: a08768c9bac4318a91bc6a067c85d6eb022c3024
2019-08-28 04:52:32 -07:00

43 lines
1.2 KiB
Go

// Code generated (@generated) by entc, DO NOT EDIT.
package user
import (
"github.com/facebookincubator/ent/entc/integration/migrate/entv1/schema"
)
const (
// Label holds the string label denoting the user type in the database.
Label = "user"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldAge holds the string denoting the age vertex property in the database.
FieldAge = "age"
// FieldName holds the string denoting the name vertex property in the database.
FieldName = "name"
// FieldAddress holds the string denoting the address vertex property in the database.
FieldAddress = "address"
// FieldRole holds the string denoting the role vertex property in the database.
FieldRole = "role"
// Table holds the table name of the user in the database.
Table = "users"
)
// Columns holds all SQL columns are user fields.
var Columns = []string{
FieldID,
FieldAge,
FieldName,
FieldAddress,
FieldRole,
}
var (
fields = schema.User{}.Fields()
// descName is the schema descriptor for name field.
descName = fields[1].Descriptor()
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator = descName.Validators[0].(func(string) error)
)