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)
	Delete(ctx context.Context, id string) error
	List(ctx context.Context, filter ScheduleListFilter, offset, limit int64) ([]*entity.Schedule, int64, error)
	FindDue(ctx context.Context, now int64, limit int64) ([]*entity.Schedule, error)
}
