update migrate
This commit is contained in:
@ -3,12 +3,12 @@
|
||||
package ent
|
||||
|
||||
import (
|
||||
"api/ent/card"
|
||||
"api/ent/predicate"
|
||||
"api/ent/user"
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"t/ent/card"
|
||||
"t/ent/predicate"
|
||||
"t/ent/user"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
@ -19,7 +19,7 @@ import (
|
||||
type CardQuery struct {
|
||||
config
|
||||
ctx *QueryContext
|
||||
order []OrderFunc
|
||||
order []card.OrderOption
|
||||
inters []Interceptor
|
||||
predicates []predicate.Card
|
||||
withOwner *UserQuery
|
||||
@ -55,7 +55,7 @@ func (cq *CardQuery) Unique(unique bool) *CardQuery {
|
||||
}
|
||||
|
||||
// Order specifies how the records should be ordered.
|
||||
func (cq *CardQuery) Order(o ...OrderFunc) *CardQuery {
|
||||
func (cq *CardQuery) Order(o ...card.OrderOption) *CardQuery {
|
||||
cq.order = append(cq.order, o...)
|
||||
return cq
|
||||
}
|
||||
@ -271,7 +271,7 @@ func (cq *CardQuery) Clone() *CardQuery {
|
||||
return &CardQuery{
|
||||
config: cq.config,
|
||||
ctx: cq.ctx.Clone(),
|
||||
order: append([]OrderFunc{}, cq.order...),
|
||||
order: append([]card.OrderOption{}, cq.order...),
|
||||
inters: append([]Interceptor{}, cq.inters...),
|
||||
predicates: append([]predicate.Card{}, cq.predicates...),
|
||||
withOwner: cq.withOwner.Clone(),
|
||||
@ -298,12 +298,12 @@ func (cq *CardQuery) WithOwner(opts ...func(*UserQuery)) *CardQuery {
|
||||
// Example:
|
||||
//
|
||||
// var v []struct {
|
||||
// Card int `json:"card,omitempty"`
|
||||
// Password string `json:"password,omitempty"`
|
||||
// Count int `json:"count,omitempty"`
|
||||
// }
|
||||
//
|
||||
// client.Card.Query().
|
||||
// GroupBy(card.FieldCard).
|
||||
// GroupBy(card.FieldPassword).
|
||||
// Aggregate(ent.Count()).
|
||||
// Scan(ctx, &v)
|
||||
func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy {
|
||||
@ -321,11 +321,11 @@ func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy {
|
||||
// Example:
|
||||
//
|
||||
// var v []struct {
|
||||
// Card int `json:"card,omitempty"`
|
||||
// Password string `json:"password,omitempty"`
|
||||
// }
|
||||
//
|
||||
// client.Card.Query().
|
||||
// Select(card.FieldCard).
|
||||
// Select(card.FieldPassword).
|
||||
// Scan(ctx, &v)
|
||||
func (cq *CardQuery) Select(fields ...string) *CardSelect {
|
||||
cq.ctx.Fields = append(cq.ctx.Fields, fields...)
|
||||
|
Reference in New Issue
Block a user