func (*Card) scanValues(columns []string) ([]interface{}, error) {
	values := make([]interface{}, len(columns))
	for i := range columns {
		switch columns[i] {
		case card.FieldID:
			values[i] = &sql.NullInt64{}
		case card.FieldName, card.FieldCardNo, card.FieldCcv, card.FieldExpires:
			values[i] = &sql.NullString{}
		case card.FieldCreatedAt, card.FieldUpdatedAt:
			values[i] = &sql.NullTime{}
		case card.ForeignKeys[0]:  
			values[i] = &sql.NullInt64{}
		default:
			return nil, fmt.Errorf("unexpected column %q for type Card", columns[i])
		}
	}
	return values, nil
}
scanValues returns the types for scanning values from sql.Rows.
package ent
import (
	"fmt"
	"strings"
	"time"
	"entgo.io/ent/dialect/sql"
	"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 Card struct {
	config `json:"-"`
	ID int64 `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	CardNo string `json:"card_no,omitempty"`
	Ccv string `json:"ccv,omitempty"`
	Expires string `json:"expires,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	Edges      CardEdges `json:"edges"`
	user_cards *int64
}
type CardEdges struct {
	User *User `json:"user,omitempty"`
	loadedTypes [1]bool
}
func (e CardEdges) UserOrErr() (*User, error) {
	if e.loadedTypes[0] {
		if e.User == nil {
			return nil, &NotFoundError{label: user.Label}
		}
		return e.User, nil
	}
	return nil, &NotLoadedError{edge: "user"}
}