forked from mystiq/dex
49 lines
1.5 KiB
Go
49 lines
1.5 KiB
Go
|
// Code generated by entc, DO NOT EDIT.
|
||
|
|
||
|
package password
|
||
|
|
||
|
const (
|
||
|
// Label holds the string label denoting the password type in the database.
|
||
|
Label = "password"
|
||
|
// FieldID holds the string denoting the id field in the database.
|
||
|
FieldID = "id"
|
||
|
// FieldEmail holds the string denoting the email field in the database.
|
||
|
FieldEmail = "email"
|
||
|
// FieldHash holds the string denoting the hash field in the database.
|
||
|
FieldHash = "hash"
|
||
|
// FieldUsername holds the string denoting the username field in the database.
|
||
|
FieldUsername = "username"
|
||
|
// FieldUserID holds the string denoting the user_id field in the database.
|
||
|
FieldUserID = "user_id"
|
||
|
// Table holds the table name of the password in the database.
|
||
|
Table = "passwords"
|
||
|
)
|
||
|
|
||
|
// Columns holds all SQL columns for password fields.
|
||
|
var Columns = []string{
|
||
|
FieldID,
|
||
|
FieldEmail,
|
||
|
FieldHash,
|
||
|
FieldUsername,
|
||
|
FieldUserID,
|
||
|
}
|
||
|
|
||
|
// ValidColumn reports if the column name is valid (part of the table columns).
|
||
|
func ValidColumn(column string) bool {
|
||
|
for i := range Columns {
|
||
|
if column == Columns[i] {
|
||
|
return true
|
||
|
}
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||
|
EmailValidator func(string) error
|
||
|
// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
|
||
|
UsernameValidator func(string) error
|
||
|
// UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
|
||
|
UserIDValidator func(string) error
|
||
|
)
|