// Code generated by ent, DO NOT EDIT. package proxy import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the proxy type in the database. Label = "proxy" // 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" // FieldProxyType holds the string denoting the proxy_type field in the database. FieldProxyType = "proxy_type" // FieldLocalIP holds the string denoting the local_ip field in the database. FieldLocalIP = "local_ip" // FieldLocalPort holds the string denoting the local_port field in the database. FieldLocalPort = "local_port" // FieldRemotePort holds the string denoting the remote_port field in the database. FieldRemotePort = "remote_port" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldCustomDomains holds the string denoting the custom_domains field in the database. FieldCustomDomains = "custom_domains" // FieldMetadata holds the string denoting the metadata field in the database. FieldMetadata = "metadata" // FieldClientID holds the string denoting the client_id field in the database. FieldClientID = "client_id" // 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" // Table holds the table name of the proxy in the database. Table = "proxies" ) // Columns holds all SQL columns for proxy fields. var Columns = []string{ FieldID, FieldName, FieldProxyType, FieldLocalIP, FieldLocalPort, FieldRemotePort, FieldStatus, FieldCustomDomains, FieldMetadata, FieldClientID, FieldCreatedAt, FieldUpdatedAt, } // 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 ( // DefaultProxyType holds the default value on creation for the "proxy_type" field. DefaultProxyType string // DefaultLocalIP holds the default value on creation for the "local_ip" field. DefaultLocalIP string // DefaultRemotePort holds the default value on creation for the "remote_port" field. DefaultRemotePort int // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus string // DefaultCustomDomains holds the default value on creation for the "custom_domains" field. DefaultCustomDomains string // DefaultMetadata holds the default value on creation for the "metadata" field. DefaultMetadata string // DefaultClientID holds the default value on creation for the "client_id" field. DefaultClientID int // 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 ) // OrderOption defines the ordering options for the Proxy 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() } // ByProxyType orders the results by the proxy_type field. func ByProxyType(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldProxyType, opts...).ToFunc() } // ByLocalIP orders the results by the local_ip field. func ByLocalIP(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLocalIP, opts...).ToFunc() } // ByLocalPort orders the results by the local_port field. func ByLocalPort(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLocalPort, opts...).ToFunc() } // ByRemotePort orders the results by the remote_port field. func ByRemotePort(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldRemotePort, opts...).ToFunc() } // ByStatus orders the results by the status field. func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, opts...).ToFunc() } // ByCustomDomains orders the results by the custom_domains field. func ByCustomDomains(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCustomDomains, opts...).ToFunc() } // ByMetadata orders the results by the metadata field. func ByMetadata(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMetadata, opts...).ToFunc() } // ByClientID orders the results by the client_id field. func ByClientID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldClientID, 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() }