package repository

import (
	"actatempus_backend/internal/domain/entities"
	"context"

	E "github.com/IBM/fp-go/either"
)

// TimeEntryRepository defines the operations for interacting with time entry data.
type TimeEntryRepository interface {
	Create(ctx context.Context) func(entry entities.TimeEntryCreate) E.Either[error, entities.TimeEntry]
	FindByID(ctx context.Context) func(id string) E.Either[error, entities.TimeEntry]
	FindByUserID(ctx context.Context) func(userID string) E.Either[error, []entities.TimeEntry]
	FindByProjectID(ctx context.Context) func(projectID string) E.Either[error, []entities.TimeEntry]
	Update(ctx context.Context) func(entry entities.TimeEntryUpdate) E.Either[error, entities.TimeEntry]
	Delete(ctx context.Context) func(id string) E.Either[error, entities.TimeEntry]
	FindAll(ctx context.Context) E.Either[error, []entities.TimeEntry]
}
