mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-24 21:29:00 +08:00
从内部项目迁移模型配置和镜像配置模块,包括个人用户设置和团队级管理, 涵盖完整 CRUD、健康检查、供应商模型列表、所有权模型和 Swagger 注释。 - Ent schema: model, image, team_model, team_image, team_group_model, team_group_image - Domain 层: 接口、请求/响应类型、From 转换器 - Setting 模块: 个人模型/镜像 repo、usecase(代理重试、健康检查)、handler - Team 模块: 团队模型/镜像 repo、usecase、handler(TeamAuth + 审计中间件) - SQL 迁移: 000002_model_image up/down
214 lines
6.9 KiB
Go
214 lines
6.9 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package teamimage
|
|
|
|
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.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// TeamID applies equality check predicate on the "team_id" field. It's identical to TeamIDEQ.
|
|
func TeamID(v uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldTeamID, v))
|
|
}
|
|
|
|
// ImageID applies equality check predicate on the "image_id" field. It's identical to ImageIDEQ.
|
|
func ImageID(v uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldImageID, v))
|
|
}
|
|
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
|
func CreatedAt(v time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// TeamIDEQ applies the EQ predicate on the "team_id" field.
|
|
func TeamIDEQ(v uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldTeamID, v))
|
|
}
|
|
|
|
// TeamIDNEQ applies the NEQ predicate on the "team_id" field.
|
|
func TeamIDNEQ(v uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNEQ(FieldTeamID, v))
|
|
}
|
|
|
|
// TeamIDIn applies the In predicate on the "team_id" field.
|
|
func TeamIDIn(vs ...uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldIn(FieldTeamID, vs...))
|
|
}
|
|
|
|
// TeamIDNotIn applies the NotIn predicate on the "team_id" field.
|
|
func TeamIDNotIn(vs ...uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNotIn(FieldTeamID, vs...))
|
|
}
|
|
|
|
// ImageIDEQ applies the EQ predicate on the "image_id" field.
|
|
func ImageIDEQ(v uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldImageID, v))
|
|
}
|
|
|
|
// ImageIDNEQ applies the NEQ predicate on the "image_id" field.
|
|
func ImageIDNEQ(v uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNEQ(FieldImageID, v))
|
|
}
|
|
|
|
// ImageIDIn applies the In predicate on the "image_id" field.
|
|
func ImageIDIn(vs ...uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldIn(FieldImageID, vs...))
|
|
}
|
|
|
|
// ImageIDNotIn applies the NotIn predicate on the "image_id" field.
|
|
func ImageIDNotIn(vs ...uuid.UUID) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNotIn(FieldImageID, vs...))
|
|
}
|
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
func CreatedAtEQ(v time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
func CreatedAtNEQ(v time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldNotIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
func CreatedAtGT(v time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldGT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
func CreatedAtGTE(v time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldGTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
func CreatedAtLT(v time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldLT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
func CreatedAtLTE(v time.Time) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.FieldLTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// HasTeam applies the HasEdge predicate on the "team" edge.
|
|
func HasTeam() predicate.TeamImage {
|
|
return predicate.TeamImage(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, TeamTable, TeamColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasTeamWith applies the HasEdge predicate on the "team" edge with a given conditions (other predicates).
|
|
func HasTeamWith(preds ...predicate.Team) predicate.TeamImage {
|
|
return predicate.TeamImage(func(s *sql.Selector) {
|
|
step := newTeamStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasImage applies the HasEdge predicate on the "image" edge.
|
|
func HasImage() predicate.TeamImage {
|
|
return predicate.TeamImage(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, ImageTable, ImageColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasImageWith applies the HasEdge predicate on the "image" edge with a given conditions (other predicates).
|
|
func HasImageWith(preds ...predicate.Image) predicate.TeamImage {
|
|
return predicate.TeamImage(func(s *sql.Selector) {
|
|
step := newImageStep()
|
|
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.TeamImage) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.TeamImage) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.TeamImage) predicate.TeamImage {
|
|
return predicate.TeamImage(sql.NotPredicates(p))
|
|
}
|