mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-03-15 20:56:50 -04:00
combine arr configs #1
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Common.Exceptions;
|
||||
|
||||
namespace Data.Models.Configuration.QueueCleaner;
|
||||
|
||||
[ComplexType]
|
||||
public sealed record FailedImportConfig
|
||||
{
|
||||
public ushort MaxStrikes { get; init; }
|
||||
|
||||
public bool IgnorePrivate { get; init; }
|
||||
|
||||
public bool DeletePrivate { get; init; }
|
||||
|
||||
public IReadOnlyList<string> IgnoredPatterns { get; init; } = [];
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
if (MaxStrikes is > 0 and < 3)
|
||||
{
|
||||
throw new ValidationException("the minimum value for failed imports max strikes must be 3");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user