58 lines
1.4 KiB
Go
58 lines
1.4 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package setup
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the setup type in the database.
|
|
Label = "setup"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldSetUpAt holds the string denoting the set_up_at field in the database.
|
|
FieldSetUpAt = "set_up_at"
|
|
// Table holds the table name of the setup in the database.
|
|
Table = "setups"
|
|
)
|
|
|
|
// Columns holds all SQL columns for setup fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldSetUpAt,
|
|
}
|
|
|
|
// 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 (
|
|
// DefaultSetUpAt holds the default value on creation for the "set_up_at" field.
|
|
DefaultSetUpAt func() time.Time
|
|
// DefaultID holds the default value on creation for the "id" field.
|
|
DefaultID func() uuid.UUID
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the Setup 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()
|
|
}
|
|
|
|
// BySetUpAt orders the results by the set_up_at field.
|
|
func BySetUpAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSetUpAt, opts...).ToFunc()
|
|
}
|