Files
2026-03-29 23:17:20 +08:00

27 lines
604 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace OrpaonVision.Core.Abstractions;
/// <summary>
/// 当前用户上下文抽象。
///
/// 用途:
/// - 为审计字段CreatedBy/UpdatedBy提供统一来源
/// - 在应用服务中统一获取当前登录人信息。
/// </summary>
public interface IUserContext
{
/// <summary>
/// 当前用户 ID。
/// </summary>
string UserId { get; }
/// <summary>
/// 当前用户名或工号。
/// </summary>
string UserName { get; }
/// <summary>
/// 当前用户角色集合。
/// </summary>
IReadOnlyCollection<string> Roles { get; }
}