mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-23 04:09:15 +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 teammodel
|
|
|
|
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.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(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.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldTeamID, v))
|
|
}
|
|
|
|
// ModelID applies equality check predicate on the "model_id" field. It's identical to ModelIDEQ.
|
|
func ModelID(v uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldModelID, v))
|
|
}
|
|
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
|
func CreatedAt(v time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// TeamIDEQ applies the EQ predicate on the "team_id" field.
|
|
func TeamIDEQ(v uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldTeamID, v))
|
|
}
|
|
|
|
// TeamIDNEQ applies the NEQ predicate on the "team_id" field.
|
|
func TeamIDNEQ(v uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNEQ(FieldTeamID, v))
|
|
}
|
|
|
|
// TeamIDIn applies the In predicate on the "team_id" field.
|
|
func TeamIDIn(vs ...uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldIn(FieldTeamID, vs...))
|
|
}
|
|
|
|
// TeamIDNotIn applies the NotIn predicate on the "team_id" field.
|
|
func TeamIDNotIn(vs ...uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNotIn(FieldTeamID, vs...))
|
|
}
|
|
|
|
// ModelIDEQ applies the EQ predicate on the "model_id" field.
|
|
func ModelIDEQ(v uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldModelID, v))
|
|
}
|
|
|
|
// ModelIDNEQ applies the NEQ predicate on the "model_id" field.
|
|
func ModelIDNEQ(v uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNEQ(FieldModelID, v))
|
|
}
|
|
|
|
// ModelIDIn applies the In predicate on the "model_id" field.
|
|
func ModelIDIn(vs ...uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldIn(FieldModelID, vs...))
|
|
}
|
|
|
|
// ModelIDNotIn applies the NotIn predicate on the "model_id" field.
|
|
func ModelIDNotIn(vs ...uuid.UUID) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNotIn(FieldModelID, vs...))
|
|
}
|
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
func CreatedAtEQ(v time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
func CreatedAtNEQ(v time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldNotIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
func CreatedAtGT(v time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldGT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
func CreatedAtGTE(v time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldGTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
func CreatedAtLT(v time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldLT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
func CreatedAtLTE(v time.Time) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.FieldLTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// HasTeam applies the HasEdge predicate on the "team" edge.
|
|
func HasTeam() predicate.TeamModel {
|
|
return predicate.TeamModel(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.TeamModel {
|
|
return predicate.TeamModel(func(s *sql.Selector) {
|
|
step := newTeamStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasModel applies the HasEdge predicate on the "model" edge.
|
|
func HasModel() predicate.TeamModel {
|
|
return predicate.TeamModel(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, ModelTable, ModelColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasModelWith applies the HasEdge predicate on the "model" edge with a given conditions (other predicates).
|
|
func HasModelWith(preds ...predicate.Model) predicate.TeamModel {
|
|
return predicate.TeamModel(func(s *sql.Selector) {
|
|
step := newModelStep()
|
|
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.TeamModel) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.TeamModel) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.TeamModel) predicate.TeamModel {
|
|
return predicate.TeamModel(sql.NotPredicates(p))
|
|
}
|