This commit is contained in:
2026-03-29 23:17:20 +08:00
commit 7dc5e73af7
36 changed files with 1480 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
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; }
}