package repository

import (
	"context"

	"haixun-backend/internal/model/content_ops/domain/entity"
)

type Repository interface {
	EnsureIndexes(ctx context.Context) error
	CreateTopicCandidate(ctx context.Context, item *entity.TopicCandidate) error
	ListTopicCandidates(ctx context.Context, tenantID, ownerUID, personaID string, limit int) ([]entity.TopicCandidate, error)
	CreateContentPlan(ctx context.Context, item *entity.ContentPlan) error
	UpdateContentPlan(ctx context.Context, tenantID, ownerUID, personaID, id string, patch map[string]any) (*entity.ContentPlan, error)
	GetContentPlan(ctx context.Context, tenantID, ownerUID, personaID, id string) (*entity.ContentPlan, error)
	ListContentPlans(ctx context.Context, tenantID, ownerUID, personaID string, limit int) ([]entity.ContentPlan, error)
	CreateFeedbackEvent(ctx context.Context, item *entity.FeedbackEvent) error
	ListFeedbackEvents(ctx context.Context, tenantID, ownerUID, personaID string, limit int) ([]entity.FeedbackEvent, error)
	CreateKnowledgeSource(ctx context.Context, item *entity.KnowledgeSource, chunks []*entity.KnowledgeChunk) error
	ListKnowledgeSources(ctx context.Context, tenantID, ownerUID, personaID string, limit int) ([]entity.KnowledgeSource, error)
	ListKnowledgeChunks(ctx context.Context, tenantID, ownerUID, personaID string, limit int) ([]entity.KnowledgeChunk, error)
	CreateFormulaPool(ctx context.Context, item *entity.FormulaPool) error
	ListFormulaPools(ctx context.Context, tenantID, ownerUID, personaID string, limit int) ([]entity.FormulaPool, error)
}
