using Core.Models;
namespace WebApp.Services;
///
/// Persists parsed student event rankings.
///
public interface IStudentEventRankingSaveService
{
///
/// Students in the parse result who already have rankings stored.
///
Task> GetStudentsWithExistingRankingsAsync(
StudentEventRankingParseResult parseResult,
CancellationToken cancellationToken = default);
///
/// Replaces rankings for students who have at least one accepted rank in the parse result.
/// Other students are left unchanged.
///
Task SaveAsync(
StudentEventRankingParseResult parseResult,
CancellationToken cancellationToken = default);
}
///
/// Outcome of saving imported event rankings.
///
public class StudentEventRankingSaveResult
{
public int StudentsUpdated { get; set; }
public int RankingsSaved { get; set; }
}