Files
sub2api/backend/ent/soratask/where.go
yangjianbo 13262a5698 feat(sora): 新增 Sora 平台支持并修复高危安全和性能问题
新增功能:
- 新增 Sora 账号管理和 OAuth 认证
- 新增 Sora 视频/图片生成 API 网关
- 新增 Sora 任务调度和缓存机制
- 新增 Sora 使用统计和计费支持
- 前端增加 Sora 平台配置界面

安全修复(代码审核):
- [SEC-001] 限制媒体下载响应体大小(图片 20MB、视频 200MB),防止 DoS 攻击
- [SEC-002] 限制 SDK API 响应大小(1MB),防止内存耗尽
- [SEC-003] 修复 SSRF 风险,添加 URL 验证并强制使用代理配置

BUG 修复(代码审核):
- [BUG-001] 修复 for 循环内 defer 累积导致的资源泄漏
- [BUG-002] 修复图片并发槽位获取失败时已持有锁未释放的永久泄漏

性能优化(代码审核):
- [PERF-001] 添加 Sentinel Token 缓存(3 分钟有效期),减少 PoW 计算开销

技术细节:
- 使用 io.LimitReader 限制所有外部输入的大小
- 添加 urlvalidator 验证防止 SSRF 攻击
- 使用 sync.Map 实现线程安全的包级缓存
- 优化并发槽位管理,添加 releaseAll 模式防止泄漏

影响范围:
- 后端:新增 Sora 相关数据模型、服务、网关和管理接口
- 前端:新增 Sora 平台配置、账号管理和监控界面
- 配置:新增 Sora 相关配置项和环境变量

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-29 16:18:38 +08:00

746 lines
27 KiB
Go

// Code generated by ent, DO NOT EDIT.
package soratask
import (
"time"
"entgo.io/ent/dialect/sql"
"github.com/Wei-Shaw/sub2api/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldID, id))
}
// TaskID applies equality check predicate on the "task_id" field. It's identical to TaskIDEQ.
func TaskID(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldTaskID, v))
}
// AccountID applies equality check predicate on the "account_id" field. It's identical to AccountIDEQ.
func AccountID(v int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldAccountID, v))
}
// Model applies equality check predicate on the "model" field. It's identical to ModelEQ.
func Model(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldModel, v))
}
// Prompt applies equality check predicate on the "prompt" field. It's identical to PromptEQ.
func Prompt(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldPrompt, v))
}
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func Status(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldStatus, v))
}
// Progress applies equality check predicate on the "progress" field. It's identical to ProgressEQ.
func Progress(v float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldProgress, v))
}
// ResultUrls applies equality check predicate on the "result_urls" field. It's identical to ResultUrlsEQ.
func ResultUrls(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldResultUrls, v))
}
// ErrorMessage applies equality check predicate on the "error_message" field. It's identical to ErrorMessageEQ.
func ErrorMessage(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldErrorMessage, v))
}
// RetryCount applies equality check predicate on the "retry_count" field. It's identical to RetryCountEQ.
func RetryCount(v int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldRetryCount, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldCreatedAt, v))
}
// CompletedAt applies equality check predicate on the "completed_at" field. It's identical to CompletedAtEQ.
func CompletedAt(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldCompletedAt, v))
}
// TaskIDEQ applies the EQ predicate on the "task_id" field.
func TaskIDEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldTaskID, v))
}
// TaskIDNEQ applies the NEQ predicate on the "task_id" field.
func TaskIDNEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldTaskID, v))
}
// TaskIDIn applies the In predicate on the "task_id" field.
func TaskIDIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldTaskID, vs...))
}
// TaskIDNotIn applies the NotIn predicate on the "task_id" field.
func TaskIDNotIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldTaskID, vs...))
}
// TaskIDGT applies the GT predicate on the "task_id" field.
func TaskIDGT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldTaskID, v))
}
// TaskIDGTE applies the GTE predicate on the "task_id" field.
func TaskIDGTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldTaskID, v))
}
// TaskIDLT applies the LT predicate on the "task_id" field.
func TaskIDLT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldTaskID, v))
}
// TaskIDLTE applies the LTE predicate on the "task_id" field.
func TaskIDLTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldTaskID, v))
}
// TaskIDContains applies the Contains predicate on the "task_id" field.
func TaskIDContains(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContains(FieldTaskID, v))
}
// TaskIDHasPrefix applies the HasPrefix predicate on the "task_id" field.
func TaskIDHasPrefix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasPrefix(FieldTaskID, v))
}
// TaskIDHasSuffix applies the HasSuffix predicate on the "task_id" field.
func TaskIDHasSuffix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasSuffix(FieldTaskID, v))
}
// TaskIDEqualFold applies the EqualFold predicate on the "task_id" field.
func TaskIDEqualFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEqualFold(FieldTaskID, v))
}
// TaskIDContainsFold applies the ContainsFold predicate on the "task_id" field.
func TaskIDContainsFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContainsFold(FieldTaskID, v))
}
// AccountIDEQ applies the EQ predicate on the "account_id" field.
func AccountIDEQ(v int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldAccountID, v))
}
// AccountIDNEQ applies the NEQ predicate on the "account_id" field.
func AccountIDNEQ(v int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldAccountID, v))
}
// AccountIDIn applies the In predicate on the "account_id" field.
func AccountIDIn(vs ...int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldAccountID, vs...))
}
// AccountIDNotIn applies the NotIn predicate on the "account_id" field.
func AccountIDNotIn(vs ...int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldAccountID, vs...))
}
// AccountIDGT applies the GT predicate on the "account_id" field.
func AccountIDGT(v int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldAccountID, v))
}
// AccountIDGTE applies the GTE predicate on the "account_id" field.
func AccountIDGTE(v int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldAccountID, v))
}
// AccountIDLT applies the LT predicate on the "account_id" field.
func AccountIDLT(v int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldAccountID, v))
}
// AccountIDLTE applies the LTE predicate on the "account_id" field.
func AccountIDLTE(v int64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldAccountID, v))
}
// ModelEQ applies the EQ predicate on the "model" field.
func ModelEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldModel, v))
}
// ModelNEQ applies the NEQ predicate on the "model" field.
func ModelNEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldModel, v))
}
// ModelIn applies the In predicate on the "model" field.
func ModelIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldModel, vs...))
}
// ModelNotIn applies the NotIn predicate on the "model" field.
func ModelNotIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldModel, vs...))
}
// ModelGT applies the GT predicate on the "model" field.
func ModelGT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldModel, v))
}
// ModelGTE applies the GTE predicate on the "model" field.
func ModelGTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldModel, v))
}
// ModelLT applies the LT predicate on the "model" field.
func ModelLT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldModel, v))
}
// ModelLTE applies the LTE predicate on the "model" field.
func ModelLTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldModel, v))
}
// ModelContains applies the Contains predicate on the "model" field.
func ModelContains(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContains(FieldModel, v))
}
// ModelHasPrefix applies the HasPrefix predicate on the "model" field.
func ModelHasPrefix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasPrefix(FieldModel, v))
}
// ModelHasSuffix applies the HasSuffix predicate on the "model" field.
func ModelHasSuffix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasSuffix(FieldModel, v))
}
// ModelEqualFold applies the EqualFold predicate on the "model" field.
func ModelEqualFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEqualFold(FieldModel, v))
}
// ModelContainsFold applies the ContainsFold predicate on the "model" field.
func ModelContainsFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContainsFold(FieldModel, v))
}
// PromptEQ applies the EQ predicate on the "prompt" field.
func PromptEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldPrompt, v))
}
// PromptNEQ applies the NEQ predicate on the "prompt" field.
func PromptNEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldPrompt, v))
}
// PromptIn applies the In predicate on the "prompt" field.
func PromptIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldPrompt, vs...))
}
// PromptNotIn applies the NotIn predicate on the "prompt" field.
func PromptNotIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldPrompt, vs...))
}
// PromptGT applies the GT predicate on the "prompt" field.
func PromptGT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldPrompt, v))
}
// PromptGTE applies the GTE predicate on the "prompt" field.
func PromptGTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldPrompt, v))
}
// PromptLT applies the LT predicate on the "prompt" field.
func PromptLT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldPrompt, v))
}
// PromptLTE applies the LTE predicate on the "prompt" field.
func PromptLTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldPrompt, v))
}
// PromptContains applies the Contains predicate on the "prompt" field.
func PromptContains(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContains(FieldPrompt, v))
}
// PromptHasPrefix applies the HasPrefix predicate on the "prompt" field.
func PromptHasPrefix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasPrefix(FieldPrompt, v))
}
// PromptHasSuffix applies the HasSuffix predicate on the "prompt" field.
func PromptHasSuffix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasSuffix(FieldPrompt, v))
}
// PromptEqualFold applies the EqualFold predicate on the "prompt" field.
func PromptEqualFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEqualFold(FieldPrompt, v))
}
// PromptContainsFold applies the ContainsFold predicate on the "prompt" field.
func PromptContainsFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContainsFold(FieldPrompt, v))
}
// StatusEQ applies the EQ predicate on the "status" field.
func StatusEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldStatus, v))
}
// StatusNEQ applies the NEQ predicate on the "status" field.
func StatusNEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldStatus, v))
}
// StatusIn applies the In predicate on the "status" field.
func StatusIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldStatus, vs...))
}
// StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldStatus, vs...))
}
// StatusGT applies the GT predicate on the "status" field.
func StatusGT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldStatus, v))
}
// StatusGTE applies the GTE predicate on the "status" field.
func StatusGTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldStatus, v))
}
// StatusLT applies the LT predicate on the "status" field.
func StatusLT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldStatus, v))
}
// StatusLTE applies the LTE predicate on the "status" field.
func StatusLTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldStatus, v))
}
// StatusContains applies the Contains predicate on the "status" field.
func StatusContains(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContains(FieldStatus, v))
}
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
func StatusHasPrefix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasPrefix(FieldStatus, v))
}
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
func StatusHasSuffix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasSuffix(FieldStatus, v))
}
// StatusEqualFold applies the EqualFold predicate on the "status" field.
func StatusEqualFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEqualFold(FieldStatus, v))
}
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
func StatusContainsFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContainsFold(FieldStatus, v))
}
// ProgressEQ applies the EQ predicate on the "progress" field.
func ProgressEQ(v float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldProgress, v))
}
// ProgressNEQ applies the NEQ predicate on the "progress" field.
func ProgressNEQ(v float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldProgress, v))
}
// ProgressIn applies the In predicate on the "progress" field.
func ProgressIn(vs ...float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldProgress, vs...))
}
// ProgressNotIn applies the NotIn predicate on the "progress" field.
func ProgressNotIn(vs ...float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldProgress, vs...))
}
// ProgressGT applies the GT predicate on the "progress" field.
func ProgressGT(v float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldProgress, v))
}
// ProgressGTE applies the GTE predicate on the "progress" field.
func ProgressGTE(v float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldProgress, v))
}
// ProgressLT applies the LT predicate on the "progress" field.
func ProgressLT(v float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldProgress, v))
}
// ProgressLTE applies the LTE predicate on the "progress" field.
func ProgressLTE(v float64) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldProgress, v))
}
// ResultUrlsEQ applies the EQ predicate on the "result_urls" field.
func ResultUrlsEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldResultUrls, v))
}
// ResultUrlsNEQ applies the NEQ predicate on the "result_urls" field.
func ResultUrlsNEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldResultUrls, v))
}
// ResultUrlsIn applies the In predicate on the "result_urls" field.
func ResultUrlsIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldResultUrls, vs...))
}
// ResultUrlsNotIn applies the NotIn predicate on the "result_urls" field.
func ResultUrlsNotIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldResultUrls, vs...))
}
// ResultUrlsGT applies the GT predicate on the "result_urls" field.
func ResultUrlsGT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldResultUrls, v))
}
// ResultUrlsGTE applies the GTE predicate on the "result_urls" field.
func ResultUrlsGTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldResultUrls, v))
}
// ResultUrlsLT applies the LT predicate on the "result_urls" field.
func ResultUrlsLT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldResultUrls, v))
}
// ResultUrlsLTE applies the LTE predicate on the "result_urls" field.
func ResultUrlsLTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldResultUrls, v))
}
// ResultUrlsContains applies the Contains predicate on the "result_urls" field.
func ResultUrlsContains(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContains(FieldResultUrls, v))
}
// ResultUrlsHasPrefix applies the HasPrefix predicate on the "result_urls" field.
func ResultUrlsHasPrefix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasPrefix(FieldResultUrls, v))
}
// ResultUrlsHasSuffix applies the HasSuffix predicate on the "result_urls" field.
func ResultUrlsHasSuffix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasSuffix(FieldResultUrls, v))
}
// ResultUrlsIsNil applies the IsNil predicate on the "result_urls" field.
func ResultUrlsIsNil() predicate.SoraTask {
return predicate.SoraTask(sql.FieldIsNull(FieldResultUrls))
}
// ResultUrlsNotNil applies the NotNil predicate on the "result_urls" field.
func ResultUrlsNotNil() predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotNull(FieldResultUrls))
}
// ResultUrlsEqualFold applies the EqualFold predicate on the "result_urls" field.
func ResultUrlsEqualFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEqualFold(FieldResultUrls, v))
}
// ResultUrlsContainsFold applies the ContainsFold predicate on the "result_urls" field.
func ResultUrlsContainsFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContainsFold(FieldResultUrls, v))
}
// ErrorMessageEQ applies the EQ predicate on the "error_message" field.
func ErrorMessageEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldErrorMessage, v))
}
// ErrorMessageNEQ applies the NEQ predicate on the "error_message" field.
func ErrorMessageNEQ(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldErrorMessage, v))
}
// ErrorMessageIn applies the In predicate on the "error_message" field.
func ErrorMessageIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldErrorMessage, vs...))
}
// ErrorMessageNotIn applies the NotIn predicate on the "error_message" field.
func ErrorMessageNotIn(vs ...string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldErrorMessage, vs...))
}
// ErrorMessageGT applies the GT predicate on the "error_message" field.
func ErrorMessageGT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldErrorMessage, v))
}
// ErrorMessageGTE applies the GTE predicate on the "error_message" field.
func ErrorMessageGTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldErrorMessage, v))
}
// ErrorMessageLT applies the LT predicate on the "error_message" field.
func ErrorMessageLT(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldErrorMessage, v))
}
// ErrorMessageLTE applies the LTE predicate on the "error_message" field.
func ErrorMessageLTE(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldErrorMessage, v))
}
// ErrorMessageContains applies the Contains predicate on the "error_message" field.
func ErrorMessageContains(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContains(FieldErrorMessage, v))
}
// ErrorMessageHasPrefix applies the HasPrefix predicate on the "error_message" field.
func ErrorMessageHasPrefix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasPrefix(FieldErrorMessage, v))
}
// ErrorMessageHasSuffix applies the HasSuffix predicate on the "error_message" field.
func ErrorMessageHasSuffix(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldHasSuffix(FieldErrorMessage, v))
}
// ErrorMessageIsNil applies the IsNil predicate on the "error_message" field.
func ErrorMessageIsNil() predicate.SoraTask {
return predicate.SoraTask(sql.FieldIsNull(FieldErrorMessage))
}
// ErrorMessageNotNil applies the NotNil predicate on the "error_message" field.
func ErrorMessageNotNil() predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotNull(FieldErrorMessage))
}
// ErrorMessageEqualFold applies the EqualFold predicate on the "error_message" field.
func ErrorMessageEqualFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEqualFold(FieldErrorMessage, v))
}
// ErrorMessageContainsFold applies the ContainsFold predicate on the "error_message" field.
func ErrorMessageContainsFold(v string) predicate.SoraTask {
return predicate.SoraTask(sql.FieldContainsFold(FieldErrorMessage, v))
}
// RetryCountEQ applies the EQ predicate on the "retry_count" field.
func RetryCountEQ(v int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldRetryCount, v))
}
// RetryCountNEQ applies the NEQ predicate on the "retry_count" field.
func RetryCountNEQ(v int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldRetryCount, v))
}
// RetryCountIn applies the In predicate on the "retry_count" field.
func RetryCountIn(vs ...int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldRetryCount, vs...))
}
// RetryCountNotIn applies the NotIn predicate on the "retry_count" field.
func RetryCountNotIn(vs ...int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldRetryCount, vs...))
}
// RetryCountGT applies the GT predicate on the "retry_count" field.
func RetryCountGT(v int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldRetryCount, v))
}
// RetryCountGTE applies the GTE predicate on the "retry_count" field.
func RetryCountGTE(v int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldRetryCount, v))
}
// RetryCountLT applies the LT predicate on the "retry_count" field.
func RetryCountLT(v int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldRetryCount, v))
}
// RetryCountLTE applies the LTE predicate on the "retry_count" field.
func RetryCountLTE(v int) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldRetryCount, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldCreatedAt, v))
}
// CompletedAtEQ applies the EQ predicate on the "completed_at" field.
func CompletedAtEQ(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldEQ(FieldCompletedAt, v))
}
// CompletedAtNEQ applies the NEQ predicate on the "completed_at" field.
func CompletedAtNEQ(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNEQ(FieldCompletedAt, v))
}
// CompletedAtIn applies the In predicate on the "completed_at" field.
func CompletedAtIn(vs ...time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldIn(FieldCompletedAt, vs...))
}
// CompletedAtNotIn applies the NotIn predicate on the "completed_at" field.
func CompletedAtNotIn(vs ...time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotIn(FieldCompletedAt, vs...))
}
// CompletedAtGT applies the GT predicate on the "completed_at" field.
func CompletedAtGT(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGT(FieldCompletedAt, v))
}
// CompletedAtGTE applies the GTE predicate on the "completed_at" field.
func CompletedAtGTE(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldGTE(FieldCompletedAt, v))
}
// CompletedAtLT applies the LT predicate on the "completed_at" field.
func CompletedAtLT(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLT(FieldCompletedAt, v))
}
// CompletedAtLTE applies the LTE predicate on the "completed_at" field.
func CompletedAtLTE(v time.Time) predicate.SoraTask {
return predicate.SoraTask(sql.FieldLTE(FieldCompletedAt, v))
}
// CompletedAtIsNil applies the IsNil predicate on the "completed_at" field.
func CompletedAtIsNil() predicate.SoraTask {
return predicate.SoraTask(sql.FieldIsNull(FieldCompletedAt))
}
// CompletedAtNotNil applies the NotNil predicate on the "completed_at" field.
func CompletedAtNotNil() predicate.SoraTask {
return predicate.SoraTask(sql.FieldNotNull(FieldCompletedAt))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.SoraTask) predicate.SoraTask {
return predicate.SoraTask(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.SoraTask) predicate.SoraTask {
return predicate.SoraTask(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.SoraTask) predicate.SoraTask {
return predicate.SoraTask(sql.NotPredicates(p))
}