func (cc *CardCreate) SetNillableUserID(id *int64) *CardCreate {
	if id != nil {
		cc = cc.SetUserID(*id)
	}
	return cc
}
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
package ent
import (
	"context"
	"errors"
	"fmt"
	"time"
	"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/user"
)
type CardCreate struct {
	config
	mutation *CardMutation
	hooks    []Hook
}
func (cc *CardCreate) SetName(s string) *CardCreate {
	cc.mutation.SetName(s)
	return cc
}
func (cc *CardCreate) SetCardNo(s string) *CardCreate {
	cc.mutation.SetCardNo(s)
	return cc
}
func (cc *CardCreate) SetCcv(s string) *CardCreate {
	cc.mutation.SetCcv(s)
	return cc
}
func (cc *CardCreate) SetExpires(s string) *CardCreate {
	cc.mutation.SetExpires(s)
	return cc
}
func (cc *CardCreate) SetCreatedAt(t time.Time) *CardCreate {
	cc.mutation.SetCreatedAt(t)
	return cc
}
func (cc *CardCreate) SetNillableCreatedAt(t *time.Time) *CardCreate {
	if t != nil {
		cc.SetCreatedAt(*t)
	}
	return cc
}
func (cc *CardCreate) SetUpdatedAt(t time.Time) *CardCreate {
	cc.mutation.SetUpdatedAt(t)
	return cc
}
func (cc *CardCreate) SetNillableUpdatedAt(t *time.Time) *CardCreate {
	if t != nil {
		cc.SetUpdatedAt(*t)
	}
	return cc
}
func (cc *CardCreate) SetID(i int64) *CardCreate {
	cc.mutation.SetID(i)
	return cc
}
func (cc *CardCreate) SetUserID(id int64) *CardCreate {
	cc.mutation.SetUserID(id)
	return cc
}