EnumDescriptionAttribute.cs 575 Bytes
using System;

namespace Rcs.Domain.Attributes;

/// <summary>
/// 枚举多语言描述特性
/// @author zzy
/// </summary>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public class EnumDescriptionAttribute : Attribute
{
    /// <summary>
    /// 中文描述
    /// </summary>
    public string ZhCn { get; set; } = string.Empty;

    /// <summary>
    /// 英文描述
    /// </summary>
    public string En { get; set; } = string.Empty;

    public EnumDescriptionAttribute(string zhCn, string en)
    {
        ZhCn = zhCn;
        En = en;
    }
}