using Jiaowu.Api.Domain.Academic;

namespace Jiaowu.Api.Infrastructure.Graduation;

public static class DegreeAwardRules
{
    public static DegreeAwardConclusion Evaluate(
        bool graduationEligible,
        StudentStatus studentStatus,
        decimal averageGradePoint,
        decimal minimumGradePoint) =>
        graduationEligible &&
        studentStatus == StudentStatus.Graduated &&
        averageGradePoint >= minimumGradePoint
            ? DegreeAwardConclusion.Granted
            : DegreeAwardConclusion.NotGranted;
}
