135 lines
4.4 KiB
Go
135 lines
4.4 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package frpcclient
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the frpcclient type in the database.
|
|
Label = "frpc_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"
|
|
// FieldKey holds the string denoting the key field in the database.
|
|
FieldKey = "key"
|
|
// FieldAddr holds the string denoting the addr field in the database.
|
|
FieldAddr = "addr"
|
|
// FieldPort holds the string denoting the port field in the database.
|
|
FieldPort = "port"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldMetadata holds the string denoting the metadata field in the database.
|
|
FieldMetadata = "metadata"
|
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
|
FieldUpdatedAt = "updated_at"
|
|
// FieldLastSeen holds the string denoting the last_seen field in the database.
|
|
FieldLastSeen = "last_seen"
|
|
// Table holds the table name of the frpcclient in the database.
|
|
Table = "frpc_clients"
|
|
)
|
|
|
|
// Columns holds all SQL columns for frpcclient fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldName,
|
|
FieldKey,
|
|
FieldAddr,
|
|
FieldPort,
|
|
FieldStatus,
|
|
FieldMetadata,
|
|
FieldCreatedAt,
|
|
FieldUpdatedAt,
|
|
FieldLastSeen,
|
|
}
|
|
|
|
// 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 (
|
|
// DefaultKey holds the default value on creation for the "key" field.
|
|
DefaultKey string
|
|
// DefaultAddr holds the default value on creation for the "addr" field.
|
|
DefaultAddr string
|
|
// DefaultPort holds the default value on creation for the "port" field.
|
|
DefaultPort int
|
|
// DefaultStatus holds the default value on creation for the "status" field.
|
|
DefaultStatus string
|
|
// DefaultMetadata holds the default value on creation for the "metadata" field.
|
|
DefaultMetadata string
|
|
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
|
DefaultCreatedAt func() time.Time
|
|
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
|
DefaultUpdatedAt func() time.Time
|
|
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
|
|
UpdateDefaultUpdatedAt func() time.Time
|
|
// DefaultLastSeen holds the default value on creation for the "last_seen" field.
|
|
DefaultLastSeen func() time.Time
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the FrpcClient 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()
|
|
}
|
|
|
|
// ByKey orders the results by the key field.
|
|
func ByKey(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldKey, opts...).ToFunc()
|
|
}
|
|
|
|
// ByAddr orders the results by the addr field.
|
|
func ByAddr(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldAddr, opts...).ToFunc()
|
|
}
|
|
|
|
// ByPort orders the results by the port field.
|
|
func ByPort(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPort, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByMetadata orders the results by the metadata field.
|
|
func ByMetadata(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldMetadata, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the created_at field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByUpdatedAt orders the results by the updated_at field.
|
|
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByLastSeen orders the results by the last_seen field.
|
|
func ByLastSeen(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldLastSeen, opts...).ToFunc()
|
|
}
|