17 lines
810 B
C#
17 lines
810 B
C#
using FreeSql.DataAnnotations;
|
|
using F9WebAiTest.Domain.Common;
|
|
|
|
namespace F9WebAiTest.Domain.Entities.Notice;
|
|
|
|
/// <summary>用户订阅(用户主动订阅/取消,保留历史)</summary>
|
|
[Table(Name = "UserNotificationSubscriptions")]
|
|
[Index("IX_UserNotificationSubscriptions_UserId_NotificationTypeId", "UserId, NotificationTypeId", IsUnique = true)]
|
|
public class UserNotificationSubscription : BaseEntity
|
|
{
|
|
public long UserId { get; set; } // 订阅用户ID
|
|
public long NotificationTypeId { get; set; } // 消息类型ID
|
|
public bool IsActive { get; set; } = true; // 订阅状态:true=已订阅 false=已取消
|
|
public DateTime SubscribedTime { get; set; } = DateTime.Now; // 订阅时间
|
|
public DateTime? CancelTime { get; set; } // 取消订阅时间
|
|
}
|