using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AllBase.Model; public class CommonItem : IComparable { /// /// 初始化 /// /// 文本 /// 值 /// 排序号 /// 组 /// 禁用 public CommonItem(string text, object value, string des = "", int? sortId = null, string group = null, bool? disabled = null) { Text = text; Value = value; Description = des; SortId = sortId; Group = group; Disabled = disabled; } /// /// 文本 /// public string Text { get; } /// /// 值 /// public object Value { get; } /// /// 描述 /// public string Description { get; set; } /// /// 排序号 /// public int? SortId { get; set; } /// /// 组 /// public string Group { get; } /// /// 是否选中 /// public bool IsSelected { get; set; } /// /// 禁用 /// public bool? Disabled { get; } /// /// 比较 /// /// 其它列表项 public int CompareTo(CommonItem other) { return string.Compare(Text, other.Text, StringComparison.CurrentCulture); } }