| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601 |
- // Code generated by ent, DO NOT EDIT.
- package usagelog
- import (
- "time"
- "entgo.io/ent/dialect/sql"
- "entgo.io/ent/dialect/sql/sqlgraph"
- )
- const (
- // Label holds the string label denoting the usagelog type in the database.
- Label = "usage_log"
- // FieldID holds the string denoting the id field in the database.
- FieldID = "id"
- // FieldUserID holds the string denoting the user_id field in the database.
- FieldUserID = "user_id"
- // FieldAPIKeyID holds the string denoting the api_key_id field in the database.
- FieldAPIKeyID = "api_key_id"
- // FieldAccountID holds the string denoting the account_id field in the database.
- FieldAccountID = "account_id"
- // FieldRequestID holds the string denoting the request_id field in the database.
- FieldRequestID = "request_id"
- // FieldModel holds the string denoting the model field in the database.
- FieldModel = "model"
- // FieldRequestedModel holds the string denoting the requested_model field in the database.
- FieldRequestedModel = "requested_model"
- // FieldUpstreamModel holds the string denoting the upstream_model field in the database.
- FieldUpstreamModel = "upstream_model"
- // FieldUpstreamResponseModel holds the string denoting the upstream_response_model field in the database.
- FieldUpstreamResponseModel = "upstream_response_model"
- // FieldUpstreamModelMismatch holds the string denoting the upstream_model_mismatch field in the database.
- FieldUpstreamModelMismatch = "upstream_model_mismatch"
- // FieldChannelID holds the string denoting the channel_id field in the database.
- FieldChannelID = "channel_id"
- // FieldModelMappingChain holds the string denoting the model_mapping_chain field in the database.
- FieldModelMappingChain = "model_mapping_chain"
- // FieldBillingTier holds the string denoting the billing_tier field in the database.
- FieldBillingTier = "billing_tier"
- // FieldBillingMode holds the string denoting the billing_mode field in the database.
- FieldBillingMode = "billing_mode"
- // FieldGroupID holds the string denoting the group_id field in the database.
- FieldGroupID = "group_id"
- // FieldSubscriptionID holds the string denoting the subscription_id field in the database.
- FieldSubscriptionID = "subscription_id"
- // FieldInputTokens holds the string denoting the input_tokens field in the database.
- FieldInputTokens = "input_tokens"
- // FieldOutputTokens holds the string denoting the output_tokens field in the database.
- FieldOutputTokens = "output_tokens"
- // FieldCacheCreationTokens holds the string denoting the cache_creation_tokens field in the database.
- FieldCacheCreationTokens = "cache_creation_tokens"
- // FieldCacheReadTokens holds the string denoting the cache_read_tokens field in the database.
- FieldCacheReadTokens = "cache_read_tokens"
- // FieldCacheCreation5mTokens holds the string denoting the cache_creation_5m_tokens field in the database.
- FieldCacheCreation5mTokens = "cache_creation_5m_tokens"
- // FieldCacheCreation1hTokens holds the string denoting the cache_creation_1h_tokens field in the database.
- FieldCacheCreation1hTokens = "cache_creation_1h_tokens"
- // FieldInputCost holds the string denoting the input_cost field in the database.
- FieldInputCost = "input_cost"
- // FieldOutputCost holds the string denoting the output_cost field in the database.
- FieldOutputCost = "output_cost"
- // FieldCacheCreationCost holds the string denoting the cache_creation_cost field in the database.
- FieldCacheCreationCost = "cache_creation_cost"
- // FieldCacheReadCost holds the string denoting the cache_read_cost field in the database.
- FieldCacheReadCost = "cache_read_cost"
- // FieldTotalCost holds the string denoting the total_cost field in the database.
- FieldTotalCost = "total_cost"
- // FieldActualCost holds the string denoting the actual_cost field in the database.
- FieldActualCost = "actual_cost"
- // FieldRateMultiplier holds the string denoting the rate_multiplier field in the database.
- FieldRateMultiplier = "rate_multiplier"
- // FieldLongContextBillingApplied holds the string denoting the long_context_billing_applied field in the database.
- FieldLongContextBillingApplied = "long_context_billing_applied"
- // FieldAccountRateMultiplier holds the string denoting the account_rate_multiplier field in the database.
- FieldAccountRateMultiplier = "account_rate_multiplier"
- // FieldBillingType holds the string denoting the billing_type field in the database.
- FieldBillingType = "billing_type"
- // FieldStream holds the string denoting the stream field in the database.
- FieldStream = "stream"
- // FieldDurationMs holds the string denoting the duration_ms field in the database.
- FieldDurationMs = "duration_ms"
- // FieldFirstTokenMs holds the string denoting the first_token_ms field in the database.
- FieldFirstTokenMs = "first_token_ms"
- // FieldUserAgent holds the string denoting the user_agent field in the database.
- FieldUserAgent = "user_agent"
- // FieldIPAddress holds the string denoting the ip_address field in the database.
- FieldIPAddress = "ip_address"
- // FieldImageCount holds the string denoting the image_count field in the database.
- FieldImageCount = "image_count"
- // FieldImageSize holds the string denoting the image_size field in the database.
- FieldImageSize = "image_size"
- // FieldImageInputSize holds the string denoting the image_input_size field in the database.
- FieldImageInputSize = "image_input_size"
- // FieldImageOutputSize holds the string denoting the image_output_size field in the database.
- FieldImageOutputSize = "image_output_size"
- // FieldImageSizeSource holds the string denoting the image_size_source field in the database.
- FieldImageSizeSource = "image_size_source"
- // FieldImageSizeBreakdown holds the string denoting the image_size_breakdown field in the database.
- FieldImageSizeBreakdown = "image_size_breakdown"
- // FieldVideoCount holds the string denoting the video_count field in the database.
- FieldVideoCount = "video_count"
- // FieldVideoResolution holds the string denoting the video_resolution field in the database.
- FieldVideoResolution = "video_resolution"
- // FieldVideoDurationSeconds holds the string denoting the video_duration_seconds field in the database.
- FieldVideoDurationSeconds = "video_duration_seconds"
- // FieldCacheTTLOverridden holds the string denoting the cache_ttl_overridden field in the database.
- FieldCacheTTLOverridden = "cache_ttl_overridden"
- // FieldCreatedAt holds the string denoting the created_at field in the database.
- FieldCreatedAt = "created_at"
- // EdgeUser holds the string denoting the user edge name in mutations.
- EdgeUser = "user"
- // EdgeAPIKey holds the string denoting the api_key edge name in mutations.
- EdgeAPIKey = "api_key"
- // EdgeAccount holds the string denoting the account edge name in mutations.
- EdgeAccount = "account"
- // EdgeGroup holds the string denoting the group edge name in mutations.
- EdgeGroup = "group"
- // EdgeSubscription holds the string denoting the subscription edge name in mutations.
- EdgeSubscription = "subscription"
- // Table holds the table name of the usagelog in the database.
- Table = "usage_logs"
- // UserTable is the table that holds the user relation/edge.
- UserTable = "usage_logs"
- // UserInverseTable is the table name for the User entity.
- // It exists in this package in order to avoid circular dependency with the "user" package.
- UserInverseTable = "users"
- // UserColumn is the table column denoting the user relation/edge.
- UserColumn = "user_id"
- // APIKeyTable is the table that holds the api_key relation/edge.
- APIKeyTable = "usage_logs"
- // APIKeyInverseTable is the table name for the APIKey entity.
- // It exists in this package in order to avoid circular dependency with the "apikey" package.
- APIKeyInverseTable = "api_keys"
- // APIKeyColumn is the table column denoting the api_key relation/edge.
- APIKeyColumn = "api_key_id"
- // AccountTable is the table that holds the account relation/edge.
- AccountTable = "usage_logs"
- // AccountInverseTable is the table name for the Account entity.
- // It exists in this package in order to avoid circular dependency with the "account" package.
- AccountInverseTable = "accounts"
- // AccountColumn is the table column denoting the account relation/edge.
- AccountColumn = "account_id"
- // GroupTable is the table that holds the group relation/edge.
- GroupTable = "usage_logs"
- // GroupInverseTable is the table name for the Group entity.
- // It exists in this package in order to avoid circular dependency with the "group" package.
- GroupInverseTable = "groups"
- // GroupColumn is the table column denoting the group relation/edge.
- GroupColumn = "group_id"
- // SubscriptionTable is the table that holds the subscription relation/edge.
- SubscriptionTable = "usage_logs"
- // SubscriptionInverseTable is the table name for the UserSubscription entity.
- // It exists in this package in order to avoid circular dependency with the "usersubscription" package.
- SubscriptionInverseTable = "user_subscriptions"
- // SubscriptionColumn is the table column denoting the subscription relation/edge.
- SubscriptionColumn = "subscription_id"
- )
- // Columns holds all SQL columns for usagelog fields.
- var Columns = []string{
- FieldID,
- FieldUserID,
- FieldAPIKeyID,
- FieldAccountID,
- FieldRequestID,
- FieldModel,
- FieldRequestedModel,
- FieldUpstreamModel,
- FieldUpstreamResponseModel,
- FieldUpstreamModelMismatch,
- FieldChannelID,
- FieldModelMappingChain,
- FieldBillingTier,
- FieldBillingMode,
- FieldGroupID,
- FieldSubscriptionID,
- FieldInputTokens,
- FieldOutputTokens,
- FieldCacheCreationTokens,
- FieldCacheReadTokens,
- FieldCacheCreation5mTokens,
- FieldCacheCreation1hTokens,
- FieldInputCost,
- FieldOutputCost,
- FieldCacheCreationCost,
- FieldCacheReadCost,
- FieldTotalCost,
- FieldActualCost,
- FieldRateMultiplier,
- FieldLongContextBillingApplied,
- FieldAccountRateMultiplier,
- FieldBillingType,
- FieldStream,
- FieldDurationMs,
- FieldFirstTokenMs,
- FieldUserAgent,
- FieldIPAddress,
- FieldImageCount,
- FieldImageSize,
- FieldImageInputSize,
- FieldImageOutputSize,
- FieldImageSizeSource,
- FieldImageSizeBreakdown,
- FieldVideoCount,
- FieldVideoResolution,
- FieldVideoDurationSeconds,
- FieldCacheTTLOverridden,
- FieldCreatedAt,
- }
- // 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 (
- // RequestIDValidator is a validator for the "request_id" field. It is called by the builders before save.
- RequestIDValidator func(string) error
- // ModelValidator is a validator for the "model" field. It is called by the builders before save.
- ModelValidator func(string) error
- // RequestedModelValidator is a validator for the "requested_model" field. It is called by the builders before save.
- RequestedModelValidator func(string) error
- // UpstreamModelValidator is a validator for the "upstream_model" field. It is called by the builders before save.
- UpstreamModelValidator func(string) error
- // UpstreamResponseModelValidator is a validator for the "upstream_response_model" field. It is called by the builders before save.
- UpstreamResponseModelValidator func(string) error
- // ModelMappingChainValidator is a validator for the "model_mapping_chain" field. It is called by the builders before save.
- ModelMappingChainValidator func(string) error
- // BillingTierValidator is a validator for the "billing_tier" field. It is called by the builders before save.
- BillingTierValidator func(string) error
- // BillingModeValidator is a validator for the "billing_mode" field. It is called by the builders before save.
- BillingModeValidator func(string) error
- // DefaultInputTokens holds the default value on creation for the "input_tokens" field.
- DefaultInputTokens int
- // DefaultOutputTokens holds the default value on creation for the "output_tokens" field.
- DefaultOutputTokens int
- // DefaultCacheCreationTokens holds the default value on creation for the "cache_creation_tokens" field.
- DefaultCacheCreationTokens int
- // DefaultCacheReadTokens holds the default value on creation for the "cache_read_tokens" field.
- DefaultCacheReadTokens int
- // DefaultCacheCreation5mTokens holds the default value on creation for the "cache_creation_5m_tokens" field.
- DefaultCacheCreation5mTokens int
- // DefaultCacheCreation1hTokens holds the default value on creation for the "cache_creation_1h_tokens" field.
- DefaultCacheCreation1hTokens int
- // DefaultInputCost holds the default value on creation for the "input_cost" field.
- DefaultInputCost float64
- // DefaultOutputCost holds the default value on creation for the "output_cost" field.
- DefaultOutputCost float64
- // DefaultCacheCreationCost holds the default value on creation for the "cache_creation_cost" field.
- DefaultCacheCreationCost float64
- // DefaultCacheReadCost holds the default value on creation for the "cache_read_cost" field.
- DefaultCacheReadCost float64
- // DefaultTotalCost holds the default value on creation for the "total_cost" field.
- DefaultTotalCost float64
- // DefaultActualCost holds the default value on creation for the "actual_cost" field.
- DefaultActualCost float64
- // DefaultRateMultiplier holds the default value on creation for the "rate_multiplier" field.
- DefaultRateMultiplier float64
- // DefaultLongContextBillingApplied holds the default value on creation for the "long_context_billing_applied" field.
- DefaultLongContextBillingApplied bool
- // DefaultBillingType holds the default value on creation for the "billing_type" field.
- DefaultBillingType int8
- // DefaultStream holds the default value on creation for the "stream" field.
- DefaultStream bool
- // UserAgentValidator is a validator for the "user_agent" field. It is called by the builders before save.
- UserAgentValidator func(string) error
- // IPAddressValidator is a validator for the "ip_address" field. It is called by the builders before save.
- IPAddressValidator func(string) error
- // DefaultImageCount holds the default value on creation for the "image_count" field.
- DefaultImageCount int
- // ImageSizeValidator is a validator for the "image_size" field. It is called by the builders before save.
- ImageSizeValidator func(string) error
- // ImageInputSizeValidator is a validator for the "image_input_size" field. It is called by the builders before save.
- ImageInputSizeValidator func(string) error
- // ImageOutputSizeValidator is a validator for the "image_output_size" field. It is called by the builders before save.
- ImageOutputSizeValidator func(string) error
- // ImageSizeSourceValidator is a validator for the "image_size_source" field. It is called by the builders before save.
- ImageSizeSourceValidator func(string) error
- // DefaultVideoCount holds the default value on creation for the "video_count" field.
- DefaultVideoCount int
- // VideoResolutionValidator is a validator for the "video_resolution" field. It is called by the builders before save.
- VideoResolutionValidator func(string) error
- // DefaultCacheTTLOverridden holds the default value on creation for the "cache_ttl_overridden" field.
- DefaultCacheTTLOverridden bool
- // DefaultCreatedAt holds the default value on creation for the "created_at" field.
- DefaultCreatedAt func() time.Time
- )
- // OrderOption defines the ordering options for the UsageLog 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()
- }
- // ByUserID orders the results by the user_id field.
- func ByUserID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldUserID, opts...).ToFunc()
- }
- // ByAPIKeyID orders the results by the api_key_id field.
- func ByAPIKeyID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAPIKeyID, opts...).ToFunc()
- }
- // ByAccountID orders the results by the account_id field.
- func ByAccountID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAccountID, opts...).ToFunc()
- }
- // ByRequestID orders the results by the request_id field.
- func ByRequestID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldRequestID, opts...).ToFunc()
- }
- // ByModel orders the results by the model field.
- func ByModel(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldModel, opts...).ToFunc()
- }
- // ByRequestedModel orders the results by the requested_model field.
- func ByRequestedModel(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldRequestedModel, opts...).ToFunc()
- }
- // ByUpstreamModel orders the results by the upstream_model field.
- func ByUpstreamModel(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldUpstreamModel, opts...).ToFunc()
- }
- // ByUpstreamResponseModel orders the results by the upstream_response_model field.
- func ByUpstreamResponseModel(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldUpstreamResponseModel, opts...).ToFunc()
- }
- // ByUpstreamModelMismatch orders the results by the upstream_model_mismatch field.
- func ByUpstreamModelMismatch(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldUpstreamModelMismatch, opts...).ToFunc()
- }
- // ByChannelID orders the results by the channel_id field.
- func ByChannelID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldChannelID, opts...).ToFunc()
- }
- // ByModelMappingChain orders the results by the model_mapping_chain field.
- func ByModelMappingChain(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldModelMappingChain, opts...).ToFunc()
- }
- // ByBillingTier orders the results by the billing_tier field.
- func ByBillingTier(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldBillingTier, opts...).ToFunc()
- }
- // ByBillingMode orders the results by the billing_mode field.
- func ByBillingMode(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldBillingMode, opts...).ToFunc()
- }
- // ByGroupID orders the results by the group_id field.
- func ByGroupID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldGroupID, opts...).ToFunc()
- }
- // BySubscriptionID orders the results by the subscription_id field.
- func BySubscriptionID(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldSubscriptionID, opts...).ToFunc()
- }
- // ByInputTokens orders the results by the input_tokens field.
- func ByInputTokens(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldInputTokens, opts...).ToFunc()
- }
- // ByOutputTokens orders the results by the output_tokens field.
- func ByOutputTokens(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldOutputTokens, opts...).ToFunc()
- }
- // ByCacheCreationTokens orders the results by the cache_creation_tokens field.
- func ByCacheCreationTokens(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCacheCreationTokens, opts...).ToFunc()
- }
- // ByCacheReadTokens orders the results by the cache_read_tokens field.
- func ByCacheReadTokens(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCacheReadTokens, opts...).ToFunc()
- }
- // ByCacheCreation5mTokens orders the results by the cache_creation_5m_tokens field.
- func ByCacheCreation5mTokens(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCacheCreation5mTokens, opts...).ToFunc()
- }
- // ByCacheCreation1hTokens orders the results by the cache_creation_1h_tokens field.
- func ByCacheCreation1hTokens(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCacheCreation1hTokens, opts...).ToFunc()
- }
- // ByInputCost orders the results by the input_cost field.
- func ByInputCost(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldInputCost, opts...).ToFunc()
- }
- // ByOutputCost orders the results by the output_cost field.
- func ByOutputCost(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldOutputCost, opts...).ToFunc()
- }
- // ByCacheCreationCost orders the results by the cache_creation_cost field.
- func ByCacheCreationCost(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCacheCreationCost, opts...).ToFunc()
- }
- // ByCacheReadCost orders the results by the cache_read_cost field.
- func ByCacheReadCost(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCacheReadCost, opts...).ToFunc()
- }
- // ByTotalCost orders the results by the total_cost field.
- func ByTotalCost(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldTotalCost, opts...).ToFunc()
- }
- // ByActualCost orders the results by the actual_cost field.
- func ByActualCost(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldActualCost, opts...).ToFunc()
- }
- // ByRateMultiplier orders the results by the rate_multiplier field.
- func ByRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldRateMultiplier, opts...).ToFunc()
- }
- // ByLongContextBillingApplied orders the results by the long_context_billing_applied field.
- func ByLongContextBillingApplied(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldLongContextBillingApplied, opts...).ToFunc()
- }
- // ByAccountRateMultiplier orders the results by the account_rate_multiplier field.
- func ByAccountRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldAccountRateMultiplier, opts...).ToFunc()
- }
- // ByBillingType orders the results by the billing_type field.
- func ByBillingType(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldBillingType, opts...).ToFunc()
- }
- // ByStream orders the results by the stream field.
- func ByStream(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldStream, opts...).ToFunc()
- }
- // ByDurationMs orders the results by the duration_ms field.
- func ByDurationMs(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldDurationMs, opts...).ToFunc()
- }
- // ByFirstTokenMs orders the results by the first_token_ms field.
- func ByFirstTokenMs(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldFirstTokenMs, opts...).ToFunc()
- }
- // ByUserAgent orders the results by the user_agent field.
- func ByUserAgent(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldUserAgent, opts...).ToFunc()
- }
- // ByIPAddress orders the results by the ip_address field.
- func ByIPAddress(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldIPAddress, opts...).ToFunc()
- }
- // ByImageCount orders the results by the image_count field.
- func ByImageCount(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldImageCount, opts...).ToFunc()
- }
- // ByImageSize orders the results by the image_size field.
- func ByImageSize(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldImageSize, opts...).ToFunc()
- }
- // ByImageInputSize orders the results by the image_input_size field.
- func ByImageInputSize(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldImageInputSize, opts...).ToFunc()
- }
- // ByImageOutputSize orders the results by the image_output_size field.
- func ByImageOutputSize(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldImageOutputSize, opts...).ToFunc()
- }
- // ByImageSizeSource orders the results by the image_size_source field.
- func ByImageSizeSource(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldImageSizeSource, opts...).ToFunc()
- }
- // ByVideoCount orders the results by the video_count field.
- func ByVideoCount(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldVideoCount, opts...).ToFunc()
- }
- // ByVideoResolution orders the results by the video_resolution field.
- func ByVideoResolution(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldVideoResolution, opts...).ToFunc()
- }
- // ByVideoDurationSeconds orders the results by the video_duration_seconds field.
- func ByVideoDurationSeconds(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldVideoDurationSeconds, opts...).ToFunc()
- }
- // ByCacheTTLOverridden orders the results by the cache_ttl_overridden field.
- func ByCacheTTLOverridden(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCacheTTLOverridden, opts...).ToFunc()
- }
- // ByCreatedAt orders the results by the created_at field.
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
- return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
- }
- // ByUserField orders the results by user field.
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption {
- return func(s *sql.Selector) {
- sqlgraph.OrderByNeighborTerms(s, newUserStep(), sql.OrderByField(field, opts...))
- }
- }
- // ByAPIKeyField orders the results by api_key field.
- func ByAPIKeyField(field string, opts ...sql.OrderTermOption) OrderOption {
- return func(s *sql.Selector) {
- sqlgraph.OrderByNeighborTerms(s, newAPIKeyStep(), sql.OrderByField(field, opts...))
- }
- }
- // ByAccountField orders the results by account field.
- func ByAccountField(field string, opts ...sql.OrderTermOption) OrderOption {
- return func(s *sql.Selector) {
- sqlgraph.OrderByNeighborTerms(s, newAccountStep(), sql.OrderByField(field, opts...))
- }
- }
- // ByGroupField orders the results by group field.
- func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption {
- return func(s *sql.Selector) {
- sqlgraph.OrderByNeighborTerms(s, newGroupStep(), sql.OrderByField(field, opts...))
- }
- }
- // BySubscriptionField orders the results by subscription field.
- func BySubscriptionField(field string, opts ...sql.OrderTermOption) OrderOption {
- return func(s *sql.Selector) {
- sqlgraph.OrderByNeighborTerms(s, newSubscriptionStep(), sql.OrderByField(field, opts...))
- }
- }
- func newUserStep() *sqlgraph.Step {
- return sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.To(UserInverseTable, FieldID),
- sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
- )
- }
- func newAPIKeyStep() *sqlgraph.Step {
- return sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.To(APIKeyInverseTable, FieldID),
- sqlgraph.Edge(sqlgraph.M2O, true, APIKeyTable, APIKeyColumn),
- )
- }
- func newAccountStep() *sqlgraph.Step {
- return sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.To(AccountInverseTable, FieldID),
- sqlgraph.Edge(sqlgraph.M2O, true, AccountTable, AccountColumn),
- )
- }
- func newGroupStep() *sqlgraph.Step {
- return sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.To(GroupInverseTable, FieldID),
- sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
- )
- }
- func newSubscriptionStep() *sqlgraph.Step {
- return sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.To(SubscriptionInverseTable, FieldID),
- sqlgraph.Edge(sqlgraph.M2O, true, SubscriptionTable, SubscriptionColumn),
- )
- }
|