combine arr configs #1

This commit is contained in:
Flaminel
2025-06-15 21:15:50 +03:00
parent 62eee94497
commit bf37668dcb
74 changed files with 486 additions and 703 deletions

View File

@@ -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");
}
}
}