Files
Umbraco-CMS/src/Umbraco.Core/Models/AuditItem.cs
2018-10-23 15:38:47 +02:00

40 lines
1.0 KiB
C#

using Umbraco.Core.Models.Entities;
namespace Umbraco.Core.Models
{
public sealed class AuditItem : EntityBase, IAuditItem
{
/// <summary>
/// Initializes a new instance of the <see cref="AuditItem"/> class.
/// </summary>
public AuditItem(int objectId, AuditType type, int userId, string entityType, string comment = null, string parameters = null)
{
DisableChangeTracking();
Id = objectId;
Comment = comment;
AuditType = type;
UserId = userId;
EntityType = entityType;
Parameters = parameters;
EnableChangeTracking();
}
/// <inheritdoc/>
public AuditType AuditType { get; }
/// <inheritdoc/>
public string EntityType { get; }
/// <inheritdoc/>
public int UserId { get; }
/// <inheritdoc/>
public string Comment { get; }
/// <inheritdoc/>
public string Parameters { get; }
}
}