mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 23:21:00 +08:00
77 lines
2.2 KiB
Go
77 lines
2.2 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package notificationclient
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the notificationclient type in the database.
|
|
Label = "notification_client"
|
|
// 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"
|
|
// FieldService holds the string denoting the service field in the database.
|
|
FieldService = "service"
|
|
// FieldSettings holds the string denoting the settings field in the database.
|
|
FieldSettings = "settings"
|
|
// FieldEnabled holds the string denoting the enabled field in the database.
|
|
FieldEnabled = "enabled"
|
|
// Table holds the table name of the notificationclient in the database.
|
|
Table = "notification_clients"
|
|
)
|
|
|
|
// Columns holds all SQL columns for notificationclient fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldName,
|
|
FieldService,
|
|
FieldSettings,
|
|
FieldEnabled,
|
|
}
|
|
|
|
// 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 (
|
|
// DefaultEnabled holds the default value on creation for the "enabled" field.
|
|
DefaultEnabled bool
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the NotificationClient 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()
|
|
}
|
|
|
|
// ByService orders the results by the service field.
|
|
func ByService(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldService, opts...).ToFunc()
|
|
}
|
|
|
|
// BySettings orders the results by the settings field.
|
|
func BySettings(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSettings, opts...).ToFunc()
|
|
}
|
|
|
|
// ByEnabled orders the results by the enabled field.
|
|
func ByEnabled(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldEnabled, opts...).ToFunc()
|
|
}
|