package repositories

import (
	"context"
	"counter/internal/domain/entities"
	"time"
)

// CounterRepository defines the interface for counter data operations
type CounterRepository interface {
	Create(ctx context.Context, counter *entities.Counter) error
	FindByID(ctx context.Context, id, userID int) (*entities.CounterWithStats, error)
	FindByUserID(ctx context.Context, userID int, search string) ([]*entities.CounterWithStats, error)
	Update(ctx context.Context, counter *entities.Counter) error
	Delete(ctx context.Context, id, userID int) error
	AddEntry(ctx context.Context, entry *entities.CounterEntry) error
	GetEntries(ctx context.Context, counterID, userID int, startDate, endDate *time.Time) ([]*entities.CounterEntry, error)
	GetDailyStats(ctx context.Context, counterID, userID int, days int) ([]*entities.DailyStat, error)
	Exists(ctx context.Context, id, userID int) (bool, error)
}
