// codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/internal/domain/tag/interface.go
package tag

import (
	"context"

	"github.com/gocql/gocql"
)

// Repository defines the interface for tag data access operations
type Repository interface {
	// Tag CRUD operations
	Create(ctx context.Context, tag *Tag) error
	GetByID(ctx context.Context, id gocql.UUID) (*Tag, error)
	ListByUser(ctx context.Context, userID gocql.UUID) ([]*Tag, error)
	Update(ctx context.Context, tag *Tag) error
	DeleteByID(ctx context.Context, userID, id gocql.UUID) error

	// Tag Assignment operations
	AssignTag(ctx context.Context, assignment *TagAssignment) error
	UnassignTag(ctx context.Context, tagID, entityID gocql.UUID, entityType string) error
	GetTagsForEntity(ctx context.Context, entityID gocql.UUID, entityType string) ([]*Tag, error)
	GetEntitiesWithTag(ctx context.Context, tagID gocql.UUID, entityType string) ([]gocql.UUID, error)
	GetAssignmentsByTag(ctx context.Context, tagID gocql.UUID) ([]*TagAssignment, error)
	GetAssignmentsByEntity(ctx context.Context, entityID gocql.UUID, entityType string) ([]*TagAssignment, error)
}
