mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-22 19:39:31 +08:00
- 新增 git_bots, git_bot_users, git_bot_tasks, project_git_bots 表 - 添加 user, host, project 到 gitbot 的关联边 - 使用 soft delete 和 created_at 游标
844 lines
27 KiB
Go
844 lines
27 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package task
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"github.com/chaitin/MonkeyCode/backend/consts"
|
|
"github.com/chaitin/MonkeyCode/backend/db/predicate"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
|
func DeletedAt(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldDeletedAt, v))
|
|
}
|
|
|
|
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
|
|
func UserID(v uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// Kind applies equality check predicate on the "kind" field. It's identical to KindEQ.
|
|
func Kind(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEQ(FieldKind, vc))
|
|
}
|
|
|
|
// SubType applies equality check predicate on the "sub_type" field. It's identical to SubTypeEQ.
|
|
func SubType(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEQ(FieldSubType, vc))
|
|
}
|
|
|
|
// Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
|
|
func Content(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldContent, v))
|
|
}
|
|
|
|
// Summary applies equality check predicate on the "summary" field. It's identical to SummaryEQ.
|
|
func Summary(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldSummary, v))
|
|
}
|
|
|
|
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
|
func Status(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEQ(FieldStatus, vc))
|
|
}
|
|
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
|
func CreatedAt(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
|
func UpdatedAt(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// CompletedAt applies equality check predicate on the "completed_at" field. It's identical to CompletedAtEQ.
|
|
func CompletedAt(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldCompletedAt, v))
|
|
}
|
|
|
|
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
|
func DeletedAtEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
|
func DeletedAtNEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
|
func DeletedAtIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldDeletedAt, vs...))
|
|
}
|
|
|
|
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
|
func DeletedAtNotIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldDeletedAt, vs...))
|
|
}
|
|
|
|
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
|
func DeletedAtGT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGT(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
|
func DeletedAtGTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGTE(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
|
func DeletedAtLT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLT(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
|
func DeletedAtLTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLTE(FieldDeletedAt, v))
|
|
}
|
|
|
|
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
|
func DeletedAtIsNil() predicate.Task {
|
|
return predicate.Task(sql.FieldIsNull(FieldDeletedAt))
|
|
}
|
|
|
|
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
|
func DeletedAtNotNil() predicate.Task {
|
|
return predicate.Task(sql.FieldNotNull(FieldDeletedAt))
|
|
}
|
|
|
|
// UserIDEQ applies the EQ predicate on the "user_id" field.
|
|
func UserIDEQ(v uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
|
|
func UserIDNEQ(v uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDIn applies the In predicate on the "user_id" field.
|
|
func UserIDIn(vs ...uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
|
|
func UserIDNotIn(vs ...uuid.UUID) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// KindEQ applies the EQ predicate on the "kind" field.
|
|
func KindEQ(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEQ(FieldKind, vc))
|
|
}
|
|
|
|
// KindNEQ applies the NEQ predicate on the "kind" field.
|
|
func KindNEQ(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldNEQ(FieldKind, vc))
|
|
}
|
|
|
|
// KindIn applies the In predicate on the "kind" field.
|
|
func KindIn(vs ...consts.TaskType) predicate.Task {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.Task(sql.FieldIn(FieldKind, v...))
|
|
}
|
|
|
|
// KindNotIn applies the NotIn predicate on the "kind" field.
|
|
func KindNotIn(vs ...consts.TaskType) predicate.Task {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.Task(sql.FieldNotIn(FieldKind, v...))
|
|
}
|
|
|
|
// KindGT applies the GT predicate on the "kind" field.
|
|
func KindGT(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldGT(FieldKind, vc))
|
|
}
|
|
|
|
// KindGTE applies the GTE predicate on the "kind" field.
|
|
func KindGTE(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldGTE(FieldKind, vc))
|
|
}
|
|
|
|
// KindLT applies the LT predicate on the "kind" field.
|
|
func KindLT(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldLT(FieldKind, vc))
|
|
}
|
|
|
|
// KindLTE applies the LTE predicate on the "kind" field.
|
|
func KindLTE(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldLTE(FieldKind, vc))
|
|
}
|
|
|
|
// KindContains applies the Contains predicate on the "kind" field.
|
|
func KindContains(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldContains(FieldKind, vc))
|
|
}
|
|
|
|
// KindHasPrefix applies the HasPrefix predicate on the "kind" field.
|
|
func KindHasPrefix(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldHasPrefix(FieldKind, vc))
|
|
}
|
|
|
|
// KindHasSuffix applies the HasSuffix predicate on the "kind" field.
|
|
func KindHasSuffix(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldHasSuffix(FieldKind, vc))
|
|
}
|
|
|
|
// KindEqualFold applies the EqualFold predicate on the "kind" field.
|
|
func KindEqualFold(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEqualFold(FieldKind, vc))
|
|
}
|
|
|
|
// KindContainsFold applies the ContainsFold predicate on the "kind" field.
|
|
func KindContainsFold(v consts.TaskType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldContainsFold(FieldKind, vc))
|
|
}
|
|
|
|
// SubTypeEQ applies the EQ predicate on the "sub_type" field.
|
|
func SubTypeEQ(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEQ(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeNEQ applies the NEQ predicate on the "sub_type" field.
|
|
func SubTypeNEQ(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldNEQ(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeIn applies the In predicate on the "sub_type" field.
|
|
func SubTypeIn(vs ...consts.TaskSubType) predicate.Task {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.Task(sql.FieldIn(FieldSubType, v...))
|
|
}
|
|
|
|
// SubTypeNotIn applies the NotIn predicate on the "sub_type" field.
|
|
func SubTypeNotIn(vs ...consts.TaskSubType) predicate.Task {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.Task(sql.FieldNotIn(FieldSubType, v...))
|
|
}
|
|
|
|
// SubTypeGT applies the GT predicate on the "sub_type" field.
|
|
func SubTypeGT(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldGT(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeGTE applies the GTE predicate on the "sub_type" field.
|
|
func SubTypeGTE(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldGTE(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeLT applies the LT predicate on the "sub_type" field.
|
|
func SubTypeLT(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldLT(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeLTE applies the LTE predicate on the "sub_type" field.
|
|
func SubTypeLTE(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldLTE(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeContains applies the Contains predicate on the "sub_type" field.
|
|
func SubTypeContains(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldContains(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeHasPrefix applies the HasPrefix predicate on the "sub_type" field.
|
|
func SubTypeHasPrefix(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldHasPrefix(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeHasSuffix applies the HasSuffix predicate on the "sub_type" field.
|
|
func SubTypeHasSuffix(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldHasSuffix(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeIsNil applies the IsNil predicate on the "sub_type" field.
|
|
func SubTypeIsNil() predicate.Task {
|
|
return predicate.Task(sql.FieldIsNull(FieldSubType))
|
|
}
|
|
|
|
// SubTypeNotNil applies the NotNil predicate on the "sub_type" field.
|
|
func SubTypeNotNil() predicate.Task {
|
|
return predicate.Task(sql.FieldNotNull(FieldSubType))
|
|
}
|
|
|
|
// SubTypeEqualFold applies the EqualFold predicate on the "sub_type" field.
|
|
func SubTypeEqualFold(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEqualFold(FieldSubType, vc))
|
|
}
|
|
|
|
// SubTypeContainsFold applies the ContainsFold predicate on the "sub_type" field.
|
|
func SubTypeContainsFold(v consts.TaskSubType) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldContainsFold(FieldSubType, vc))
|
|
}
|
|
|
|
// ContentEQ applies the EQ predicate on the "content" field.
|
|
func ContentEQ(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldContent, v))
|
|
}
|
|
|
|
// ContentNEQ applies the NEQ predicate on the "content" field.
|
|
func ContentNEQ(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldContent, v))
|
|
}
|
|
|
|
// ContentIn applies the In predicate on the "content" field.
|
|
func ContentIn(vs ...string) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldContent, vs...))
|
|
}
|
|
|
|
// ContentNotIn applies the NotIn predicate on the "content" field.
|
|
func ContentNotIn(vs ...string) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldContent, vs...))
|
|
}
|
|
|
|
// ContentGT applies the GT predicate on the "content" field.
|
|
func ContentGT(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldGT(FieldContent, v))
|
|
}
|
|
|
|
// ContentGTE applies the GTE predicate on the "content" field.
|
|
func ContentGTE(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldGTE(FieldContent, v))
|
|
}
|
|
|
|
// ContentLT applies the LT predicate on the "content" field.
|
|
func ContentLT(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldLT(FieldContent, v))
|
|
}
|
|
|
|
// ContentLTE applies the LTE predicate on the "content" field.
|
|
func ContentLTE(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldLTE(FieldContent, v))
|
|
}
|
|
|
|
// ContentContains applies the Contains predicate on the "content" field.
|
|
func ContentContains(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldContains(FieldContent, v))
|
|
}
|
|
|
|
// ContentHasPrefix applies the HasPrefix predicate on the "content" field.
|
|
func ContentHasPrefix(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldHasPrefix(FieldContent, v))
|
|
}
|
|
|
|
// ContentHasSuffix applies the HasSuffix predicate on the "content" field.
|
|
func ContentHasSuffix(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldHasSuffix(FieldContent, v))
|
|
}
|
|
|
|
// ContentEqualFold applies the EqualFold predicate on the "content" field.
|
|
func ContentEqualFold(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldEqualFold(FieldContent, v))
|
|
}
|
|
|
|
// ContentContainsFold applies the ContainsFold predicate on the "content" field.
|
|
func ContentContainsFold(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldContainsFold(FieldContent, v))
|
|
}
|
|
|
|
// SummaryEQ applies the EQ predicate on the "summary" field.
|
|
func SummaryEQ(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryNEQ applies the NEQ predicate on the "summary" field.
|
|
func SummaryNEQ(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryIn applies the In predicate on the "summary" field.
|
|
func SummaryIn(vs ...string) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldSummary, vs...))
|
|
}
|
|
|
|
// SummaryNotIn applies the NotIn predicate on the "summary" field.
|
|
func SummaryNotIn(vs ...string) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldSummary, vs...))
|
|
}
|
|
|
|
// SummaryGT applies the GT predicate on the "summary" field.
|
|
func SummaryGT(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldGT(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryGTE applies the GTE predicate on the "summary" field.
|
|
func SummaryGTE(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldGTE(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryLT applies the LT predicate on the "summary" field.
|
|
func SummaryLT(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldLT(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryLTE applies the LTE predicate on the "summary" field.
|
|
func SummaryLTE(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldLTE(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryContains applies the Contains predicate on the "summary" field.
|
|
func SummaryContains(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldContains(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryHasPrefix applies the HasPrefix predicate on the "summary" field.
|
|
func SummaryHasPrefix(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldHasPrefix(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryHasSuffix applies the HasSuffix predicate on the "summary" field.
|
|
func SummaryHasSuffix(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldHasSuffix(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryIsNil applies the IsNil predicate on the "summary" field.
|
|
func SummaryIsNil() predicate.Task {
|
|
return predicate.Task(sql.FieldIsNull(FieldSummary))
|
|
}
|
|
|
|
// SummaryNotNil applies the NotNil predicate on the "summary" field.
|
|
func SummaryNotNil() predicate.Task {
|
|
return predicate.Task(sql.FieldNotNull(FieldSummary))
|
|
}
|
|
|
|
// SummaryEqualFold applies the EqualFold predicate on the "summary" field.
|
|
func SummaryEqualFold(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldEqualFold(FieldSummary, v))
|
|
}
|
|
|
|
// SummaryContainsFold applies the ContainsFold predicate on the "summary" field.
|
|
func SummaryContainsFold(v string) predicate.Task {
|
|
return predicate.Task(sql.FieldContainsFold(FieldSummary, v))
|
|
}
|
|
|
|
// StatusEQ applies the EQ predicate on the "status" field.
|
|
func StatusEQ(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEQ(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusNEQ applies the NEQ predicate on the "status" field.
|
|
func StatusNEQ(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldNEQ(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusIn applies the In predicate on the "status" field.
|
|
func StatusIn(vs ...consts.TaskStatus) predicate.Task {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.Task(sql.FieldIn(FieldStatus, v...))
|
|
}
|
|
|
|
// StatusNotIn applies the NotIn predicate on the "status" field.
|
|
func StatusNotIn(vs ...consts.TaskStatus) predicate.Task {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = string(vs[i])
|
|
}
|
|
return predicate.Task(sql.FieldNotIn(FieldStatus, v...))
|
|
}
|
|
|
|
// StatusGT applies the GT predicate on the "status" field.
|
|
func StatusGT(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldGT(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusGTE applies the GTE predicate on the "status" field.
|
|
func StatusGTE(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldGTE(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusLT applies the LT predicate on the "status" field.
|
|
func StatusLT(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldLT(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusLTE applies the LTE predicate on the "status" field.
|
|
func StatusLTE(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldLTE(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusContains applies the Contains predicate on the "status" field.
|
|
func StatusContains(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldContains(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
|
|
func StatusHasPrefix(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldHasPrefix(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
|
|
func StatusHasSuffix(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldHasSuffix(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusEqualFold applies the EqualFold predicate on the "status" field.
|
|
func StatusEqualFold(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldEqualFold(FieldStatus, vc))
|
|
}
|
|
|
|
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
|
|
func StatusContainsFold(v consts.TaskStatus) predicate.Task {
|
|
vc := string(v)
|
|
return predicate.Task(sql.FieldContainsFold(FieldStatus, vc))
|
|
}
|
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
func CreatedAtEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
func CreatedAtNEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
func CreatedAtGT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
func CreatedAtGTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
func CreatedAtLT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
func CreatedAtLTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
|
func UpdatedAtEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
|
func UpdatedAtNEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
|
func UpdatedAtIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldUpdatedAt, vs...))
|
|
}
|
|
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
|
}
|
|
|
|
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
|
func UpdatedAtGT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGT(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
|
func UpdatedAtGTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGTE(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
|
func UpdatedAtLT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLT(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
|
func UpdatedAtLTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLTE(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// CompletedAtEQ applies the EQ predicate on the "completed_at" field.
|
|
func CompletedAtEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldEQ(FieldCompletedAt, v))
|
|
}
|
|
|
|
// CompletedAtNEQ applies the NEQ predicate on the "completed_at" field.
|
|
func CompletedAtNEQ(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNEQ(FieldCompletedAt, v))
|
|
}
|
|
|
|
// CompletedAtIn applies the In predicate on the "completed_at" field.
|
|
func CompletedAtIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldIn(FieldCompletedAt, vs...))
|
|
}
|
|
|
|
// CompletedAtNotIn applies the NotIn predicate on the "completed_at" field.
|
|
func CompletedAtNotIn(vs ...time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldNotIn(FieldCompletedAt, vs...))
|
|
}
|
|
|
|
// CompletedAtGT applies the GT predicate on the "completed_at" field.
|
|
func CompletedAtGT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGT(FieldCompletedAt, v))
|
|
}
|
|
|
|
// CompletedAtGTE applies the GTE predicate on the "completed_at" field.
|
|
func CompletedAtGTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldGTE(FieldCompletedAt, v))
|
|
}
|
|
|
|
// CompletedAtLT applies the LT predicate on the "completed_at" field.
|
|
func CompletedAtLT(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLT(FieldCompletedAt, v))
|
|
}
|
|
|
|
// CompletedAtLTE applies the LTE predicate on the "completed_at" field.
|
|
func CompletedAtLTE(v time.Time) predicate.Task {
|
|
return predicate.Task(sql.FieldLTE(FieldCompletedAt, v))
|
|
}
|
|
|
|
// CompletedAtIsNil applies the IsNil predicate on the "completed_at" field.
|
|
func CompletedAtIsNil() predicate.Task {
|
|
return predicate.Task(sql.FieldIsNull(FieldCompletedAt))
|
|
}
|
|
|
|
// CompletedAtNotNil applies the NotNil predicate on the "completed_at" field.
|
|
func CompletedAtNotNil() predicate.Task {
|
|
return predicate.Task(sql.FieldNotNull(FieldCompletedAt))
|
|
}
|
|
|
|
// HasProjectTasks applies the HasEdge predicate on the "project_tasks" edge.
|
|
func HasProjectTasks() predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, ProjectTasksTable, ProjectTasksColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasProjectTasksWith applies the HasEdge predicate on the "project_tasks" edge with a given conditions (other predicates).
|
|
func HasProjectTasksWith(preds ...predicate.ProjectTask) predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := newProjectTasksStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasUser applies the HasEdge predicate on the "user" edge.
|
|
func HasUser() predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
|
|
func HasUserWith(preds ...predicate.User) predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := newUserStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasVms applies the HasEdge predicate on the "vms" edge.
|
|
func HasVms() predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2M, true, VmsTable, VmsPrimaryKey...),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasVmsWith applies the HasEdge predicate on the "vms" edge with a given conditions (other predicates).
|
|
func HasVmsWith(preds ...predicate.VirtualMachine) predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := newVmsStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasGitBotTasks applies the HasEdge predicate on the "git_bot_tasks" edge.
|
|
func HasGitBotTasks() predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, GitBotTasksTable, GitBotTasksColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasGitBotTasksWith applies the HasEdge predicate on the "git_bot_tasks" edge with a given conditions (other predicates).
|
|
func HasGitBotTasksWith(preds ...predicate.GitBotTask) predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := newGitBotTasksStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasTaskVms applies the HasEdge predicate on the "task_vms" edge.
|
|
func HasTaskVms() predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, true, TaskVmsTable, TaskVmsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasTaskVmsWith applies the HasEdge predicate on the "task_vms" edge with a given conditions (other predicates).
|
|
func HasTaskVmsWith(preds ...predicate.TaskVirtualMachine) predicate.Task {
|
|
return predicate.Task(func(s *sql.Selector) {
|
|
step := newTaskVmsStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.Task) predicate.Task {
|
|
return predicate.Task(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.Task) predicate.Task {
|
|
return predicate.Task(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.Task) predicate.Task {
|
|
return predicate.Task(sql.NotPredicates(p))
|
|
}
|