using TakeoutSaaS.Domain.Dictionary.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Dictionary.Entities;

/// <summary>
/// 字典缓存失效日志。
/// </summary>
public sealed class CacheInvalidationLog : MultiTenantEntityBase
{
    /// <summary>
    /// 发生时间（UTC）。
    /// </summary>
    public DateTime Timestamp { get; set; }

    /// <summary>
    /// 字典编码。
    /// </summary>
    public string DictionaryCode { get; set; } = string.Empty;

    /// <summary>
    /// 字典作用域。
    /// </summary>
    public DictionaryScope Scope { get; set; }

    /// <summary>
    /// 影响的缓存键数量。
    /// </summary>
    public int AffectedCacheKeyCount { get; set; }

    /// <summary>
    /// 操作人用户标识。
    /// </summary>
    public long OperatorId { get; set; }

    /// <summary>
    /// 操作类型。
    /// </summary>
    public CacheInvalidationOperation Operation { get; set; }
}
