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,420 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package batchimagejob
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the batchimagejob type in the database.
|
||||
Label = "batch_image_job"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldBatchID holds the string denoting the batch_id field in the database.
|
||||
FieldBatchID = "batch_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"
|
||||
// FieldProvider holds the string denoting the provider field in the database.
|
||||
FieldProvider = "provider"
|
||||
// FieldModel holds the string denoting the model field in the database.
|
||||
FieldModel = "model"
|
||||
// FieldTaskName holds the string denoting the task_name field in the database.
|
||||
FieldTaskName = "task_name"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldProviderJobName holds the string denoting the provider_job_name field in the database.
|
||||
FieldProviderJobName = "provider_job_name"
|
||||
// FieldProviderInputRef holds the string denoting the provider_input_ref field in the database.
|
||||
FieldProviderInputRef = "provider_input_ref"
|
||||
// FieldProviderOutputRef holds the string denoting the provider_output_ref field in the database.
|
||||
FieldProviderOutputRef = "provider_output_ref"
|
||||
// FieldGcsInputURI holds the string denoting the gcs_input_uri field in the database.
|
||||
FieldGcsInputURI = "gcs_input_uri"
|
||||
// FieldGcsOutputURI holds the string denoting the gcs_output_uri field in the database.
|
||||
FieldGcsOutputURI = "gcs_output_uri"
|
||||
// FieldItemCount holds the string denoting the item_count field in the database.
|
||||
FieldItemCount = "item_count"
|
||||
// FieldSuccessCount holds the string denoting the success_count field in the database.
|
||||
FieldSuccessCount = "success_count"
|
||||
// FieldFailCount holds the string denoting the fail_count field in the database.
|
||||
FieldFailCount = "fail_count"
|
||||
// FieldCancelledCount holds the string denoting the cancelled_count field in the database.
|
||||
FieldCancelledCount = "cancelled_count"
|
||||
// FieldEstimatedCost holds the string denoting the estimated_cost field in the database.
|
||||
FieldEstimatedCost = "estimated_cost"
|
||||
// FieldHoldAmount holds the string denoting the hold_amount field in the database.
|
||||
FieldHoldAmount = "hold_amount"
|
||||
// FieldActualCost holds the string denoting the actual_cost field in the database.
|
||||
FieldActualCost = "actual_cost"
|
||||
// FieldCurrency holds the string denoting the currency field in the database.
|
||||
FieldCurrency = "currency"
|
||||
// FieldHoldID holds the string denoting the hold_id field in the database.
|
||||
FieldHoldID = "hold_id"
|
||||
// FieldIdempotencyKey holds the string denoting the idempotency_key field in the database.
|
||||
FieldIdempotencyKey = "idempotency_key"
|
||||
// FieldRequestHash holds the string denoting the request_hash field in the database.
|
||||
FieldRequestHash = "request_hash"
|
||||
// FieldManifestHash holds the string denoting the manifest_hash field in the database.
|
||||
FieldManifestHash = "manifest_hash"
|
||||
// FieldRetryCount holds the string denoting the retry_count field in the database.
|
||||
FieldRetryCount = "retry_count"
|
||||
// FieldVersion holds the string denoting the version field in the database.
|
||||
FieldVersion = "version"
|
||||
// FieldOutputExpiresAt holds the string denoting the output_expires_at field in the database.
|
||||
FieldOutputExpiresAt = "output_expires_at"
|
||||
// FieldInputDeletedAt holds the string denoting the input_deleted_at field in the database.
|
||||
FieldInputDeletedAt = "input_deleted_at"
|
||||
// FieldOutputDeletedAt holds the string denoting the output_deleted_at field in the database.
|
||||
FieldOutputDeletedAt = "output_deleted_at"
|
||||
// FieldDownloadedAt holds the string denoting the downloaded_at field in the database.
|
||||
FieldDownloadedAt = "downloaded_at"
|
||||
// FieldUserDeletedAt holds the string denoting the user_deleted_at field in the database.
|
||||
FieldUserDeletedAt = "user_deleted_at"
|
||||
// FieldLastErrorCode holds the string denoting the last_error_code field in the database.
|
||||
FieldLastErrorCode = "last_error_code"
|
||||
// FieldLastErrorMessage holds the string denoting the last_error_message field in the database.
|
||||
FieldLastErrorMessage = "last_error_message"
|
||||
// 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"
|
||||
// FieldSubmittedAt holds the string denoting the submitted_at field in the database.
|
||||
FieldSubmittedAt = "submitted_at"
|
||||
// FieldStartedAt holds the string denoting the started_at field in the database.
|
||||
FieldStartedAt = "started_at"
|
||||
// FieldFinishedAt holds the string denoting the finished_at field in the database.
|
||||
FieldFinishedAt = "finished_at"
|
||||
// FieldSettledAt holds the string denoting the settled_at field in the database.
|
||||
FieldSettledAt = "settled_at"
|
||||
// Table holds the table name of the batchimagejob in the database.
|
||||
Table = "batch_image_jobs"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for batchimagejob fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldBatchID,
|
||||
FieldUserID,
|
||||
FieldAPIKeyID,
|
||||
FieldAccountID,
|
||||
FieldProvider,
|
||||
FieldModel,
|
||||
FieldTaskName,
|
||||
FieldStatus,
|
||||
FieldProviderJobName,
|
||||
FieldProviderInputRef,
|
||||
FieldProviderOutputRef,
|
||||
FieldGcsInputURI,
|
||||
FieldGcsOutputURI,
|
||||
FieldItemCount,
|
||||
FieldSuccessCount,
|
||||
FieldFailCount,
|
||||
FieldCancelledCount,
|
||||
FieldEstimatedCost,
|
||||
FieldHoldAmount,
|
||||
FieldActualCost,
|
||||
FieldCurrency,
|
||||
FieldHoldID,
|
||||
FieldIdempotencyKey,
|
||||
FieldRequestHash,
|
||||
FieldManifestHash,
|
||||
FieldRetryCount,
|
||||
FieldVersion,
|
||||
FieldOutputExpiresAt,
|
||||
FieldInputDeletedAt,
|
||||
FieldOutputDeletedAt,
|
||||
FieldDownloadedAt,
|
||||
FieldUserDeletedAt,
|
||||
FieldLastErrorCode,
|
||||
FieldLastErrorMessage,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldSubmittedAt,
|
||||
FieldStartedAt,
|
||||
FieldFinishedAt,
|
||||
FieldSettledAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// BatchIDValidator is a validator for the "batch_id" field. It is called by the builders before save.
|
||||
BatchIDValidator func(string) error
|
||||
// ProviderValidator is a validator for the "provider" field. It is called by the builders before save.
|
||||
ProviderValidator func(string) error
|
||||
// ModelValidator is a validator for the "model" field. It is called by the builders before save.
|
||||
ModelValidator func(string) error
|
||||
// DefaultTaskName holds the default value on creation for the "task_name" field.
|
||||
DefaultTaskName string
|
||||
// TaskNameValidator is a validator for the "task_name" field. It is called by the builders before save.
|
||||
TaskNameValidator func(string) error
|
||||
// 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
|
||||
// ProviderJobNameValidator is a validator for the "provider_job_name" field. It is called by the builders before save.
|
||||
ProviderJobNameValidator func(string) error
|
||||
// ProviderInputRefValidator is a validator for the "provider_input_ref" field. It is called by the builders before save.
|
||||
ProviderInputRefValidator func(string) error
|
||||
// ProviderOutputRefValidator is a validator for the "provider_output_ref" field. It is called by the builders before save.
|
||||
ProviderOutputRefValidator func(string) error
|
||||
// GcsInputURIValidator is a validator for the "gcs_input_uri" field. It is called by the builders before save.
|
||||
GcsInputURIValidator func(string) error
|
||||
// GcsOutputURIValidator is a validator for the "gcs_output_uri" field. It is called by the builders before save.
|
||||
GcsOutputURIValidator func(string) error
|
||||
// DefaultSuccessCount holds the default value on creation for the "success_count" field.
|
||||
DefaultSuccessCount int
|
||||
// DefaultFailCount holds the default value on creation for the "fail_count" field.
|
||||
DefaultFailCount int
|
||||
// DefaultCancelledCount holds the default value on creation for the "cancelled_count" field.
|
||||
DefaultCancelledCount int
|
||||
// DefaultEstimatedCost holds the default value on creation for the "estimated_cost" field.
|
||||
DefaultEstimatedCost float64
|
||||
// DefaultCurrency holds the default value on creation for the "currency" field.
|
||||
DefaultCurrency string
|
||||
// CurrencyValidator is a validator for the "currency" field. It is called by the builders before save.
|
||||
CurrencyValidator func(string) error
|
||||
// HoldIDValidator is a validator for the "hold_id" field. It is called by the builders before save.
|
||||
HoldIDValidator func(string) error
|
||||
// IdempotencyKeyValidator is a validator for the "idempotency_key" field. It is called by the builders before save.
|
||||
IdempotencyKeyValidator func(string) error
|
||||
// RequestHashValidator is a validator for the "request_hash" field. It is called by the builders before save.
|
||||
RequestHashValidator func(string) error
|
||||
// ManifestHashValidator is a validator for the "manifest_hash" field. It is called by the builders before save.
|
||||
ManifestHashValidator func(string) error
|
||||
// DefaultRetryCount holds the default value on creation for the "retry_count" field.
|
||||
DefaultRetryCount int
|
||||
// DefaultVersion holds the default value on creation for the "version" field.
|
||||
DefaultVersion int
|
||||
// LastErrorCodeValidator is a validator for the "last_error_code" field. It is called by the builders before save.
|
||||
LastErrorCodeValidator 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
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the BatchImageJob 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()
|
||||
}
|
||||
|
||||
// ByBatchID orders the results by the batch_id field.
|
||||
func ByBatchID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBatchID, 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()
|
||||
}
|
||||
|
||||
// ByProvider orders the results by the provider field.
|
||||
func ByProvider(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProvider, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModel orders the results by the model field.
|
||||
func ByModel(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModel, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTaskName orders the results by the task_name field.
|
||||
func ByTaskName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTaskName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProviderJobName orders the results by the provider_job_name field.
|
||||
func ByProviderJobName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProviderJobName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProviderInputRef orders the results by the provider_input_ref field.
|
||||
func ByProviderInputRef(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProviderInputRef, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProviderOutputRef orders the results by the provider_output_ref field.
|
||||
func ByProviderOutputRef(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProviderOutputRef, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGcsInputURI orders the results by the gcs_input_uri field.
|
||||
func ByGcsInputURI(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGcsInputURI, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGcsOutputURI orders the results by the gcs_output_uri field.
|
||||
func ByGcsOutputURI(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGcsOutputURI, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByItemCount orders the results by the item_count field.
|
||||
func ByItemCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldItemCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySuccessCount orders the results by the success_count field.
|
||||
func BySuccessCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSuccessCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFailCount orders the results by the fail_count field.
|
||||
func ByFailCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFailCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCancelledCount orders the results by the cancelled_count field.
|
||||
func ByCancelledCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCancelledCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEstimatedCost orders the results by the estimated_cost field.
|
||||
func ByEstimatedCost(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEstimatedCost, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHoldAmount orders the results by the hold_amount field.
|
||||
func ByHoldAmount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHoldAmount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByActualCost orders the results by the actual_cost field.
|
||||
func ByActualCost(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldActualCost, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCurrency orders the results by the currency field.
|
||||
func ByCurrency(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCurrency, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHoldID orders the results by the hold_id field.
|
||||
func ByHoldID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHoldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIdempotencyKey orders the results by the idempotency_key field.
|
||||
func ByIdempotencyKey(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIdempotencyKey, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRequestHash orders the results by the request_hash field.
|
||||
func ByRequestHash(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRequestHash, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByManifestHash orders the results by the manifest_hash field.
|
||||
func ByManifestHash(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManifestHash, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRetryCount orders the results by the retry_count field.
|
||||
func ByRetryCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRetryCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVersion orders the results by the version field.
|
||||
func ByVersion(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVersion, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOutputExpiresAt orders the results by the output_expires_at field.
|
||||
func ByOutputExpiresAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOutputExpiresAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByInputDeletedAt orders the results by the input_deleted_at field.
|
||||
func ByInputDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInputDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOutputDeletedAt orders the results by the output_deleted_at field.
|
||||
func ByOutputDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOutputDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDownloadedAt orders the results by the downloaded_at field.
|
||||
func ByDownloadedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDownloadedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUserDeletedAt orders the results by the user_deleted_at field.
|
||||
func ByUserDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUserDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLastErrorCode orders the results by the last_error_code field.
|
||||
func ByLastErrorCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLastErrorCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLastErrorMessage orders the results by the last_error_message field.
|
||||
func ByLastErrorMessage(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLastErrorMessage, 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()
|
||||
}
|
||||
|
||||
// BySubmittedAt orders the results by the submitted_at field.
|
||||
func BySubmittedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSubmittedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStartedAt orders the results by the started_at field.
|
||||
func ByStartedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStartedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFinishedAt orders the results by the finished_at field.
|
||||
func ByFinishedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFinishedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySettledAt orders the results by the settled_at field.
|
||||
func BySettledAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSettledAt, opts...).ToFunc()
|
||||
}
|
||||
Reference in New Issue
Block a user