mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-16 16:30:52 +08:00
85 lines
2.5 KiB
Go
85 lines
2.5 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package indexers
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the indexers type in the database.
|
|
Label = "indexers"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldName holds the string denoting the name field in the database.
|
|
FieldName = "name"
|
|
// FieldImplementation holds the string denoting the implementation field in the database.
|
|
FieldImplementation = "implementation"
|
|
// FieldSettings holds the string denoting the settings field in the database.
|
|
FieldSettings = "settings"
|
|
// FieldEnableRss holds the string denoting the enable_rss field in the database.
|
|
FieldEnableRss = "enable_rss"
|
|
// FieldPriority holds the string denoting the priority field in the database.
|
|
FieldPriority = "priority"
|
|
// Table holds the table name of the indexers in the database.
|
|
Table = "indexers"
|
|
)
|
|
|
|
// Columns holds all SQL columns for indexers fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldName,
|
|
FieldImplementation,
|
|
FieldSettings,
|
|
FieldEnableRss,
|
|
FieldPriority,
|
|
}
|
|
|
|
// 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 (
|
|
// DefaultEnableRss holds the default value on creation for the "enable_rss" field.
|
|
DefaultEnableRss bool
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the Indexers 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()
|
|
}
|
|
|
|
// ByName orders the results by the name field.
|
|
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldName, opts...).ToFunc()
|
|
}
|
|
|
|
// ByImplementation orders the results by the implementation field.
|
|
func ByImplementation(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldImplementation, opts...).ToFunc()
|
|
}
|
|
|
|
// BySettings orders the results by the settings field.
|
|
func BySettings(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSettings, opts...).ToFunc()
|
|
}
|
|
|
|
// ByEnableRss orders the results by the enable_rss field.
|
|
func ByEnableRss(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldEnableRss, opts...).ToFunc()
|
|
}
|
|
|
|
// ByPriority orders the results by the priority field.
|
|
func ByPriority(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPriority, opts...).ToFunc()
|
|
}
|