Sub2API v1.0 - AI API 网关(二开初始版本,基于上游 Wei-Shaw/sub2api)
Release / update-version (push) Has been cancelled
Release / build-frontend (push) Has been cancelled
Release / release (push) Has been cancelled
Release / sync-version-file (push) Has been cancelled
CI / shell (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / golangci-lint (push) Canceled after 0s
Security Scan / backend-security (push) Canceled after 0s
Security Scan / frontend-security (push) Canceled after 0s
Release / update-version (push) Has been cancelled
Release / build-frontend (push) Has been cancelled
Release / release (push) Has been cancelled
Release / sync-version-file (push) Has been cancelled
CI / shell (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / golangci-lint (push) Canceled after 0s
Security Scan / backend-security (push) Canceled after 0s
Security Scan / frontend-security (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,866 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package group
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/Wei-Shaw/sub2api/internal/domain"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the group type in the database.
|
||||
Label = "group"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "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"
|
||||
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
|
||||
FieldDeletedAt = "deleted_at"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "name"
|
||||
// FieldDescription holds the string denoting the description field in the database.
|
||||
FieldDescription = "description"
|
||||
// FieldRateMultiplier holds the string denoting the rate_multiplier field in the database.
|
||||
FieldRateMultiplier = "rate_multiplier"
|
||||
// FieldPeakRateEnabled holds the string denoting the peak_rate_enabled field in the database.
|
||||
FieldPeakRateEnabled = "peak_rate_enabled"
|
||||
// FieldPeakStart holds the string denoting the peak_start field in the database.
|
||||
FieldPeakStart = "peak_start"
|
||||
// FieldPeakEnd holds the string denoting the peak_end field in the database.
|
||||
FieldPeakEnd = "peak_end"
|
||||
// FieldPeakRateMultiplier holds the string denoting the peak_rate_multiplier field in the database.
|
||||
FieldPeakRateMultiplier = "peak_rate_multiplier"
|
||||
// FieldIsExclusive holds the string denoting the is_exclusive field in the database.
|
||||
FieldIsExclusive = "is_exclusive"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldDuplicateOperationID holds the string denoting the duplicate_operation_id field in the database.
|
||||
FieldDuplicateOperationID = "duplicate_operation_id"
|
||||
// FieldPlatform holds the string denoting the platform field in the database.
|
||||
FieldPlatform = "platform"
|
||||
// FieldSubscriptionType holds the string denoting the subscription_type field in the database.
|
||||
FieldSubscriptionType = "subscription_type"
|
||||
// FieldDailyLimitUsd holds the string denoting the daily_limit_usd field in the database.
|
||||
FieldDailyLimitUsd = "daily_limit_usd"
|
||||
// FieldWeeklyLimitUsd holds the string denoting the weekly_limit_usd field in the database.
|
||||
FieldWeeklyLimitUsd = "weekly_limit_usd"
|
||||
// FieldMonthlyLimitUsd holds the string denoting the monthly_limit_usd field in the database.
|
||||
FieldMonthlyLimitUsd = "monthly_limit_usd"
|
||||
// FieldDefaultValidityDays holds the string denoting the default_validity_days field in the database.
|
||||
FieldDefaultValidityDays = "default_validity_days"
|
||||
// FieldAllowImageGeneration holds the string denoting the allow_image_generation field in the database.
|
||||
FieldAllowImageGeneration = "allow_image_generation"
|
||||
// FieldAllowBatchImageGeneration holds the string denoting the allow_batch_image_generation field in the database.
|
||||
FieldAllowBatchImageGeneration = "allow_batch_image_generation"
|
||||
// FieldImageRateIndependent holds the string denoting the image_rate_independent field in the database.
|
||||
FieldImageRateIndependent = "image_rate_independent"
|
||||
// FieldImageRateMultiplier holds the string denoting the image_rate_multiplier field in the database.
|
||||
FieldImageRateMultiplier = "image_rate_multiplier"
|
||||
// FieldImagePrice1k holds the string denoting the image_price_1k field in the database.
|
||||
FieldImagePrice1k = "image_price_1k"
|
||||
// FieldImagePrice2k holds the string denoting the image_price_2k field in the database.
|
||||
FieldImagePrice2k = "image_price_2k"
|
||||
// FieldImagePrice4k holds the string denoting the image_price_4k field in the database.
|
||||
FieldImagePrice4k = "image_price_4k"
|
||||
// FieldBatchImageDiscountMultiplier holds the string denoting the batch_image_discount_multiplier field in the database.
|
||||
FieldBatchImageDiscountMultiplier = "batch_image_discount_multiplier"
|
||||
// FieldBatchImageHoldMultiplier holds the string denoting the batch_image_hold_multiplier field in the database.
|
||||
FieldBatchImageHoldMultiplier = "batch_image_hold_multiplier"
|
||||
// FieldVideoRateIndependent holds the string denoting the video_rate_independent field in the database.
|
||||
FieldVideoRateIndependent = "video_rate_independent"
|
||||
// FieldVideoRateMultiplier holds the string denoting the video_rate_multiplier field in the database.
|
||||
FieldVideoRateMultiplier = "video_rate_multiplier"
|
||||
// FieldVideoPrice480p holds the string denoting the video_price_480p field in the database.
|
||||
FieldVideoPrice480p = "video_price_480p"
|
||||
// FieldVideoPrice720p holds the string denoting the video_price_720p field in the database.
|
||||
FieldVideoPrice720p = "video_price_720p"
|
||||
// FieldVideoPrice1080p holds the string denoting the video_price_1080p field in the database.
|
||||
FieldVideoPrice1080p = "video_price_1080p"
|
||||
// FieldVideoModelPrices holds the string denoting the video_model_prices field in the database.
|
||||
FieldVideoModelPrices = "video_model_prices"
|
||||
// FieldWebSearchPricePerCall holds the string denoting the web_search_price_per_call field in the database.
|
||||
FieldWebSearchPricePerCall = "web_search_price_per_call"
|
||||
// FieldSearchPricePer1k holds the string denoting the search_price_per_1k field in the database.
|
||||
FieldSearchPricePer1k = "search_price_per_1k"
|
||||
// FieldAudioRealtimePricePerMin holds the string denoting the audio_realtime_price_per_min field in the database.
|
||||
FieldAudioRealtimePricePerMin = "audio_realtime_price_per_min"
|
||||
// FieldAudioTtsPricePerMillionChars holds the string denoting the audio_tts_price_per_million_chars field in the database.
|
||||
FieldAudioTtsPricePerMillionChars = "audio_tts_price_per_million_chars"
|
||||
// FieldAudioSttPricePerHour holds the string denoting the audio_stt_price_per_hour field in the database.
|
||||
FieldAudioSttPricePerHour = "audio_stt_price_per_hour"
|
||||
// FieldLongContextPricingEnabled holds the string denoting the long_context_pricing_enabled field in the database.
|
||||
FieldLongContextPricingEnabled = "long_context_pricing_enabled"
|
||||
// FieldModelPricing holds the string denoting the model_pricing field in the database.
|
||||
FieldModelPricing = "model_pricing"
|
||||
// FieldClaudeCodeOnly holds the string denoting the claude_code_only field in the database.
|
||||
FieldClaudeCodeOnly = "claude_code_only"
|
||||
// FieldFallbackGroupID holds the string denoting the fallback_group_id field in the database.
|
||||
FieldFallbackGroupID = "fallback_group_id"
|
||||
// FieldFallbackGroupIDOnInvalidRequest holds the string denoting the fallback_group_id_on_invalid_request field in the database.
|
||||
FieldFallbackGroupIDOnInvalidRequest = "fallback_group_id_on_invalid_request"
|
||||
// FieldModelRouting holds the string denoting the model_routing field in the database.
|
||||
FieldModelRouting = "model_routing"
|
||||
// FieldModelRoutingEnabled holds the string denoting the model_routing_enabled field in the database.
|
||||
FieldModelRoutingEnabled = "model_routing_enabled"
|
||||
// FieldMcpXMLInject holds the string denoting the mcp_xml_inject field in the database.
|
||||
FieldMcpXMLInject = "mcp_xml_inject"
|
||||
// FieldSupportedModelScopes holds the string denoting the supported_model_scopes field in the database.
|
||||
FieldSupportedModelScopes = "supported_model_scopes"
|
||||
// FieldSortOrder holds the string denoting the sort_order field in the database.
|
||||
FieldSortOrder = "sort_order"
|
||||
// FieldAllowMessagesDispatch holds the string denoting the allow_messages_dispatch field in the database.
|
||||
FieldAllowMessagesDispatch = "allow_messages_dispatch"
|
||||
// FieldAllowLive holds the string denoting the allow_live field in the database.
|
||||
FieldAllowLive = "allow_live"
|
||||
// FieldRequireOauthOnly holds the string denoting the require_oauth_only field in the database.
|
||||
FieldRequireOauthOnly = "require_oauth_only"
|
||||
// FieldRequirePrivacySet holds the string denoting the require_privacy_set field in the database.
|
||||
FieldRequirePrivacySet = "require_privacy_set"
|
||||
// FieldDefaultMappedModel holds the string denoting the default_mapped_model field in the database.
|
||||
FieldDefaultMappedModel = "default_mapped_model"
|
||||
// FieldMessagesDispatchModelConfig holds the string denoting the messages_dispatch_model_config field in the database.
|
||||
FieldMessagesDispatchModelConfig = "messages_dispatch_model_config"
|
||||
// FieldModelsListConfig holds the string denoting the models_list_config field in the database.
|
||||
FieldModelsListConfig = "models_list_config"
|
||||
// FieldRpmLimit holds the string denoting the rpm_limit field in the database.
|
||||
FieldRpmLimit = "rpm_limit"
|
||||
// FieldMaxReasoningEffort holds the string denoting the max_reasoning_effort field in the database.
|
||||
FieldMaxReasoningEffort = "max_reasoning_effort"
|
||||
// FieldReasoningEffortMappings holds the string denoting the reasoning_effort_mappings field in the database.
|
||||
FieldReasoningEffortMappings = "reasoning_effort_mappings"
|
||||
// FieldProfitControlEnabled holds the string denoting the profit_control_enabled field in the database.
|
||||
FieldProfitControlEnabled = "profit_control_enabled"
|
||||
// FieldProfitMinMargin holds the string denoting the profit_min_margin field in the database.
|
||||
FieldProfitMinMargin = "profit_min_margin"
|
||||
// FieldProfitSafetyBuffer holds the string denoting the profit_safety_buffer field in the database.
|
||||
FieldProfitSafetyBuffer = "profit_safety_buffer"
|
||||
// EdgeAPIKeys holds the string denoting the api_keys edge name in mutations.
|
||||
EdgeAPIKeys = "api_keys"
|
||||
// EdgeRedeemCodes holds the string denoting the redeem_codes edge name in mutations.
|
||||
EdgeRedeemCodes = "redeem_codes"
|
||||
// EdgeSubscriptions holds the string denoting the subscriptions edge name in mutations.
|
||||
EdgeSubscriptions = "subscriptions"
|
||||
// EdgeUsageLogs holds the string denoting the usage_logs edge name in mutations.
|
||||
EdgeUsageLogs = "usage_logs"
|
||||
// EdgeAccounts holds the string denoting the accounts edge name in mutations.
|
||||
EdgeAccounts = "accounts"
|
||||
// EdgeAllowedUsers holds the string denoting the allowed_users edge name in mutations.
|
||||
EdgeAllowedUsers = "allowed_users"
|
||||
// EdgeAccountGroups holds the string denoting the account_groups edge name in mutations.
|
||||
EdgeAccountGroups = "account_groups"
|
||||
// EdgeUserAllowedGroups holds the string denoting the user_allowed_groups edge name in mutations.
|
||||
EdgeUserAllowedGroups = "user_allowed_groups"
|
||||
// Table holds the table name of the group in the database.
|
||||
Table = "groups"
|
||||
// APIKeysTable is the table that holds the api_keys relation/edge.
|
||||
APIKeysTable = "api_keys"
|
||||
// APIKeysInverseTable is the table name for the APIKey entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "apikey" package.
|
||||
APIKeysInverseTable = "api_keys"
|
||||
// APIKeysColumn is the table column denoting the api_keys relation/edge.
|
||||
APIKeysColumn = "group_id"
|
||||
// RedeemCodesTable is the table that holds the redeem_codes relation/edge.
|
||||
RedeemCodesTable = "redeem_codes"
|
||||
// RedeemCodesInverseTable is the table name for the RedeemCode entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "redeemcode" package.
|
||||
RedeemCodesInverseTable = "redeem_codes"
|
||||
// RedeemCodesColumn is the table column denoting the redeem_codes relation/edge.
|
||||
RedeemCodesColumn = "group_id"
|
||||
// SubscriptionsTable is the table that holds the subscriptions relation/edge.
|
||||
SubscriptionsTable = "user_subscriptions"
|
||||
// SubscriptionsInverseTable is the table name for the UserSubscription entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "usersubscription" package.
|
||||
SubscriptionsInverseTable = "user_subscriptions"
|
||||
// SubscriptionsColumn is the table column denoting the subscriptions relation/edge.
|
||||
SubscriptionsColumn = "group_id"
|
||||
// UsageLogsTable is the table that holds the usage_logs relation/edge.
|
||||
UsageLogsTable = "usage_logs"
|
||||
// UsageLogsInverseTable is the table name for the UsageLog entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "usagelog" package.
|
||||
UsageLogsInverseTable = "usage_logs"
|
||||
// UsageLogsColumn is the table column denoting the usage_logs relation/edge.
|
||||
UsageLogsColumn = "group_id"
|
||||
// AccountsTable is the table that holds the accounts relation/edge. The primary key declared below.
|
||||
AccountsTable = "account_groups"
|
||||
// AccountsInverseTable is the table name for the Account entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "account" package.
|
||||
AccountsInverseTable = "accounts"
|
||||
// AllowedUsersTable is the table that holds the allowed_users relation/edge. The primary key declared below.
|
||||
AllowedUsersTable = "user_allowed_groups"
|
||||
// AllowedUsersInverseTable is the table name for the User entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "user" package.
|
||||
AllowedUsersInverseTable = "users"
|
||||
// AccountGroupsTable is the table that holds the account_groups relation/edge.
|
||||
AccountGroupsTable = "account_groups"
|
||||
// AccountGroupsInverseTable is the table name for the AccountGroup entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "accountgroup" package.
|
||||
AccountGroupsInverseTable = "account_groups"
|
||||
// AccountGroupsColumn is the table column denoting the account_groups relation/edge.
|
||||
AccountGroupsColumn = "group_id"
|
||||
// UserAllowedGroupsTable is the table that holds the user_allowed_groups relation/edge.
|
||||
UserAllowedGroupsTable = "user_allowed_groups"
|
||||
// UserAllowedGroupsInverseTable is the table name for the UserAllowedGroup entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "userallowedgroup" package.
|
||||
UserAllowedGroupsInverseTable = "user_allowed_groups"
|
||||
// UserAllowedGroupsColumn is the table column denoting the user_allowed_groups relation/edge.
|
||||
UserAllowedGroupsColumn = "group_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for group fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
FieldName,
|
||||
FieldDescription,
|
||||
FieldRateMultiplier,
|
||||
FieldPeakRateEnabled,
|
||||
FieldPeakStart,
|
||||
FieldPeakEnd,
|
||||
FieldPeakRateMultiplier,
|
||||
FieldIsExclusive,
|
||||
FieldStatus,
|
||||
FieldDuplicateOperationID,
|
||||
FieldPlatform,
|
||||
FieldSubscriptionType,
|
||||
FieldDailyLimitUsd,
|
||||
FieldWeeklyLimitUsd,
|
||||
FieldMonthlyLimitUsd,
|
||||
FieldDefaultValidityDays,
|
||||
FieldAllowImageGeneration,
|
||||
FieldAllowBatchImageGeneration,
|
||||
FieldImageRateIndependent,
|
||||
FieldImageRateMultiplier,
|
||||
FieldImagePrice1k,
|
||||
FieldImagePrice2k,
|
||||
FieldImagePrice4k,
|
||||
FieldBatchImageDiscountMultiplier,
|
||||
FieldBatchImageHoldMultiplier,
|
||||
FieldVideoRateIndependent,
|
||||
FieldVideoRateMultiplier,
|
||||
FieldVideoPrice480p,
|
||||
FieldVideoPrice720p,
|
||||
FieldVideoPrice1080p,
|
||||
FieldVideoModelPrices,
|
||||
FieldWebSearchPricePerCall,
|
||||
FieldSearchPricePer1k,
|
||||
FieldAudioRealtimePricePerMin,
|
||||
FieldAudioTtsPricePerMillionChars,
|
||||
FieldAudioSttPricePerHour,
|
||||
FieldLongContextPricingEnabled,
|
||||
FieldModelPricing,
|
||||
FieldClaudeCodeOnly,
|
||||
FieldFallbackGroupID,
|
||||
FieldFallbackGroupIDOnInvalidRequest,
|
||||
FieldModelRouting,
|
||||
FieldModelRoutingEnabled,
|
||||
FieldMcpXMLInject,
|
||||
FieldSupportedModelScopes,
|
||||
FieldSortOrder,
|
||||
FieldAllowMessagesDispatch,
|
||||
FieldAllowLive,
|
||||
FieldRequireOauthOnly,
|
||||
FieldRequirePrivacySet,
|
||||
FieldDefaultMappedModel,
|
||||
FieldMessagesDispatchModelConfig,
|
||||
FieldModelsListConfig,
|
||||
FieldRpmLimit,
|
||||
FieldMaxReasoningEffort,
|
||||
FieldReasoningEffortMappings,
|
||||
FieldProfitControlEnabled,
|
||||
FieldProfitMinMargin,
|
||||
FieldProfitSafetyBuffer,
|
||||
}
|
||||
|
||||
var (
|
||||
// AccountsPrimaryKey and AccountsColumn2 are the table columns denoting the
|
||||
// primary key for the accounts relation (M2M).
|
||||
AccountsPrimaryKey = []string{"account_id", "group_id"}
|
||||
// AllowedUsersPrimaryKey and AllowedUsersColumn2 are the table columns denoting the
|
||||
// primary key for the allowed_users relation (M2M).
|
||||
AllowedUsersPrimaryKey = []string{"user_id", "group_id"}
|
||||
)
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// Note that the variables below are initialized by the runtime
|
||||
// package on the initialization of the application. Therefore,
|
||||
// it should be imported in the main as follows:
|
||||
//
|
||||
// import _ "github.com/Wei-Shaw/sub2api/ent/runtime"
|
||||
var (
|
||||
Hooks [1]ent.Hook
|
||||
Interceptors [1]ent.Interceptor
|
||||
// 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
|
||||
// NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
NameValidator func(string) error
|
||||
// DefaultRateMultiplier holds the default value on creation for the "rate_multiplier" field.
|
||||
DefaultRateMultiplier float64
|
||||
// DefaultPeakRateEnabled holds the default value on creation for the "peak_rate_enabled" field.
|
||||
DefaultPeakRateEnabled bool
|
||||
// DefaultPeakStart holds the default value on creation for the "peak_start" field.
|
||||
DefaultPeakStart string
|
||||
// PeakStartValidator is a validator for the "peak_start" field. It is called by the builders before save.
|
||||
PeakStartValidator func(string) error
|
||||
// DefaultPeakEnd holds the default value on creation for the "peak_end" field.
|
||||
DefaultPeakEnd string
|
||||
// PeakEndValidator is a validator for the "peak_end" field. It is called by the builders before save.
|
||||
PeakEndValidator func(string) error
|
||||
// DefaultPeakRateMultiplier holds the default value on creation for the "peak_rate_multiplier" field.
|
||||
DefaultPeakRateMultiplier float64
|
||||
// DefaultIsExclusive holds the default value on creation for the "is_exclusive" field.
|
||||
DefaultIsExclusive bool
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
StatusValidator func(string) error
|
||||
// DuplicateOperationIDValidator is a validator for the "duplicate_operation_id" field. It is called by the builders before save.
|
||||
DuplicateOperationIDValidator func(string) error
|
||||
// DefaultPlatform holds the default value on creation for the "platform" field.
|
||||
DefaultPlatform string
|
||||
// PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
|
||||
PlatformValidator func(string) error
|
||||
// DefaultSubscriptionType holds the default value on creation for the "subscription_type" field.
|
||||
DefaultSubscriptionType string
|
||||
// SubscriptionTypeValidator is a validator for the "subscription_type" field. It is called by the builders before save.
|
||||
SubscriptionTypeValidator func(string) error
|
||||
// DefaultDefaultValidityDays holds the default value on creation for the "default_validity_days" field.
|
||||
DefaultDefaultValidityDays int
|
||||
// DefaultAllowImageGeneration holds the default value on creation for the "allow_image_generation" field.
|
||||
DefaultAllowImageGeneration bool
|
||||
// DefaultAllowBatchImageGeneration holds the default value on creation for the "allow_batch_image_generation" field.
|
||||
DefaultAllowBatchImageGeneration bool
|
||||
// DefaultImageRateIndependent holds the default value on creation for the "image_rate_independent" field.
|
||||
DefaultImageRateIndependent bool
|
||||
// DefaultImageRateMultiplier holds the default value on creation for the "image_rate_multiplier" field.
|
||||
DefaultImageRateMultiplier float64
|
||||
// DefaultBatchImageDiscountMultiplier holds the default value on creation for the "batch_image_discount_multiplier" field.
|
||||
DefaultBatchImageDiscountMultiplier float64
|
||||
// DefaultBatchImageHoldMultiplier holds the default value on creation for the "batch_image_hold_multiplier" field.
|
||||
DefaultBatchImageHoldMultiplier float64
|
||||
// DefaultVideoRateIndependent holds the default value on creation for the "video_rate_independent" field.
|
||||
DefaultVideoRateIndependent bool
|
||||
// DefaultVideoRateMultiplier holds the default value on creation for the "video_rate_multiplier" field.
|
||||
DefaultVideoRateMultiplier float64
|
||||
// SearchPricePer1kValidator is a validator for the "search_price_per_1k" field. It is called by the builders before save.
|
||||
SearchPricePer1kValidator func(float64) error
|
||||
// AudioRealtimePricePerMinValidator is a validator for the "audio_realtime_price_per_min" field. It is called by the builders before save.
|
||||
AudioRealtimePricePerMinValidator func(float64) error
|
||||
// AudioTtsPricePerMillionCharsValidator is a validator for the "audio_tts_price_per_million_chars" field. It is called by the builders before save.
|
||||
AudioTtsPricePerMillionCharsValidator func(float64) error
|
||||
// AudioSttPricePerHourValidator is a validator for the "audio_stt_price_per_hour" field. It is called by the builders before save.
|
||||
AudioSttPricePerHourValidator func(float64) error
|
||||
// DefaultLongContextPricingEnabled holds the default value on creation for the "long_context_pricing_enabled" field.
|
||||
DefaultLongContextPricingEnabled bool
|
||||
// DefaultClaudeCodeOnly holds the default value on creation for the "claude_code_only" field.
|
||||
DefaultClaudeCodeOnly bool
|
||||
// DefaultModelRoutingEnabled holds the default value on creation for the "model_routing_enabled" field.
|
||||
DefaultModelRoutingEnabled bool
|
||||
// DefaultMcpXMLInject holds the default value on creation for the "mcp_xml_inject" field.
|
||||
DefaultMcpXMLInject bool
|
||||
// DefaultSupportedModelScopes holds the default value on creation for the "supported_model_scopes" field.
|
||||
DefaultSupportedModelScopes []string
|
||||
// DefaultSortOrder holds the default value on creation for the "sort_order" field.
|
||||
DefaultSortOrder int
|
||||
// DefaultAllowMessagesDispatch holds the default value on creation for the "allow_messages_dispatch" field.
|
||||
DefaultAllowMessagesDispatch bool
|
||||
// DefaultAllowLive holds the default value on creation for the "allow_live" field.
|
||||
DefaultAllowLive bool
|
||||
// DefaultRequireOauthOnly holds the default value on creation for the "require_oauth_only" field.
|
||||
DefaultRequireOauthOnly bool
|
||||
// DefaultRequirePrivacySet holds the default value on creation for the "require_privacy_set" field.
|
||||
DefaultRequirePrivacySet bool
|
||||
// DefaultDefaultMappedModel holds the default value on creation for the "default_mapped_model" field.
|
||||
DefaultDefaultMappedModel string
|
||||
// DefaultMappedModelValidator is a validator for the "default_mapped_model" field. It is called by the builders before save.
|
||||
DefaultMappedModelValidator func(string) error
|
||||
// DefaultMessagesDispatchModelConfig holds the default value on creation for the "messages_dispatch_model_config" field.
|
||||
DefaultMessagesDispatchModelConfig domain.OpenAIMessagesDispatchModelConfig
|
||||
// DefaultModelsListConfig holds the default value on creation for the "models_list_config" field.
|
||||
DefaultModelsListConfig domain.GroupModelsListConfig
|
||||
// DefaultRpmLimit holds the default value on creation for the "rpm_limit" field.
|
||||
DefaultRpmLimit int
|
||||
// DefaultMaxReasoningEffort holds the default value on creation for the "max_reasoning_effort" field.
|
||||
DefaultMaxReasoningEffort string
|
||||
// MaxReasoningEffortValidator is a validator for the "max_reasoning_effort" field. It is called by the builders before save.
|
||||
MaxReasoningEffortValidator func(string) error
|
||||
// DefaultReasoningEffortMappings holds the default value on creation for the "reasoning_effort_mappings" field.
|
||||
DefaultReasoningEffortMappings []domain.ReasoningEffortMapping
|
||||
// DefaultProfitControlEnabled holds the default value on creation for the "profit_control_enabled" field.
|
||||
DefaultProfitControlEnabled bool
|
||||
// DefaultProfitMinMargin holds the default value on creation for the "profit_min_margin" field.
|
||||
DefaultProfitMinMargin float64
|
||||
// DefaultProfitSafetyBuffer holds the default value on creation for the "profit_safety_buffer" field.
|
||||
DefaultProfitSafetyBuffer float64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Group 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()
|
||||
}
|
||||
|
||||
// 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()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDescription orders the results by the description field.
|
||||
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDescription, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRateMultiplier orders the results by the rate_multiplier field.
|
||||
func ByRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRateMultiplier, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPeakRateEnabled orders the results by the peak_rate_enabled field.
|
||||
func ByPeakRateEnabled(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPeakRateEnabled, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPeakStart orders the results by the peak_start field.
|
||||
func ByPeakStart(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPeakStart, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPeakEnd orders the results by the peak_end field.
|
||||
func ByPeakEnd(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPeakEnd, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPeakRateMultiplier orders the results by the peak_rate_multiplier field.
|
||||
func ByPeakRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPeakRateMultiplier, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsExclusive orders the results by the is_exclusive field.
|
||||
func ByIsExclusive(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsExclusive, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDuplicateOperationID orders the results by the duplicate_operation_id field.
|
||||
func ByDuplicateOperationID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDuplicateOperationID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPlatform orders the results by the platform field.
|
||||
func ByPlatform(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPlatform, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySubscriptionType orders the results by the subscription_type field.
|
||||
func BySubscriptionType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSubscriptionType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDailyLimitUsd orders the results by the daily_limit_usd field.
|
||||
func ByDailyLimitUsd(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDailyLimitUsd, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWeeklyLimitUsd orders the results by the weekly_limit_usd field.
|
||||
func ByWeeklyLimitUsd(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWeeklyLimitUsd, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMonthlyLimitUsd orders the results by the monthly_limit_usd field.
|
||||
func ByMonthlyLimitUsd(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMonthlyLimitUsd, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDefaultValidityDays orders the results by the default_validity_days field.
|
||||
func ByDefaultValidityDays(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDefaultValidityDays, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAllowImageGeneration orders the results by the allow_image_generation field.
|
||||
func ByAllowImageGeneration(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAllowImageGeneration, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAllowBatchImageGeneration orders the results by the allow_batch_image_generation field.
|
||||
func ByAllowBatchImageGeneration(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAllowBatchImageGeneration, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByImageRateIndependent orders the results by the image_rate_independent field.
|
||||
func ByImageRateIndependent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldImageRateIndependent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByImageRateMultiplier orders the results by the image_rate_multiplier field.
|
||||
func ByImageRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldImageRateMultiplier, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByImagePrice1k orders the results by the image_price_1k field.
|
||||
func ByImagePrice1k(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldImagePrice1k, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByImagePrice2k orders the results by the image_price_2k field.
|
||||
func ByImagePrice2k(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldImagePrice2k, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByImagePrice4k orders the results by the image_price_4k field.
|
||||
func ByImagePrice4k(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldImagePrice4k, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBatchImageDiscountMultiplier orders the results by the batch_image_discount_multiplier field.
|
||||
func ByBatchImageDiscountMultiplier(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBatchImageDiscountMultiplier, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBatchImageHoldMultiplier orders the results by the batch_image_hold_multiplier field.
|
||||
func ByBatchImageHoldMultiplier(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBatchImageHoldMultiplier, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVideoRateIndependent orders the results by the video_rate_independent field.
|
||||
func ByVideoRateIndependent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVideoRateIndependent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVideoRateMultiplier orders the results by the video_rate_multiplier field.
|
||||
func ByVideoRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVideoRateMultiplier, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVideoPrice480p orders the results by the video_price_480p field.
|
||||
func ByVideoPrice480p(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVideoPrice480p, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVideoPrice720p orders the results by the video_price_720p field.
|
||||
func ByVideoPrice720p(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVideoPrice720p, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVideoPrice1080p orders the results by the video_price_1080p field.
|
||||
func ByVideoPrice1080p(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVideoPrice1080p, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWebSearchPricePerCall orders the results by the web_search_price_per_call field.
|
||||
func ByWebSearchPricePerCall(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWebSearchPricePerCall, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySearchPricePer1k orders the results by the search_price_per_1k field.
|
||||
func BySearchPricePer1k(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSearchPricePer1k, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAudioRealtimePricePerMin orders the results by the audio_realtime_price_per_min field.
|
||||
func ByAudioRealtimePricePerMin(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAudioRealtimePricePerMin, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAudioTtsPricePerMillionChars orders the results by the audio_tts_price_per_million_chars field.
|
||||
func ByAudioTtsPricePerMillionChars(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAudioTtsPricePerMillionChars, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAudioSttPricePerHour orders the results by the audio_stt_price_per_hour field.
|
||||
func ByAudioSttPricePerHour(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAudioSttPricePerHour, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLongContextPricingEnabled orders the results by the long_context_pricing_enabled field.
|
||||
func ByLongContextPricingEnabled(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLongContextPricingEnabled, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByClaudeCodeOnly orders the results by the claude_code_only field.
|
||||
func ByClaudeCodeOnly(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldClaudeCodeOnly, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFallbackGroupID orders the results by the fallback_group_id field.
|
||||
func ByFallbackGroupID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFallbackGroupID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFallbackGroupIDOnInvalidRequest orders the results by the fallback_group_id_on_invalid_request field.
|
||||
func ByFallbackGroupIDOnInvalidRequest(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFallbackGroupIDOnInvalidRequest, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelRoutingEnabled orders the results by the model_routing_enabled field.
|
||||
func ByModelRoutingEnabled(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelRoutingEnabled, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMcpXMLInject orders the results by the mcp_xml_inject field.
|
||||
func ByMcpXMLInject(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMcpXMLInject, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySortOrder orders the results by the sort_order field.
|
||||
func BySortOrder(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSortOrder, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAllowMessagesDispatch orders the results by the allow_messages_dispatch field.
|
||||
func ByAllowMessagesDispatch(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAllowMessagesDispatch, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAllowLive orders the results by the allow_live field.
|
||||
func ByAllowLive(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAllowLive, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRequireOauthOnly orders the results by the require_oauth_only field.
|
||||
func ByRequireOauthOnly(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRequireOauthOnly, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRequirePrivacySet orders the results by the require_privacy_set field.
|
||||
func ByRequirePrivacySet(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRequirePrivacySet, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDefaultMappedModel orders the results by the default_mapped_model field.
|
||||
func ByDefaultMappedModel(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDefaultMappedModel, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRpmLimit orders the results by the rpm_limit field.
|
||||
func ByRpmLimit(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRpmLimit, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaxReasoningEffort orders the results by the max_reasoning_effort field.
|
||||
func ByMaxReasoningEffort(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaxReasoningEffort, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProfitControlEnabled orders the results by the profit_control_enabled field.
|
||||
func ByProfitControlEnabled(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProfitControlEnabled, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProfitMinMargin orders the results by the profit_min_margin field.
|
||||
func ByProfitMinMargin(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProfitMinMargin, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProfitSafetyBuffer orders the results by the profit_safety_buffer field.
|
||||
func ByProfitSafetyBuffer(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProfitSafetyBuffer, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAPIKeysCount orders the results by api_keys count.
|
||||
func ByAPIKeysCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newAPIKeysStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAPIKeys orders the results by api_keys terms.
|
||||
func ByAPIKeys(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newAPIKeysStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByRedeemCodesCount orders the results by redeem_codes count.
|
||||
func ByRedeemCodesCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newRedeemCodesStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByRedeemCodes orders the results by redeem_codes terms.
|
||||
func ByRedeemCodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newRedeemCodesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// BySubscriptionsCount orders the results by subscriptions count.
|
||||
func BySubscriptionsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newSubscriptionsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// BySubscriptions orders the results by subscriptions terms.
|
||||
func BySubscriptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newSubscriptionsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByUsageLogsCount orders the results by usage_logs count.
|
||||
func ByUsageLogsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newUsageLogsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByUsageLogs orders the results by usage_logs terms.
|
||||
func ByUsageLogs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newUsageLogsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAccountsCount orders the results by accounts count.
|
||||
func ByAccountsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newAccountsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAccounts orders the results by accounts terms.
|
||||
func ByAccounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newAccountsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAllowedUsersCount orders the results by allowed_users count.
|
||||
func ByAllowedUsersCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newAllowedUsersStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAllowedUsers orders the results by allowed_users terms.
|
||||
func ByAllowedUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newAllowedUsersStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAccountGroupsCount orders the results by account_groups count.
|
||||
func ByAccountGroupsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newAccountGroupsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAccountGroups orders the results by account_groups terms.
|
||||
func ByAccountGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newAccountGroupsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByUserAllowedGroupsCount orders the results by user_allowed_groups count.
|
||||
func ByUserAllowedGroupsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newUserAllowedGroupsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByUserAllowedGroups orders the results by user_allowed_groups terms.
|
||||
func ByUserAllowedGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newUserAllowedGroupsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newAPIKeysStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(APIKeysInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, APIKeysTable, APIKeysColumn),
|
||||
)
|
||||
}
|
||||
func newRedeemCodesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(RedeemCodesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, RedeemCodesTable, RedeemCodesColumn),
|
||||
)
|
||||
}
|
||||
func newSubscriptionsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(SubscriptionsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, SubscriptionsTable, SubscriptionsColumn),
|
||||
)
|
||||
}
|
||||
func newUsageLogsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UsageLogsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, UsageLogsTable, UsageLogsColumn),
|
||||
)
|
||||
}
|
||||
func newAccountsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(AccountsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, AccountsTable, AccountsPrimaryKey...),
|
||||
)
|
||||
}
|
||||
func newAllowedUsersStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(AllowedUsersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, AllowedUsersTable, AllowedUsersPrimaryKey...),
|
||||
)
|
||||
}
|
||||
func newAccountGroupsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(AccountGroupsInverseTable, AccountGroupsColumn),
|
||||
sqlgraph.Edge(sqlgraph.O2M, true, AccountGroupsTable, AccountGroupsColumn),
|
||||
)
|
||||
}
|
||||
func newUserAllowedGroupsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UserAllowedGroupsInverseTable, UserAllowedGroupsColumn),
|
||||
sqlgraph.Edge(sqlgraph.O2M, true, UserAllowedGroupsTable, UserAllowedGroupsColumn),
|
||||
)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user