This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/storage/ent/db/password/password.go
m.nabokikh 24fa4def5b chore: update ent
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2021-04-30 17:48:16 +04:00

48 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
)