56 lines
1.5 KiB
Go
56 lines
1.5 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package usertoken
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the usertoken type in the database.
|
|
Label = "user_token"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldTokenID holds the string denoting the token_id field in the database.
|
|
FieldTokenID = "token_id"
|
|
// FieldUUID holds the string denoting the uuid field in the database.
|
|
FieldUUID = "uuid"
|
|
// Table holds the table name of the usertoken in the database.
|
|
Table = "user_tokens"
|
|
)
|
|
|
|
// Columns holds all SQL columns for usertoken fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldTokenID,
|
|
FieldUUID,
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
// OrderOption defines the ordering options for the UserToken queries.
|
|
type OrderOption func(*sql.Selector)
|
|
|
|
// ByID orders the results by the id field.
|
|
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTokenID orders the results by the token_id field.
|
|
func ByTokenID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTokenID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByUUID orders the results by the uuid field.
|
|
func ByUUID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldUUID, opts...).ToFunc()
|
|
}
|