package system

import "context"

// MaintenanceRepo owns retention work for system-owned tables. Other data
// modules clean their own tables and worker composes the operations.
type MaintenanceRepo interface {
	CleanupExpired(context.Context) error
}

type MaintenanceUsecase struct{ repo MaintenanceRepo }

func NewMaintenanceUsecase(repo MaintenanceRepo) *MaintenanceUsecase {
	return &MaintenanceUsecase{repo: repo}
}

func (uc *MaintenanceUsecase) CleanupExpired(ctx context.Context) error {
	return uc.repo.CleanupExpired(ctx)
}
