namespace Service.Interface { /// /// 审计日志记录器:业务服务注入后一行代码记录关键操作(操作人/角色自动取自当前登录上下文) /// public interface IAuditRecorder { /// /// 记录一条审计日志 /// /// 操作类型(Create/Update/Delete/Login/Command等) /// 操作对象(IotDevice/Gateway/User/Role等) /// 操作对象Id /// 关联设备Id(0=无关) /// 操作前值(JSON 或摘要) /// 操作后值(JSON 或摘要) /// 操作IP(null 自动留空) /// 操作描述 Task RecordAsync(string operationType, string operationTarget, long targetId, long deviceId = 0, string? oldValue = null, string? newValue = null, string? ip = null, string? description = null); } }