using System.ComponentModel.DataAnnotations;
namespace Cleanuparr.Api.Models;
public class UpdateDownloadCleanerConfigDto
{
public bool Enabled { get; set; }
public string CronExpression { get; set; } = "0 0 * * * ?";
///
/// Indicates whether to use the CronExpression directly or convert from a user-friendly schedule
///
public bool UseAdvancedScheduling { get; set; }
public List Categories { get; set; } = [];
public bool DeletePrivate { get; set; }
///
/// Indicates whether unlinked download handling is enabled
///
public bool UnlinkedEnabled { get; set; } = false;
public string UnlinkedTargetCategory { get; set; } = "cleanuparr-unlinked";
public bool UnlinkedUseTag { get; set; }
public string UnlinkedIgnoredRootDir { get; set; } = string.Empty;
public List UnlinkedCategories { get; set; } = [];
}
public class CleanCategoryDto
{
[Required]
public string Name { get; set; } = string.Empty;
///
/// Max ratio before removing a download.
///
public double MaxRatio { get; set; } = -1;
///
/// Min number of hours to seed before removing a download, if the ratio has been met.
///
public double MinSeedTime { get; set; }
///
/// Number of hours to seed before removing a download.
///
public double MaxSeedTime { get; set; } = -1;
}