func (tc *TodoCreate) SetCategoryID(id int) *TodoCreate {
	tc.mutation.SetCategoryID(id)
	return tc
}
SetCategoryID sets the "category" edge to the Category entity by ID.
package ent
import (
	"context"
	"errors"
	"fmt"
	"time"
	"entgo.io/contrib/entgql/internal/todo/ent/category"
	"entgo.io/contrib/entgql/internal/todo/ent/todo"
	"entgo.io/contrib/entgql/internal/todo/ent/verysecret"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
)
type TodoCreate struct {
	config
	mutation *TodoMutation
	hooks    []Hook
}
func (tc *TodoCreate) SetCreatedAt(t time.Time) *TodoCreate {
	tc.mutation.SetCreatedAt(t)
	return tc
}
func (tc *TodoCreate) SetNillableCreatedAt(t *time.Time) *TodoCreate {
	if t != nil {
		tc.SetCreatedAt(*t)
	}
	return tc
}
func (tc *TodoCreate) SetStatus(t todo.Status) *TodoCreate {
	tc.mutation.SetStatus(t)
	return tc
}
func (tc *TodoCreate) SetPriority(i int) *TodoCreate {
	tc.mutation.SetPriority(i)
	return tc
}
func (tc *TodoCreate) SetNillablePriority(i *int) *TodoCreate {
	if i != nil {
		tc.SetPriority(*i)
	}
	return tc
}
func (tc *TodoCreate) SetText(s string) *TodoCreate {
	tc.mutation.SetText(s)
	return tc
}
func (tc *TodoCreate) SetBlob(b []byte) *TodoCreate {
	tc.mutation.SetBlob(b)
	return tc
}
func (tc *TodoCreate) SetParentID(id int) *TodoCreate {
	tc.mutation.SetParentID(id)
	return tc
}
func (tc *TodoCreate) SetNillableParentID(id *int) *TodoCreate {
	if id != nil {
		tc = tc.SetParentID(*id)
	}
	return tc
}
func (tc *TodoCreate) SetParent(t *Todo) *TodoCreate {
	return tc.SetParentID(t.ID)
}
func (tc *TodoCreate) AddChildIDs(ids ...int) *TodoCreate {
	tc.mutation.AddChildIDs(ids...)
	return tc
}
func (tc *TodoCreate) AddChildren(t ...*Todo) *TodoCreate {
	ids := make([]int, len(t))
	for i := range t {
		ids[i] = t[i].ID
	}
	return tc.AddChildIDs(ids...)
}