func newCategoryMutation(c config, op Op, opts ...categoryOption) *CategoryMutation {
	m := &CategoryMutation{
		config:        c,
		op:            op,
		typ:           TypeCategory,
		clearedFields: make(map[string]struct{}),
	}
	for _, opt := range opts {
		opt(m)
	}
	return m
}
newCategoryMutation creates new mutation for the Category entity.
package ent
import (
	"context"
	"fmt"
	"sync"
	"time"
	"entgo.io/contrib/entgql/internal/todo/ent/category"
	"entgo.io/contrib/entgql/internal/todo/ent/predicate"
	"entgo.io/contrib/entgql/internal/todo/ent/schema/schematype"
	"entgo.io/contrib/entgql/internal/todo/ent/todo"
	"entgo.io/contrib/entgql/internal/todo/ent/verysecret"
	"entgo.io/ent"
)
const (
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne
	TypeCategory   = "Category"
	TypeTodo       = "Todo"
	TypeVerySecret = "VerySecret"
)
type CategoryMutation struct {
	config
	op            Op
	typ           string
	id            *int
	text          *string
	status        *category.Status
	_config       **schematype.CategoryConfig
	duration      *time.Duration
	addduration   *time.Duration
	count         *uint64
	addcount      *uint64
	clearedFields map[string]struct{}
	todos         map[int]struct{}
	removedtodos  map[int]struct{}
	clearedtodos  bool
	done          bool
	oldValue      func(context.Context) (*Category, error)
	predicates    []predicate.Category
}
var _ ent.Mutation = (*CategoryMutation)(nil)
type categoryOption func(*CategoryMutation)