haixunMaster/haixun-backend/internal/model/job/domain/repository/schedule.go

23 lines
713 B
Go
Raw Permalink Normal View History

2026-06-23 09:54:27 +00:00
package repository
import (
"context"
"haixun-backend/internal/model/job/domain/entity"
)
type ScheduleListFilter struct {
Scope string
ScopeID string
}
type ScheduleRepository interface {
EnsureIndexes(ctx context.Context) error
Create(ctx context.Context, schedule *entity.Schedule) (*entity.Schedule, error)
Update(ctx context.Context, schedule *entity.Schedule) (*entity.Schedule, error)
FindByID(ctx context.Context, id string) (*entity.Schedule, error)
2026-06-25 09:34:28 +00:00
Delete(ctx context.Context, id string) error
2026-06-23 09:54:27 +00:00
List(ctx context.Context, filter ScheduleListFilter, offset, limit int64) ([]*entity.Schedule, int64, error)
FindDue(ctx context.Context, now int64, limit int64) ([]*entity.Schedule, error)
}