openmeter / ent /db /chargeusagebasedruninvoicedusage /chargeusagebasedruninvoicedusage.go
Leon4gr45's picture
Upload folder using huggingface_hub (part 4)
63a69a8 verified
Raw
History Blame Contribute Delete
8.52 kB
// Code generated by ent, DO NOT EDIT.
package chargeusagebasedruninvoicedusage
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
// Label holds the string label denoting the chargeusagebasedruninvoicedusage type in the database.
Label = "charge_usage_based_run_invoiced_usage"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldServicePeriodFrom holds the string denoting the service_period_from field in the database.
FieldServicePeriodFrom = "service_period_from"
// FieldServicePeriodTo holds the string denoting the service_period_to field in the database.
FieldServicePeriodTo = "service_period_to"
// FieldLedgerTransactionGroupID holds the string denoting the ledger_transaction_group_id field in the database.
FieldLedgerTransactionGroupID = "ledger_transaction_group_id"
// FieldNamespace holds the string denoting the namespace field in the database.
FieldNamespace = "namespace"
// 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"
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
FieldDeletedAt = "deleted_at"
// FieldAnnotations holds the string denoting the annotations field in the database.
FieldAnnotations = "annotations"
// FieldAmount holds the string denoting the amount field in the database.
FieldAmount = "amount"
// FieldTaxesTotal holds the string denoting the taxes_total field in the database.
FieldTaxesTotal = "taxes_total"
// FieldTaxesInclusiveTotal holds the string denoting the taxes_inclusive_total field in the database.
FieldTaxesInclusiveTotal = "taxes_inclusive_total"
// FieldTaxesExclusiveTotal holds the string denoting the taxes_exclusive_total field in the database.
FieldTaxesExclusiveTotal = "taxes_exclusive_total"
// FieldChargesTotal holds the string denoting the charges_total field in the database.
FieldChargesTotal = "charges_total"
// FieldDiscountsTotal holds the string denoting the discounts_total field in the database.
FieldDiscountsTotal = "discounts_total"
// FieldCreditsTotal holds the string denoting the credits_total field in the database.
FieldCreditsTotal = "credits_total"
// FieldTotal holds the string denoting the total field in the database.
FieldTotal = "total"
// FieldRunID holds the string denoting the run_id field in the database.
FieldRunID = "run_id"
// EdgeRun holds the string denoting the run edge name in mutations.
EdgeRun = "run"
// Table holds the table name of the chargeusagebasedruninvoicedusage in the database.
Table = "charge_usage_based_run_invoiced_usages"
// RunTable is the table that holds the run relation/edge.
RunTable = "charge_usage_based_run_invoiced_usages"
// RunInverseTable is the table name for the ChargeUsageBasedRuns entity.
// It exists in this package in order to avoid circular dependency with the "chargeusagebasedruns" package.
RunInverseTable = "charge_usage_based_runs"
// RunColumn is the table column denoting the run relation/edge.
RunColumn = "run_id"
)
// Columns holds all SQL columns for chargeusagebasedruninvoicedusage fields.
var Columns = []string{
FieldID,
FieldServicePeriodFrom,
FieldServicePeriodTo,
FieldLedgerTransactionGroupID,
FieldNamespace,
FieldCreatedAt,
FieldUpdatedAt,
FieldDeletedAt,
FieldAnnotations,
FieldAmount,
FieldTaxesTotal,
FieldTaxesInclusiveTotal,
FieldTaxesExclusiveTotal,
FieldChargesTotal,
FieldDiscountsTotal,
FieldCreditsTotal,
FieldTotal,
FieldRunID,
}
// 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 (
// LedgerTransactionGroupIDValidator is a validator for the "ledger_transaction_group_id" field. It is called by the builders before save.
LedgerTransactionGroupIDValidator func(string) error
// NamespaceValidator is a validator for the "namespace" field. It is called by the builders before save.
NamespaceValidator func(string) error
// 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
// DefaultID holds the default value on creation for the "id" field.
DefaultID func() string
)
// OrderOption defines the ordering options for the ChargeUsageBasedRunInvoicedUsage 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()
}
// ByServicePeriodFrom orders the results by the service_period_from field.
func ByServicePeriodFrom(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldServicePeriodFrom, opts...).ToFunc()
}
// ByServicePeriodTo orders the results by the service_period_to field.
func ByServicePeriodTo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldServicePeriodTo, opts...).ToFunc()
}
// ByLedgerTransactionGroupID orders the results by the ledger_transaction_group_id field.
func ByLedgerTransactionGroupID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLedgerTransactionGroupID, opts...).ToFunc()
}
// ByNamespace orders the results by the namespace field.
func ByNamespace(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNamespace, 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()
}
// ByDeletedAt orders the results by the deleted_at field.
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
}
// ByAmount orders the results by the amount field.
func ByAmount(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAmount, opts...).ToFunc()
}
// ByTaxesTotal orders the results by the taxes_total field.
func ByTaxesTotal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTaxesTotal, opts...).ToFunc()
}
// ByTaxesInclusiveTotal orders the results by the taxes_inclusive_total field.
func ByTaxesInclusiveTotal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTaxesInclusiveTotal, opts...).ToFunc()
}
// ByTaxesExclusiveTotal orders the results by the taxes_exclusive_total field.
func ByTaxesExclusiveTotal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTaxesExclusiveTotal, opts...).ToFunc()
}
// ByChargesTotal orders the results by the charges_total field.
func ByChargesTotal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldChargesTotal, opts...).ToFunc()
}
// ByDiscountsTotal orders the results by the discounts_total field.
func ByDiscountsTotal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDiscountsTotal, opts...).ToFunc()
}
// ByCreditsTotal orders the results by the credits_total field.
func ByCreditsTotal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreditsTotal, opts...).ToFunc()
}
// ByTotal orders the results by the total field.
func ByTotal(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTotal, opts...).ToFunc()
}
// ByRunID orders the results by the run_id field.
func ByRunID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRunID, opts...).ToFunc()
}
// ByRunField orders the results by run field.
func ByRunField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newRunStep(), sql.OrderByField(field, opts...))
}
}
func newRunStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(RunInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2O, true, RunTable, RunColumn),
)
}