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 游标
214 lines
7.1 KiB
Go
214 lines
7.1 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package gitbotuser
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"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.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// GitBotID applies equality check predicate on the "git_bot_id" field. It's identical to GitBotIDEQ.
|
|
func GitBotID(v uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldGitBotID, v))
|
|
}
|
|
|
|
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
|
|
func UserID(v uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
|
func CreatedAt(v time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// GitBotIDEQ applies the EQ predicate on the "git_bot_id" field.
|
|
func GitBotIDEQ(v uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldGitBotID, v))
|
|
}
|
|
|
|
// GitBotIDNEQ applies the NEQ predicate on the "git_bot_id" field.
|
|
func GitBotIDNEQ(v uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNEQ(FieldGitBotID, v))
|
|
}
|
|
|
|
// GitBotIDIn applies the In predicate on the "git_bot_id" field.
|
|
func GitBotIDIn(vs ...uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldIn(FieldGitBotID, vs...))
|
|
}
|
|
|
|
// GitBotIDNotIn applies the NotIn predicate on the "git_bot_id" field.
|
|
func GitBotIDNotIn(vs ...uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNotIn(FieldGitBotID, vs...))
|
|
}
|
|
|
|
// UserIDEQ applies the EQ predicate on the "user_id" field.
|
|
func UserIDEQ(v uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
|
|
func UserIDNEQ(v uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNEQ(FieldUserID, v))
|
|
}
|
|
|
|
// UserIDIn applies the In predicate on the "user_id" field.
|
|
func UserIDIn(vs ...uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
|
|
func UserIDNotIn(vs ...uuid.UUID) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNotIn(FieldUserID, vs...))
|
|
}
|
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
func CreatedAtEQ(v time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
func CreatedAtNEQ(v time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldNotIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
func CreatedAtGT(v time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldGT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
func CreatedAtGTE(v time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldGTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
func CreatedAtLT(v time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldLT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
func CreatedAtLTE(v time.Time) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.FieldLTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// HasGitBot applies the HasEdge predicate on the "git_bot" edge.
|
|
func HasGitBot() predicate.GitBotUser {
|
|
return predicate.GitBotUser(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, GitBotTable, GitBotColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasGitBotWith applies the HasEdge predicate on the "git_bot" edge with a given conditions (other predicates).
|
|
func HasGitBotWith(preds ...predicate.GitBot) predicate.GitBotUser {
|
|
return predicate.GitBotUser(func(s *sql.Selector) {
|
|
step := newGitBotStep()
|
|
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.GitBotUser {
|
|
return predicate.GitBotUser(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, 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.GitBotUser {
|
|
return predicate.GitBotUser(func(s *sql.Selector) {
|
|
step := newUserStep()
|
|
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.GitBotUser) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.GitBotUser) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.GitBotUser) predicate.GitBotUser {
|
|
return predicate.GitBotUser(sql.NotPredicates(p))
|
|
}
|