You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.0 KiB
73 lines
2.0 KiB
3 years ago
|
using System;
|
||
|
using Volo.Abp.Data;
|
||
|
using Volo.Abp.SecurityLog;
|
||
|
|
||
|
namespace Sanhe.Abp.AuditLogging
|
||
|
{
|
||
|
public class SecurityLog : IHasExtraProperties
|
||
|
{
|
||
|
public Guid Id { get; set; }
|
||
|
|
||
|
public Guid? TenantId { get; set; }
|
||
|
|
||
|
public string ApplicationName { get; set; }
|
||
|
|
||
|
public string Identity { get; set; }
|
||
|
|
||
|
public string Action { get; set; }
|
||
|
|
||
|
public Guid? UserId { get; set; }
|
||
|
|
||
|
public string UserName { get; set; }
|
||
|
|
||
|
public string TenantName { get; set; }
|
||
|
|
||
|
public string ClientId { get; set; }
|
||
|
|
||
|
public string CorrelationId { get; set; }
|
||
|
|
||
|
public string ClientIpAddress { get; set; }
|
||
|
|
||
|
public string BrowserInfo { get; set; }
|
||
|
|
||
|
public DateTime CreationTime { get; set; }
|
||
|
|
||
|
public ExtraPropertyDictionary ExtraProperties { get; set; }
|
||
|
|
||
|
public SecurityLog()
|
||
|
{
|
||
|
ExtraProperties = new ExtraPropertyDictionary();
|
||
|
}
|
||
|
|
||
|
public SecurityLog(Guid id, SecurityLogInfo securityLogInfo)
|
||
|
{
|
||
|
Id = id;
|
||
|
TenantId = securityLogInfo.TenantId;
|
||
|
TenantName = securityLogInfo.TenantName;
|
||
|
|
||
|
ApplicationName = securityLogInfo.ApplicationName;
|
||
|
Identity = securityLogInfo.Identity;
|
||
|
Action = securityLogInfo.Action;
|
||
|
|
||
|
UserId = securityLogInfo.UserId;
|
||
|
UserName = securityLogInfo.UserName;
|
||
|
|
||
|
CreationTime = securityLogInfo.CreationTime;
|
||
|
|
||
|
ClientIpAddress = securityLogInfo.ClientIpAddress;
|
||
|
ClientId = securityLogInfo.ClientId;
|
||
|
CorrelationId = securityLogInfo.CorrelationId;
|
||
|
BrowserInfo = securityLogInfo.BrowserInfo;
|
||
|
|
||
|
ExtraProperties = new ExtraPropertyDictionary();
|
||
|
if (securityLogInfo.ExtraProperties != null)
|
||
|
{
|
||
|
foreach (var pair in securityLogInfo.ExtraProperties)
|
||
|
{
|
||
|
ExtraProperties.Add(pair.Key, pair.Value);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|