First working version. Can add Projects and Tasks

This commit is contained in:
Anis Ahmad
2020-05-25 23:18:48 +06:00
parent 267995124b
commit 6f9580d98a
12 changed files with 610 additions and 0 deletions

18
repository/task.go Normal file
View File

@@ -0,0 +1,18 @@
package repository
import (
"time"
"github.com/ajaxray/geek-life/model"
)
type TaskRepository interface {
GetAll() ([]model.Task, error)
GetAllByProject(project model.Project) ([]model.Task, error)
GetAllByDate(from, to time.Time) ([]model.Task, error)
GetByID(ID string) (model.Task, error)
GetByUUID(UUID string) (model.Task, error)
Create(project model.Project, title, details, UUID string, dueDate int64) (model.Task, error)
Update(p *model.Task) error
Delete(p *model.Task) error
}