mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-22 19:39:31 +08:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
121 lines
4.1 KiB
Go
121 lines
4.1 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package agentskillgroupbinding
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the agentskillgroupbinding type in the database.
|
|
Label = "agent_skill_group_binding"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldSkillID holds the string denoting the skill_id field in the database.
|
|
FieldSkillID = "skill_id"
|
|
// FieldGroupID holds the string denoting the group_id field in the database.
|
|
FieldGroupID = "group_id"
|
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// EdgeSkill holds the string denoting the skill edge name in mutations.
|
|
EdgeSkill = "skill"
|
|
// EdgeGroup holds the string denoting the group edge name in mutations.
|
|
EdgeGroup = "group"
|
|
// Table holds the table name of the agentskillgroupbinding in the database.
|
|
Table = "agent_skill_group_bindings"
|
|
// SkillTable is the table that holds the skill relation/edge.
|
|
SkillTable = "agent_skill_group_bindings"
|
|
// SkillInverseTable is the table name for the AgentSkill entity.
|
|
// It exists in this package in order to avoid circular dependency with the "agentskill" package.
|
|
SkillInverseTable = "agent_skills"
|
|
// SkillColumn is the table column denoting the skill relation/edge.
|
|
SkillColumn = "skill_id"
|
|
// GroupTable is the table that holds the group relation/edge.
|
|
GroupTable = "agent_skill_group_bindings"
|
|
// GroupInverseTable is the table name for the TeamGroup entity.
|
|
// It exists in this package in order to avoid circular dependency with the "teamgroup" package.
|
|
GroupInverseTable = "team_groups"
|
|
// GroupColumn is the table column denoting the group relation/edge.
|
|
GroupColumn = "group_id"
|
|
)
|
|
|
|
// Columns holds all SQL columns for agentskillgroupbinding fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldSkillID,
|
|
FieldGroupID,
|
|
FieldCreatedAt,
|
|
}
|
|
|
|
// ValidColumn reports if the column name is valid (part of the table columns).
|
|
func ValidColumn(column string) bool {
|
|
for i := range Columns {
|
|
if column == Columns[i] {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
var (
|
|
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
|
DefaultCreatedAt func() time.Time
|
|
// DefaultID holds the default value on creation for the "id" field.
|
|
DefaultID func() uuid.UUID
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the AgentSkillGroupBinding queries.
|
|
type OrderOption func(*sql.Selector)
|
|
|
|
// ByID orders the results by the id field.
|
|
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldID, opts...).ToFunc()
|
|
}
|
|
|
|
// BySkillID orders the results by the skill_id field.
|
|
func BySkillID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSkillID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByGroupID orders the results by the group_id field.
|
|
func ByGroupID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldGroupID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the created_at field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// BySkillField orders the results by skill field.
|
|
func BySkillField(field string, opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newSkillStep(), sql.OrderByField(field, opts...))
|
|
}
|
|
}
|
|
|
|
// ByGroupField orders the results by group field.
|
|
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newGroupStep(), sql.OrderByField(field, opts...))
|
|
}
|
|
}
|
|
func newSkillStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(SkillInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, SkillTable, SkillColumn),
|
|
)
|
|
}
|
|
func newGroupStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(GroupInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, false, GroupTable, GroupColumn),
|
|
)
|
|
}
|