using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Ys.Core.Common; namespace djy.Paas.Model {/// /// 常用标准的数据字典配置模型 /// public class DjyDictDto { /// /// 数值型ID /// public int IntId { get; set; } /// /// code /// public string Code { get; set; } /// /// 排序索引 /// public int Index { get; set; } = 0; /// /// 查询索引 /// public string Select { get; set; } /// /// 名称 /// public string Name { get; set; } /// /// config配置 格式为逗号间隔的 key=value,key2=value3 /// public string Config { get; set; } /// /// 返回配置参数的配置对象字典 /// public Dictionary ConfigList { get { return GetConfig(); } } /// /// 序列化config返回数据字典 /// /// public Dictionary GetConfig() { var config = new Dictionary(); if (Config.IsNotNull()) { foreach (var item in this.Config.Split(',')) { var val = item.Split('='); if (val.Length == 2) { config.Add(val[0], val[1]); } } } return config; } } }