username@email.com
2024-04-02 5b46930255ec185a906d07165f9d0dc91c300ab8
CoreCms.Net.Model/Entities/baifenbingfa/apply/applyModel.cs
@@ -6,6 +6,7 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -31,6 +32,13 @@
        public string managerID {  get; set; }
        /// <summary>
        /// 审批人名称用,分割
        /// </summary>
        [Display(Name = "审批人名称用,分割")]
        [SugarColumn(ColumnDescription = "审批人名称", IsNullable = true)]
        public string managerName { get; set; }
        /// <summary>
        /// 审批角色ID,号分割
        /// </summary>
        [Display(Name = "审批角色ID")]
@@ -50,6 +58,21 @@
        [Display(Name = "类型")]
        [SugarColumn(ColumnDescription = "类型")]
        public applyType aType { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        [Display(Name = "审批状态")]
        [SugarColumn(ColumnDescription = "审批状态")]
        public applyStataType ayStataType { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        [Display(Name = "用户ID")]
        [SugarColumn(ColumnDescription = "用户ID")]
        public int userID { get; set; }
        /// <summary>
@@ -80,6 +103,18 @@
        [Display(Name = "调整数据")]
        [SugarColumn(ColumnDescription = "调整数据")]
        public string data { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnDescription = "创建人", IsNullable = true)]
        public int createById { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        [SugarColumn(ColumnDescription = "修改人", IsNullable = true)]
        public int upDataById { get; set; }
    }
    /// <summary>
@@ -128,4 +163,30 @@
    }
    /// <summary>
    /// 获取Description
    /// </summary>
    public static class EnumExtensions
    {
        /// <summary>
        /// 获取Description
        /// </summary>
        public static string GetDescription(this Enum value, bool nameInstead = true)
        {
            Type type = value.GetType();
            string name = Enum.GetName(type, value);
            if (name == null)
            {
                return null;
            }
            FieldInfo field = type.GetField(name);
            DescriptionAttribute attribute = field.GetCustomAttribute(typeof(DescriptionAttribute)) as DescriptionAttribute;
            if (attribute == null && nameInstead == true)
            {
                return name;
            }
            return attribute?.Description;
        }
    }
}