<commit_before>﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BatteryCommander.Web.Models
{
    public enum MilitaryEducationLevel : byte
    {
        Unknown,

        [Display(Name = "(AIT) Advanced Individual Training", ShortName = "AIT")]
        AIT = 1,

        [Display(Name = "(BLC) Basic Leader Course", ShortName = "BLC")]
        BLC = 2,

        [Display(Name = "(ALC) Advanced Leader Course", ShortName = "ALC")]
        ALC = 3,

        [Display(Name = "(SLC) Senior Leader Course", ShortName = "SLC")]
        SLC = 4,

        [Display(Name = "(MLC) Master Leader Course", ShortName = "MLC")]
        MLC = 5,

        [Display(Name = "(SMC) Sergeants Major Course", ShortName = "SMC")]
        SMC = 6,

        [Display(Name = "(CST) Cadet Summer Training", ShortName = "CST")]
        CST = 7,

        [Display(Name = "(BOLC) Basic Officer Leaders Course", ShortName = "BOLC")]
        BOLC = 10,

        [Display(Name = "(CCC) Captains Career Course", ShortName = "CCC")]
        CCC = 11
    }

    public static class EducationExtensions
    {
        public static MilitaryEducationLevel RequiredEducation(this Rank rank)
        {
            switch (rank)
            {
                case Rank.E5:
                    return MilitaryEducationLevel.BLC;

                case Rank.E6:
                    return MilitaryEducationLevel.ALC;

                case Rank.E7:
                    return MilitaryEducationLevel.SLC;

                case Rank.E8:
                    return MilitaryEducationLevel.MLC;

                case Rank.CDT:
                    return MilitaryEducationLevel.CST;

                case Rank.O1:
                case Rank.O2:
                    return MilitaryEducationLevel.BOLC;

                case Rank.O3:
                    return MilitaryEducationLevel.CCC;

                default:
                    return MilitaryEducationLevel.AIT;
            }
        }
    }

    public partial class Soldier
    {
        /// <summary>
        /// The highest level of military education attained by the Soldier
        /// </summary>
        [Display(Name = "Education Level")]
        public MilitaryEducationLevel EducationLevel { get; set; } = MilitaryEducationLevel.Unknown;
<commit_msg>E8 and E9 require MLC<commit_after>﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BatteryCommander.Web.Models
{
    public enum MilitaryEducationLevel : byte
    {
        Unknown,

        [Display(Name = "(AIT) Advanced Individual Training", ShortName = "AIT")]
        AIT = 1,

        [Display(Name = "(BLC) Basic Leader Course", ShortName = "BLC")]
        BLC = 2,

        [Display(Name = "(ALC) Advanced Leader Course", ShortName = "ALC")]
        ALC = 3,

        [Display(Name = "(SLC) Senior Leader Course", ShortName = "SLC")]
        SLC = 4,

        [Display(Name = "(MLC) Master Leader Course", ShortName = "MLC")]
        MLC = 5,

        [Display(Name = "(SMC) Sergeants Major Course", ShortName = "SMC")]
        SMC = 6,

        [Display(Name = "(CST) Cadet Summer Training", ShortName = "CST")]
        CST = 7,

        [Display(Name = "(BOLC) Basic Officer Leaders Course", ShortName = "BOLC")]
        BOLC = 10,

        [Display(Name = "(CCC) Captains Career Course", ShortName = "CCC")]
        CCC = 11
    }

    public static class EducationExtensions
    {
        public static MilitaryEducationLevel RequiredEducation(this Rank rank)
        {
            switch (rank)
            {
                // Do Warrant Officers have requirements?

                case Rank.E5:
                    return MilitaryEducationLevel.BLC;

                case Rank.E6:
                    return MilitaryEducationLevel.ALC;

                case Rank.E7:
                    return MilitaryEducationLevel.SLC;

                case Rank.E8:
                case Rank.E8_MSG:
                case Rank.E9:
                    return MilitaryEducationLevel.MLC;

                case Rank.CDT:
                    return MilitaryEducationLevel.CST;

                case Rank.O1:
                case Rank.O2:
                    return MilitaryEducationLevel.BOLC;

                case Rank.O3:
                case Rank.O4:
                    return MilitaryEducationLevel.CCC;

                default:
                    return MilitaryEducationLevel.AIT;
            }
        }
    }

    public partial class Soldier
    {
        /// <summary>
        /// The highest level of military education attained by the Soldier
        /// </summary>
        [Display(Name = "Education Level")]
        public MilitaryEducationLevel EducationLevel { get; set; } = MilitaryEducationLevel.Unknown;

{'fraction_non_alphanumeric': 0.09485430874147552, 'fraction_numerical': 0.008472824963835503, 'mean_word_length': 1.7054220234768027, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '526467', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1231, 'n_words': 345}