// Package task contains the built-in timed-task module contribution.
package task

import (
	datatask "kra/internal/data/task"
	"kra/pkg/module"
)

func Definition() module.Definition {
	return module.Definition{
		Name:       "task",
		Migrations: datatask.Migrations(),
		TimedTasks: []module.TimedTask{
			{Name: "ClearDB", Description: "定时清理数据库过期日志(操作记录/JWT黑名单/定时任务执行日志)", Spec: "@daily", MethodName: "ClearDB", Enabled: true},
			{Name: "CleanStaleUploads", Description: "定时清理过期大文件上传会话", Spec: "@hourly", MethodName: "CleanStaleUploads", Enabled: true},
		},
	}
}
