package repository

import (
	"context"

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

type Repository interface {
	EnsureIndexes(ctx context.Context) error
	Create(ctx context.Context, analytics *entity.PublishAnalytics) error
	Get(ctx context.Context, tenantID, ownerUID, analyticsID string) (*entity.PublishAnalytics, error)
	ListByMedia(ctx context.Context, tenantID, ownerUID, mediaID string) ([]entity.PublishAnalytics, error)
	Upsert(ctx context.Context, analytics *entity.PublishAnalytics) (*entity.PublishAnalytics, error)
	DeleteByMediaIDs(ctx context.Context, tenantID, ownerUID string, mediaIDs []string) (int64, error)
}
