live-forum/server/webapi/LiveForum/LiveForum.Model/Events/LikeOperationEvent.cs
2026-03-24 11:27:37 +08:00

42 lines
970 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
namespace LiveForum.Model.Events
{
/// <summary>
/// 点赞操作事件(用于队列持久化)
/// </summary>
public class LikeOperationEvent
{
/// <summary>
/// 事件唯一ID
/// </summary>
public string EventId { get; set; } = Guid.NewGuid().ToString();
/// <summary>
/// 用户ID
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 目标类型1-帖子2-评论
/// </summary>
public int TargetType { get; set; }
/// <summary>
/// 目标ID
/// </summary>
public long TargetId { get; set; }
/// <summary>
/// 操作类型:"INSERT" | "DELETE"
/// </summary>
public string Action { get; set; }
/// <summary>
/// 事件发生时间
/// </summary>
public DateTime OccurredAt { get; set; } = DateTime.Now;
}
}