public enum AlertFeedbackType
{
    Useful,
    TooEarly,
    TooLate,
    FalsePositive,
    MissingContext,
    WouldAct
}

public static class AlertFeedbackTypeExtensions
{
    public static string ToDbString(this AlertFeedbackType t) => t switch
    {
        AlertFeedbackType.Useful         => "USEFUL",
        AlertFeedbackType.TooEarly       => "TOO_EARLY",
        AlertFeedbackType.TooLate        => "TOO_LATE",
        AlertFeedbackType.FalsePositive  => "FALSE_POSITIVE",
        AlertFeedbackType.MissingContext => "MISSING_CONTEXT",
        AlertFeedbackType.WouldAct       => "WOULD_ACT",
        _ => throw new ArgumentOutOfRangeException(nameof(t))
    };

    public static AlertFeedbackType FromDbString(string v) => v switch
    {
        "USEFUL"          => AlertFeedbackType.Useful,
        "TOO_EARLY"       => AlertFeedbackType.TooEarly,
        "TOO_LATE"        => AlertFeedbackType.TooLate,
        "FALSE_POSITIVE"  => AlertFeedbackType.FalsePositive,
        "MISSING_CONTEXT" => AlertFeedbackType.MissingContext,
        "WOULD_ACT"       => AlertFeedbackType.WouldAct,
        _ => throw new ArgumentOutOfRangeException(nameof(v))
    };
}