username@email.com
2024-05-29 7a3a4f8012a72f80d8dd62064a76655c803da864
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
using Chuanyin.Attribute;
using CoreCms.Net.Model.Entities.baseModel;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
 
namespace CoreCms.Net.Model.Entities.baifenbingfa.apply
{
    /// <summary>
    /// 审批流程
    /// </summary>
    //[SqlCodeFirst]
    public class applyModel: BFBaseModel
    {
        /// <summary>
        /// id
        /// </summary>        
        [SugarColumn(ColumnDescription = "id",IsIdentity =true,IsPrimaryKey =true)]
        [Display(Name = "id")]
        public int id  { get; set; }
        /// <summary>
        /// 审批人ID用,分割
        /// </summary>
        [Display(Name = "审批人ID用,分割")]
        [SugarColumn(ColumnDescription = "审批人ID", IsNullable = true)]
        public string managerID {  get; set; }
 
        /// <summary>
        /// 审批人名称用,分割
        /// </summary>
        [Display(Name = "审批人名称用,分割")]
        [SugarColumn(ColumnDescription = "审批人名称", IsNullable = true)]
        public string managerName { get; set; }
 
        /// <summary>
        /// 审批角色ID,号分割
        /// </summary>
        [Display(Name = "审批角色ID")]
        [SugarColumn(ColumnDescription = "审批角色ID")]
        public string roleID { get; set; }
 
        /// <summary>
        /// 审核人数数量        
        /// </summary>
        [Display(Name = "审核人数数量")]
        [SugarColumn(ColumnDescription = "审核人数数量")]
        public int managerApplyCount { get; set; }
 
        /// <summary>
        /// 类型        
        /// </summary>
        [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>
        /// 内容        
        /// </summary>
        [Display(Name = "内容")]
        [SugarColumn(ColumnDescription = "内容")]
        public string dec { get; set; }
 
        /// <summary>
        /// 备注        
        /// </summary>
        [Display(Name = "备注")]
        [SugarColumn(ColumnDescription = "备注",IsNullable =true)]
        public string reMake { get; set; }
 
        /// <summary>
        /// 调整前数据        
        /// </summary>
        [Display(Name = "调整前数据")]
        [SugarColumn(ColumnDescription = "调整前数据", IsNullable = true)]
        public string oldData { get; set; }
 
 
        /// <summary>
        /// 调整数据        
        /// </summary>
        [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>
    /// 审批申请类型
    /// </summary>
    public enum applyType
    {
        /// <summary>
        /// 积分
        /// </summary>
        [Description("积分")]
        points,
        /// <summary>
        /// 余额
        /// </summary>
        [Description("余额")]
        Balance,
        /// <summary>
        /// 推荐人
        /// </summary>
        [Description("推荐人")]
        Referrer,
    }
 
    /// <summary>
    /// 审批状态
    /// </summary>
    public enum applyStataType
    {
        /// <summary>
        /// 同意
        /// </summary>
        [Description("同意")]
        ok,
        /// <summary>
        /// 审核中
        /// </summary>
        [Description("审批中")]
        applying,
        /// <summary>
        /// 拒绝
        /// </summary>
        [Description("拒绝")]
        no
 
 
 
    }
 
    /// <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;
        }
    }
}