mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
18 lines
372 B
Go
18 lines
372 B
Go
|
|
package repository
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
"mayfly-go/pkg/base"
|
||
|
|
"mayfly-go/pkg/model"
|
||
|
|
)
|
||
|
|
|
||
|
|
type DbTask[T model.ModelI] interface {
|
||
|
|
base.Repo[T]
|
||
|
|
|
||
|
|
UpdateTaskStatus(ctx context.Context, task T) error
|
||
|
|
UpdateEnabled(ctx context.Context, taskId uint64, enabled bool) error
|
||
|
|
ListToDo() ([]T, error)
|
||
|
|
ListRepeating() ([]T, error)
|
||
|
|
AddTask(ctx context.Context, tasks ...T) error
|
||
|
|
}
|