This commit is contained in:
@@ -67,6 +67,11 @@ type TaskUpdate struct {
|
||||
ProjectID *string `json:"projectId"`
|
||||
}
|
||||
|
||||
type TaskLink struct {
|
||||
TaskID string `json:"taskId" db:"task_id"`
|
||||
ProjectID string `json:"projectId" db:"project_id"`
|
||||
}
|
||||
|
||||
type TaskResult struct {
|
||||
Task
|
||||
Item *Item `json:"item"`
|
||||
@@ -87,7 +92,12 @@ type TaskFilter struct {
|
||||
type TaskRepository interface {
|
||||
Find(ctx context.Context, id string) (*Task, error)
|
||||
List(ctx context.Context, filter TaskFilter) ([]*Task, error)
|
||||
ListWithLinks(ctx context.Context, filter TaskFilter) ([]*Task, []*TaskLink, error)
|
||||
Insert(ctx context.Context, task Task) error
|
||||
Update(ctx context.Context, task Task) error
|
||||
CreateLink(ctx context.Context, link TaskLink) error
|
||||
DeleteLink(ctx context.Context, link TaskLink) error
|
||||
UnlinkTask(ctx context.Context, task Task) error
|
||||
UnlinkProject(ctx context.Context, project Project) error
|
||||
Delete(ctx context.Context, task Task) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user