using Core.YearTransition;
namespace WebApp.Services;
///
/// Options for applying a year rollover.
///
public sealed class YearRolloverOptions
{
public required YearTransitionPlan Plan { get; init; }
public bool ClearEventOccurrences { get; init; } = true;
}
///
/// Result of a successful year rollover.
///
public sealed class YearRolloverResult
{
public required string BackupPath { get; init; }
public required int StudentsRemoved { get; init; }
public required int StudentsPromoted { get; init; }
public required int TeamsDeleted { get; init; }
public required int RankingsDeleted { get; init; }
public required int MeetingHistoriesDeleted { get; init; }
public required int EventOccurrencesDeleted { get; init; }
public required string CompetitionYear { get; init; }
public required IReadOnlyList OfficerSummary { get; init; }
}
///
/// Applies a year-transition plan to the database.
///
public interface IYearRolloverService
{
Task ApplyAsync(YearRolloverOptions options, CancellationToken cancellationToken = default);
}