1
0

test manga

This commit is contained in:
2024-04-02 18:57:04 +09:00
parent b48ec9e88c
commit 6a868436e7
40 changed files with 16522 additions and 338 deletions

View File

@ -118,6 +118,8 @@ const (
EdgeCard = "card"
// EdgeUe holds the string denoting the ue edge name in mutations.
EdgeUe = "ue"
// EdgeMa holds the string denoting the ma edge name in mutations.
EdgeMa = "ma"
// Table holds the table name of the user in the database.
Table = "users"
// CardTable is the table that holds the card relation/edge.
@ -134,6 +136,13 @@ const (
UeInverseTable = "ues"
// UeColumn is the table column denoting the ue relation/edge.
UeColumn = "user_ue"
// MaTable is the table that holds the ma relation/edge.
MaTable = "mas"
// MaInverseTable is the table name for the Ma entity.
// It exists in this package in order to avoid circular dependency with the "ma" package.
MaInverseTable = "mas"
// MaColumn is the table column denoting the ma relation/edge.
MaColumn = "user_ma"
)
// Columns holds all SQL columns for user fields.
@ -552,6 +561,20 @@ func ByUe(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
sqlgraph.OrderByNeighborTerms(s, newUeStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByMaCount orders the results by ma count.
func ByMaCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newMaStep(), opts...)
}
}
// ByMa orders the results by ma terms.
func ByMa(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newMaStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
func newCardStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
@ -566,3 +589,10 @@ func newUeStep() *sqlgraph.Step {
sqlgraph.Edge(sqlgraph.O2M, false, UeTable, UeColumn),
)
}
func newMaStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MaInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, MaTable, MaColumn),
)
}

View File

@ -2606,6 +2606,29 @@ func HasUeWith(preds ...predicate.Ue) predicate.User {
})
}
// HasMa applies the HasEdge predicate on the "ma" edge.
func HasMa() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, MaTable, MaColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasMaWith applies the HasEdge predicate on the "ma" edge with a given conditions (other predicates).
func HasMaWith(preds ...predicate.Ma) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newMaStep()
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.User) predicate.User {
return predicate.User(func(s *sql.Selector) {