func (*Beer) scanValues(columns []string) ([]interface{}, error) {
	values := make([]interface{}, len(columns))
	for i := range columns {
		switch columns[i] {
		case beer.FieldImages:
			values[i] = &[]byte{}
		case beer.FieldID, beer.FieldCount, beer.FieldPrice:
			values[i] = &sql.NullInt64{}
		case beer.FieldName, beer.FieldDescription:
			values[i] = &sql.NullString{}
		case beer.FieldCreatedAt, beer.FieldUpdatedAt:
			values[i] = &sql.NullTime{}
		default:
			return nil, fmt.Errorf("unexpected column %q for type Beer", columns[i])
		}
	}
	return values, nil
}
scanValues returns the types for scanning values from sql.Rows.
package ent
import (
	"encoding/json"
	"fmt"
	"strings"
	"time"
	"entgo.io/ent/dialect/sql"
	"github.com/go-kratos/beer-shop/app/catalog/service/internal/biz"
	"github.com/go-kratos/beer-shop/app/catalog/service/internal/data/ent/beer"
)
type Beer struct {
	config `json:"-"`
	ID int64 `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Count int64 `json:"count,omitempty"`
	Price int64 `json:"price,omitempty"`
	Images []biz.Image `json:"images,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}