1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace JiaZhiQuan.Common
- {
- /// <summary>
- /// 活动分类
- /// </summary>
- public static class ActivityTypes
- {
- public static Dictionary<string, string> CodeDescriptionMapping { get; } = new Dictionary<string, string>();
- static ActivityTypes()
- {
- var members = typeof(ActivityTypes).GetFields();
- members.ForEach(e =>
- {
- var attr = Attribute.GetCustomAttribute(e, typeof(DescriptionAttribute)) as DescriptionAttribute;
- if (attr != null)
- {
- CodeDescriptionMapping.Add((string)e.GetRawConstantValue(), attr.Description);
- }
- });
- }
-
-
- [Description("猜涨跌")]
- public const string 猜涨跌 = "czd";
- [Description("答题")]
- public const string 答题 = "dt";
- [Description("晒笔记")]
- public const string 晒笔记 = "sbj";
- [Description("邀请好友")]
- public const string 邀请好友 = "yqhy";
- [Description("每日话题")]
- public const string 每日话题 = "mrht";
-
- [Description("阅读量大比拼")]
- public const string 阅读量大比拼 = "ydldbp";
-
- [Description("打卡")]
- public const string 打卡 = "daka";
- }
- }
|