// This file is part of the EonaCat project(s) which is released under the Apache License.
// See the LICENSE file or go to https://EonaCat.com/License for full license details.

namespace EonaCat.LogStack.EonaCatLogStackCore.Policies
{
    /// <summary>Combined retention policy: delete rolled files exceeding any threshold.</summary>
    public sealed class FileRetentionPolicy
    {
        /// <summary>Maximum number of rolled archive files to keep (0 = unlimited).</summary>
        public int MaxRolledFiles { get; set; }

        /// <summary>Maximum number of compressed .gz files to keep (0 = unlimited).</summary>
        public int MaxCompressedFiles { get; set; }

        /// <summary>Maximum total size of all archives in bytes (0 = unlimited).</summary>
        public long MaxTotalArchiveBytes { get; set; }

        /// <summary>Maximum age of any archive file in days (0 = unlimited).</summary>
        public int MaxAgeDays { get; set; }

        public FileRetentionPolicy()
        {
            MaxRolledFiles = 10;
            MaxCompressedFiles = 5;
            MaxTotalArchiveBytes = 0;
            MaxAgeDays = 0;
        }
    }
}