using FrameworkDAL.DTO.ChangeTracking;
using System;
using System.Collections.Generic;
namespace FrameworkDAL.DTO.AuditQuery
{
///
/// Projection of a TEVENTLOG row with optional field-level changes.
/// is populated by AuditQueryBLL when
/// the caller requests change detail (e.g. GetAuditByEntity).
///
public sealed class AuditEventDTO
{
public int EventLogId { get; set; }
public int EventTypeId { get; set; }
public string? EventTypeName { get; set; }
public string? EventTypeCode { get; set; }
public int UserId { get; set; }
public string? UserName { get; set; }
public string? UserCode { get; set; }
public string? EventText { get; set; }
public string? Data { get; set; }
/// TEVENTLOG.SOURCEID — maps to BizTransactionType.
public int? SourceId { get; set; }
public string? SourceName { get; set; }
/// TEVENTLOG.DATAID — PK of the entity that triggered this event.
public int? DataId { get; set; }
public int? OuId { get; set; }
public string? OuName { get; set; }
public string? MachineIp { get; set; }
public DateTime Timestamp { get; set; }
public string? Tags { get; set; }
///
/// Field-level changes for this event.
/// Populated when the caller requests change detail.
/// Empty list when the event was an INSERT or when no changes were tracked.
///
public List Changes { get; set; } = [];
}
}