namespace Tiobon.Core.Common; /// /// 视图类属性是字典值时根据属性值获取字典值 /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)] public sealed class ExportDatatAttribute : Attribute { /// /// 数据源字段名 /// public string ExportDataName { get; } /// /// 数据源的model类型 /// public Type ExportDataType { get; } /// /// 数据类型,(1)序列 (2)嵌套model (3)数据项 /// public string ExportDataFlag { get; } /// /// 动态数据的字段名和类型 /// /// 数据源字段名 /// 数据源的类型(typeof(类名)) public ExportDatatAttribute(string name, Type type) { ExportDataName = name; ExportDataType = type; } /// /// 标识 /// /// (1)序列 (2)嵌套model (3)数据项 public ExportDatatAttribute(string flag) { ExportDataFlag = flag; } }