12
This commit is contained in:
151
internal/ent/cloudflareaccounts/cloudflareaccounts.go
Normal file
151
internal/ent/cloudflareaccounts/cloudflareaccounts.go
Normal file
@ -0,0 +1,151 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package cloudflareaccounts
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the cloudflareaccounts type in the database.
|
||||
Label = "cloudflare_accounts"
|
||||
// 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"
|
||||
// FieldAccountID holds the string denoting the account_id field in the database.
|
||||
FieldAccountID = "account_id"
|
||||
// FieldAPIToken holds the string denoting the api_token field in the database.
|
||||
FieldAPIToken = "api_token"
|
||||
// FieldEmail holds the string denoting the email field in the database.
|
||||
FieldEmail = "email"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
FieldRemark = "remark"
|
||||
// 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"
|
||||
// EdgeCloudflareBuckets holds the string denoting the cloudflare_buckets edge name in mutations.
|
||||
EdgeCloudflareBuckets = "cloudflare_buckets"
|
||||
// Table holds the table name of the cloudflareaccounts in the database.
|
||||
Table = "cloudflare_accounts"
|
||||
// CloudflareBucketsTable is the table that holds the cloudflare_buckets relation/edge.
|
||||
CloudflareBucketsTable = "cloudflare_r2s"
|
||||
// CloudflareBucketsInverseTable is the table name for the CloudflareR2 entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "cloudflarer2" package.
|
||||
CloudflareBucketsInverseTable = "cloudflare_r2s"
|
||||
// CloudflareBucketsColumn is the table column denoting the cloudflare_buckets relation/edge.
|
||||
CloudflareBucketsColumn = "cloudflare_accounts_cloudflare_buckets"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for cloudflareaccounts fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldName,
|
||||
FieldAccountID,
|
||||
FieldAPIToken,
|
||||
FieldEmail,
|
||||
FieldStatus,
|
||||
FieldRemark,
|
||||
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 (
|
||||
// NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
NameValidator func(string) error
|
||||
// AccountIDValidator is a validator for the "account_id" field. It is called by the builders before save.
|
||||
AccountIDValidator func(string) error
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus int8
|
||||
// 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 CloudflareAccounts 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()
|
||||
}
|
||||
|
||||
// ByAccountID orders the results by the account_id field.
|
||||
func ByAccountID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAccountID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAPIToken orders the results by the api_token field.
|
||||
func ByAPIToken(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAPIToken, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEmail orders the results by the email field.
|
||||
func ByEmail(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmail, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRemark orders the results by the remark field.
|
||||
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRemark, 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()
|
||||
}
|
||||
|
||||
// ByCloudflareBucketsCount orders the results by cloudflare_buckets count.
|
||||
func ByCloudflareBucketsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newCloudflareBucketsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByCloudflareBuckets orders the results by cloudflare_buckets terms.
|
||||
func ByCloudflareBuckets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newCloudflareBucketsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newCloudflareBucketsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(CloudflareBucketsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, CloudflareBucketsTable, CloudflareBucketsColumn),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user