package repository

import (
	"time"

	"github.com/ajaxray/geek-life/model"
)

// TaskRepository interface defines methods of task data accessor
type TaskRepository interface {
	GetAll(ctx *model.UserContext) ([]model.Task, error)
	GetAllByProject(ctx *model.UserContext, project model.Project) ([]model.Task, error)
	GetAllByDate(ctx *model.UserContext, date time.Time) ([]model.Task, error)
	GetAllByDateRange(ctx *model.UserContext, from, to time.Time) ([]model.Task, error)
	GetByID(ctx *model.UserContext, ID string) (model.Task, error)
	GetByUUID(ctx *model.UserContext, UUID string) (model.Task, error)
	Create(ctx *model.UserContext, project model.Project, title, details, UUID string, dueDate *int64) (model.Task, error)
	Update(ctx *model.UserContext, t *model.Task) error
	UpdateField(ctx *model.UserContext, t *model.Task, field string, value interface{}) error
	Delete(ctx *model.UserContext, t *model.Task) error
}
