func (cu *CardUpdate) Mutation() *CardMutation {
	return cu.mutation
}
Mutation returns the CardMutation object of the builder.
package ent
import (
	"context"
	"fmt"
	"time"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
	"github.com/go-kratos/beer-shop/app/user/service/internal/data/ent/card"
	"github.com/go-kratos/beer-shop/app/user/service/internal/data/ent/predicate"
	"github.com/go-kratos/beer-shop/app/user/service/internal/data/ent/user"
)
type CardUpdate struct {
	config
	hooks    []Hook
	mutation *CardMutation
}
func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate {
	cu.mutation.predicates = append(cu.mutation.predicates, ps...)
	return cu
}
func (cu *CardUpdate) SetName(s string) *CardUpdate {
	cu.mutation.SetName(s)
	return cu
}
func (cu *CardUpdate) SetCardNo(s string) *CardUpdate {
	cu.mutation.SetCardNo(s)
	return cu
}
func (cu *CardUpdate) SetCcv(s string) *CardUpdate {
	cu.mutation.SetCcv(s)
	return cu
}
func (cu *CardUpdate) SetExpires(s string) *CardUpdate {
	cu.mutation.SetExpires(s)
	return cu
}
func (cu *CardUpdate) SetCreatedAt(t time.Time) *CardUpdate {
	cu.mutation.SetCreatedAt(t)
	return cu
}
func (cu *CardUpdate) SetNillableCreatedAt(t *time.Time) *CardUpdate {
	if t != nil {
		cu.SetCreatedAt(*t)
	}
	return cu
}
func (cu *CardUpdate) SetUpdatedAt(t time.Time) *CardUpdate {
	cu.mutation.SetUpdatedAt(t)
	return cu
}
func (cu *CardUpdate) SetNillableUpdatedAt(t *time.Time) *CardUpdate {
	if t != nil {
		cu.SetUpdatedAt(*t)
	}
	return cu
}
func (cu *CardUpdate) SetUserID(id int64) *CardUpdate {
	cu.mutation.SetUserID(id)
	return cu
}
func (cu *CardUpdate) SetNillableUserID(id *int64) *CardUpdate {
	if id != nil {
		cu = cu.SetUserID(*id)
	}
	return cu
}
func (cu *CardUpdate) SetUser(u *User) *CardUpdate {
	return cu.SetUserID(u.ID)
}