func newAttachmentMutation(c config, op Op, opts ...attachmentOption) *AttachmentMutation {
	m := &AttachmentMutation{
		config:        c,
		op:            op,
		typ:           TypeAttachment,
		clearedFields: make(map[string]struct{}),
	}
	for _, opt := range opts {
		opt(m)
	}
	return m
}
newAttachmentMutation creates new mutation for the Attachment entity.
package ent
import (
	"context"
	"fmt"
	"sync"
	"time"
	"entgo.io/contrib/entproto/internal/todo/ent/attachment"
	"entgo.io/contrib/entproto/internal/todo/ent/group"
	"entgo.io/contrib/entproto/internal/todo/ent/nilexample"
	"entgo.io/contrib/entproto/internal/todo/ent/predicate"
	"entgo.io/contrib/entproto/internal/todo/ent/schema"
	"entgo.io/contrib/entproto/internal/todo/ent/todo"
	"entgo.io/contrib/entproto/internal/todo/ent/user"
	"github.com/google/uuid"
	"entgo.io/ent"
)
const (
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne
	TypeAttachment = "Attachment"
	TypeGroup      = "Group"
	TypeNilExample = "NilExample"
	TypeTodo       = "Todo"
	TypeUser       = "User"
)
type AttachmentMutation struct {
	config
	op                Op
	typ               string
	id                *uuid.UUID
	clearedFields     map[string]struct{}
	user              *int
	cleareduser       bool
	recipients        map[int]struct{}
	removedrecipients map[int]struct{}
	clearedrecipients bool
	done              bool
	oldValue          func(context.Context) (*Attachment, error)
	predicates        []predicate.Attachment
}
var _ ent.Mutation = (*AttachmentMutation)(nil)
type attachmentOption func(*AttachmentMutation)