func (f BeerFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.BeerMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BeerMutation", m)
	}
	return f(ctx, mv)
}
Mutate calls f(ctx, m).
package hook
import (
	"context"
	"fmt"
	"github.com/go-kratos/beer-shop/app/catalog/service/internal/data/ent"
)
type BeerFunc func(context.Context, *ent.BeerMutation) (ent.Value, error)