namespace HoneyBox.Admin.Business.Attributes;

/// <summary>
/// 业务模块权限标记特性
/// 用于标记控制器方法所需的权限编码
/// 实际的权限验证由 Admin 项目的过滤器处理
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class BusinessPermissionAttribute : Attribute
{
    /// <summary>
    /// 权限编码
    /// </summary>
    public string PermissionCode { get; }

    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="permissionCode">权限编码</param>
    public BusinessPermissionAttribute(string permissionCode)
    {
        PermissionCode = permissionCode;
    }
}
