namespace LTEMvcApp.Models { /// /// 日志传输方向常量 /// public static class LogDirection { /// /// 无方向 /// public const int None = 0; /// /// 上行传输 /// public const int UL = 1; /// /// 下行传输 /// public const int DL = 2; /// /// 从某处传输 /// public const int From = 3; /// /// 传输到某处 /// public const int To = 4; /// /// 获取方向名称 /// /// 方向值 /// 方向名称 public static string GetDirectionName(int direction) { return direction switch { None => "-", UL => "UL", DL => "DL", From => "FROM", To => "TO", _ => "UNKNOWN" }; } /// /// 获取所有方向选项 /// /// 方向选项列表 public static List GetDirectionOptions() { return new List { new() { Value = None, Text = "-" }, new() { Value = DL, Text = "DL" }, new() { Value = UL, Text = "UL" } }; } } /// /// 方向选项 /// public class DirectionOption { public int Value { get; set; } public string Text { get; set; } = string.Empty; } }